Merge pull request #3169 from code-yeongyu/fix/sisyphus-junior-model

fix(model-fallback): respect user model override for sisyphus-junior category sessions (#2941)
This commit is contained in:
YeonGyu-Kim
2026-04-07 15:14:09 +09:00
committed by GitHub
6 changed files with 222 additions and 4 deletions
@@ -484,4 +484,32 @@ describe("resolveCategoryExecution", () => {
})
expect(result.fallbackChain).toBeUndefined()
})
test("does not inherit hardcoded fallbackChain when sisyphus-junior model override is set [regression #2941]", async () => {
//#given
const args = {
category: "quick",
prompt: "test prompt",
description: "Test task",
run_in_background: false,
load_skills: [],
blockedBy: undefined,
enableSkillTools: false,
}
const executorCtx = createMockExecutorContext()
executorCtx.sisyphusJuniorModel = "anthropic/claude-sonnet-4-6"
//#when
const result = await resolveCategoryExecution(args, executorCtx, undefined, "anthropic/claude-sonnet-4-6")
//#then
expect(result.error).toBeUndefined()
expect(result.actualModel).toBe("anthropic/claude-sonnet-4-6")
expect(result.categoryModel).toEqual({
providerID: "anthropic",
modelID: "claude-sonnet-4-6",
variant: undefined,
})
expect(result.fallbackChain).toBeUndefined()
})
})
+1 -1
View File
@@ -275,6 +275,6 @@ Available categories: ${categoryNames.join(", ")}`,
actualModel,
isUnstableAgent,
// Don't use hardcoded fallback chain when resolution was skipped (cold cache)
fallbackChain: configuredFallbackChain ?? ((isModelResolutionSkipped || explicitCategoryModel) ? undefined : requirement?.fallbackChain),
fallbackChain: configuredFallbackChain ?? ((isModelResolutionSkipped || explicitCategoryModel || overrideModel) ? undefined : requirement?.fallbackChain),
}
}
+1
View File
@@ -2963,6 +2963,7 @@ describe("sisyphus-task", () => {
// then - sisyphus-junior override model should be used, not category default
expect(launchInput.model.providerID).toBe("anthropic")
expect(launchInput.model.modelID).toBe("claude-sonnet-4-6")
expect(launchInput.fallbackChain).toBeUndefined()
})
test("sisyphus-junior model override works with user-defined category (#1295)", async () => {