test(cli): align librarian fallback expectations with actual resolution

This commit is contained in:
YeonGyu-Kim
2026-02-21 03:10:29 +09:00
parent 9059a4fdbc
commit 97a48995b2
2 changed files with 8 additions and 8 deletions
+5 -5
View File
@@ -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")
})
})