fix(model-fallback): align OpenAI fallback resolution across CLI and runtime
Keep install-time and runtime model tables in sync, stop OpenAI-only misrouting when OpenCode Go is present, and add valid OpenAI fallbacks for atlas, metis, and sisyphus-junior. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -178,6 +178,13 @@ describe("AGENT_MODEL_REQUIREMENTS", () => {
|
||||
expect(primary.model).toBe("claude-opus-4-6")
|
||||
expect(primary.providers).toEqual(["anthropic", "github-copilot", "opencode"])
|
||||
expect(primary.variant).toBe("max")
|
||||
|
||||
const openAiFallback = metis.fallbackChain.find((entry) => entry.providers.includes("openai"))
|
||||
expect(openAiFallback).toEqual({
|
||||
providers: ["openai", "github-copilot", "opencode"],
|
||||
model: "gpt-5.4",
|
||||
variant: "high",
|
||||
})
|
||||
})
|
||||
|
||||
test("momus has valid fallbackChain with gpt-5.4 as primary", () => {
|
||||
@@ -213,6 +220,32 @@ describe("AGENT_MODEL_REQUIREMENTS", () => {
|
||||
const secondary = atlas.fallbackChain[1]
|
||||
expect(secondary.model).toBe("kimi-k2.5")
|
||||
expect(secondary.providers[0]).toBe("opencode-go")
|
||||
|
||||
const tertiary = atlas.fallbackChain[2]
|
||||
expect(tertiary).toEqual({
|
||||
providers: ["openai", "github-copilot", "opencode"],
|
||||
model: "gpt-5.4",
|
||||
variant: "medium",
|
||||
})
|
||||
})
|
||||
|
||||
test("sisyphus-junior has an OpenAI fallback before big-pickle", () => {
|
||||
// given - sisyphus-junior agent requirement
|
||||
const sisyphusJunior = AGENT_MODEL_REQUIREMENTS["sisyphus-junior"]
|
||||
|
||||
// when - locating the OpenAI fallback entry
|
||||
const openAiFallback = sisyphusJunior.fallbackChain.find((entry) => entry.providers.includes("openai"))
|
||||
const openAiFallbackIndex = sisyphusJunior.fallbackChain.findIndex((entry) => entry.providers.includes("openai"))
|
||||
const bigPickleIndex = sisyphusJunior.fallbackChain.findIndex((entry) => entry.model === "big-pickle")
|
||||
|
||||
// then
|
||||
expect(openAiFallback).toEqual({
|
||||
providers: ["openai", "github-copilot", "opencode"],
|
||||
model: "gpt-5.4",
|
||||
variant: "medium",
|
||||
})
|
||||
expect(openAiFallbackIndex).toBeGreaterThan(-1)
|
||||
expect(bigPickleIndex).toBeGreaterThan(openAiFallbackIndex)
|
||||
})
|
||||
|
||||
test("hephaestus supports openai, github-copilot, venice, and opencode providers", () => {
|
||||
|
||||
@@ -121,6 +121,11 @@ export const AGENT_MODEL_REQUIREMENTS: Record<string, ModelRequirement> = {
|
||||
model: "claude-opus-4-6",
|
||||
variant: "max",
|
||||
},
|
||||
{
|
||||
providers: ["openai", "github-copilot", "opencode"],
|
||||
model: "gpt-5.4",
|
||||
variant: "high",
|
||||
},
|
||||
{ providers: ["opencode-go"], model: "glm-5" },
|
||||
{ providers: ["kimi-for-coding"], model: "k2p5" },
|
||||
],
|
||||
@@ -149,12 +154,22 @@ export const AGENT_MODEL_REQUIREMENTS: Record<string, ModelRequirement> = {
|
||||
fallbackChain: [
|
||||
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" },
|
||||
{ providers: ["opencode-go"], model: "kimi-k2.5" },
|
||||
{
|
||||
providers: ["openai", "github-copilot", "opencode"],
|
||||
model: "gpt-5.4",
|
||||
variant: "medium",
|
||||
},
|
||||
],
|
||||
},
|
||||
"sisyphus-junior": {
|
||||
fallbackChain: [
|
||||
{ providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6" },
|
||||
{ providers: ["opencode-go"], model: "kimi-k2.5" },
|
||||
{
|
||||
providers: ["openai", "github-copilot", "opencode"],
|
||||
model: "gpt-5.4",
|
||||
variant: "medium",
|
||||
},
|
||||
{ providers: ["opencode"], model: "big-pickle" },
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user