feat(model-requirements): add k2p5, kimi-k2.5, gpt-5.4 medium to Sisyphus fallback chain

Sisyphus can now fall back through Kimi and OpenAI models when Claude
is unavailable, enabling OpenAI-only users to use Sisyphus directly
instead of being redirected to Hephaestus.

Runtime chain: claude-opus-4-6 max → k2p5 → kimi-k2.5 → gpt-5.4 medium → glm-5 → big-pickle
CLI chain: claude-opus-4-6 max → k2p5 → gpt-5.4 medium → glm-5
This commit is contained in:
YeonGyu-Kim
2026-03-07 19:23:08 +09:00
parent bf8d0ffcc0
commit 60bc9a7609
12 changed files with 55 additions and 19 deletions
+3 -3
View File
@@ -124,8 +124,8 @@ describe("resolveVariantForModel", () => {
expect(variant).toBe("medium")
})
test("returns undefined for provider not in sisyphus chain", () => {
// #given openai is not in sisyphus fallback chain anymore
test("returns medium for openai/gpt-5.4 in sisyphus chain", () => {
// #given openai/gpt-5.4 is now in sisyphus fallback chain with variant medium
const config = {} as OhMyOpenCodeConfig
const model = { providerID: "openai", modelID: "gpt-5.4" }
@@ -133,7 +133,7 @@ describe("resolveVariantForModel", () => {
const variant = resolveVariantForModel(config, "sisyphus", model)
// then
expect(variant).toBeUndefined()
expect(variant).toBe("medium")
})
test("returns undefined for provider not in chain", () => {
+16 -4
View File
@@ -23,15 +23,15 @@ describe("AGENT_MODEL_REQUIREMENTS", () => {
expect(primary.variant).toBe("high")
})
test("sisyphus has claude-opus-4-6 as primary and requiresAnyModel", () => {
test("sisyphus has claude-opus-4-6 as primary with k2p5, kimi-k2.5, gpt-5.4 medium fallbacks", () => {
// #given - sisyphus agent requirement
const sisyphus = AGENT_MODEL_REQUIREMENTS["sisyphus"]
// #when - accessing Sisyphus requirement
// #then - fallbackChain has claude-opus-4-6 first, big-pickle last
// #then - fallbackChain has 6 entries with correct ordering
expect(sisyphus).toBeDefined()
expect(sisyphus.fallbackChain).toBeArray()
expect(sisyphus.fallbackChain).toHaveLength(3)
expect(sisyphus.fallbackChain).toHaveLength(6)
expect(sisyphus.requiresAnyModel).toBe(true)
const primary = sisyphus.fallbackChain[0]
@@ -39,7 +39,19 @@ describe("AGENT_MODEL_REQUIREMENTS", () => {
expect(primary.model).toBe("claude-opus-4-6")
expect(primary.variant).toBe("max")
const last = sisyphus.fallbackChain[2]
const second = sisyphus.fallbackChain[1]
expect(second.providers).toEqual(["kimi-for-coding"])
expect(second.model).toBe("k2p5")
const third = sisyphus.fallbackChain[2]
expect(third.model).toBe("kimi-k2.5")
const fourth = sisyphus.fallbackChain[3]
expect(fourth.providers).toContain("openai")
expect(fourth.model).toBe("gpt-5.4")
expect(fourth.variant).toBe("medium")
const last = sisyphus.fallbackChain[5]
expect(last.providers[0]).toBe("opencode")
expect(last.model).toBe("big-pickle")
})
+13
View File
@@ -20,6 +20,19 @@ export const AGENT_MODEL_REQUIREMENTS: Record<string, ModelRequirement> = {
model: "claude-opus-4-6",
variant: "max",
},
{ providers: ["kimi-for-coding"], model: "k2p5" },
{
providers: [
"opencode",
"moonshotai",
"moonshotai-cn",
"firmware",
"ollama-cloud",
"aihubmix",
],
model: "kimi-k2.5",
},
{ providers: ["openai", "github-copilot", "opencode"], model: "gpt-5.4", variant: "medium" },
{ providers: ["zai-coding-plan", "opencode"], model: "glm-5" },
{ providers: ["opencode"], model: "big-pickle" },
],