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:
YeonGyu-Kim
2026-03-14 13:46:26 +09:00
parent b63082a3bb
commit 532995bb51
11 changed files with 276 additions and 355 deletions
@@ -74,6 +74,13 @@ describe("applyAgentConfig builtin override protection", () => {
mode: "subagent",
}
const builtinAtlasConfig: AgentConfig = {
name: "atlas",
prompt: "atlas prompt",
mode: "all",
model: "openai/gpt-5.4",
}
const sisyphusJuniorConfig: AgentConfig = {
name: "Sisyphus-Junior",
prompt: "junior prompt",
@@ -85,6 +92,7 @@ describe("applyAgentConfig builtin override protection", () => {
sisyphus: builtinSisyphusConfig,
oracle: builtinOracleConfig,
"multimodal-looker": builtinMultimodalLookerConfig,
atlas: builtinAtlasConfig,
})
createSisyphusJuniorAgentSpy = spyOn(
@@ -255,4 +263,19 @@ describe("applyAgentConfig builtin override protection", () => {
})
})
})
test("passes the resolved Atlas model to Sisyphus-Junior as its fallback default", async () => {
// given
// when
await applyAgentConfig({
config: createBaseConfig(),
pluginConfig: createPluginConfig(),
ctx: { directory: "/tmp" },
pluginComponents: createPluginComponents(),
})
// then
expect(createSisyphusJuniorAgentSpy).toHaveBeenCalledWith(undefined, "openai/gpt-5.4", false)
})
})