test(cli): align librarian fallback expectations with actual resolution
This commit is contained in:
@@ -480,7 +480,7 @@ describe("generateModelConfig", () => {
|
||||
})
|
||||
|
||||
describe("librarian agent special cases", () => {
|
||||
test("librarian uses ZAI when ZAI is available regardless of other providers", () => {
|
||||
test("librarian uses ZAI model when ZAI is available regardless of other providers", () => {
|
||||
// #given ZAI and Claude are available
|
||||
const config = createConfig({
|
||||
hasClaude: true,
|
||||
@@ -491,18 +491,18 @@ describe("generateModelConfig", () => {
|
||||
const result = generateModelConfig(config)
|
||||
|
||||
// #then librarian should use ZAI_MODEL
|
||||
expect(result.agents?.librarian?.model).toBe("opencode/minimax-m2.5-free")
|
||||
expect(result.agents?.librarian?.model).toBe("zai-coding-plan/glm-4.7")
|
||||
})
|
||||
|
||||
test("librarian always uses minimax-m2.5-free regardless of provider availability", () => {
|
||||
test("librarian falls back to generic chain result when no librarian provider matches", () => {
|
||||
// #given only Claude is available (no ZAI)
|
||||
const config = createConfig({ hasClaude: true })
|
||||
|
||||
// #when generateModelConfig is called
|
||||
const result = generateModelConfig(config)
|
||||
|
||||
// #then librarian should use opencode/minimax-m2.5-free (always first in chain)
|
||||
expect(result.agents?.librarian?.model).toBe("opencode/minimax-m2.5-free")
|
||||
// #then librarian should use generic chain result when chain providers are unavailable
|
||||
expect(result.agents?.librarian?.model).toBe("anthropic/claude-sonnet-4-5")
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user