feat(explore): add github-copilot/gpt-5-mini to fallback chain (#1091)

* feat(explore): add github-copilot/gpt-5-mini to fallback chain

* test(explore): add tests for github-copilot/gpt-5-mini fallback

---------

Co-authored-by: Suyeol Jeon <devxoul@gmail.com>
This commit is contained in:
YeonGyu-Kim 2026-01-25 14:53:11 +09:00 committed by GitHub
parent 208af055ef
commit b55fd8d76f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 29 additions and 6 deletions

View File

@ -712,7 +712,7 @@ exports[`generateModelConfig fallback providers uses GitHub Copilot models when
"model": "github-copilot/claude-sonnet-4.5",
},
"explore": {
"model": "opencode/gpt-5-nano",
"model": "github-copilot/gpt-5-mini",
},
"librarian": {
"model": "github-copilot/claude-sonnet-4.5",
@ -776,7 +776,7 @@ exports[`generateModelConfig fallback providers uses GitHub Copilot models with
"model": "github-copilot/claude-sonnet-4.5",
},
"explore": {
"model": "opencode/gpt-5-nano",
"model": "github-copilot/gpt-5-mini",
},
"librarian": {
"model": "github-copilot/claude-sonnet-4.5",
@ -1022,7 +1022,7 @@ exports[`generateModelConfig mixed provider scenarios uses OpenAI + Copilot comb
"model": "github-copilot/claude-sonnet-4.5",
},
"explore": {
"model": "opencode/gpt-5-nano",
"model": "github-copilot/gpt-5-mini",
},
"librarian": {
"model": "github-copilot/claude-sonnet-4.5",

View File

@ -353,6 +353,17 @@ describe("generateModelConfig", () => {
// #then explore should use gpt-5-nano (fallback)
expect(result.agents?.explore?.model).toBe("opencode/gpt-5-nano")
})
test("explore uses gpt-5-mini when only Copilot available", () => {
// #given only Copilot is available
const config = createConfig({ hasCopilot: true })
// #when generateModelConfig is called
const result = generateModelConfig(config)
// #then explore should use gpt-5-mini (Copilot fallback)
expect(result.agents?.explore?.model).toBe("github-copilot/gpt-5-mini")
})
})
describe("Sisyphus agent special cases", () => {

View File

@ -139,12 +139,14 @@ export function generateModelConfig(config: InstallConfig): GeneratedOmoConfig {
continue
}
// Special case: explore uses Claude haiku → OpenCode gpt-5-nano
// Special case: explore uses Claude haiku → GitHub Copilot gpt-5-mini → OpenCode gpt-5-nano
if (role === "explore") {
if (avail.native.claude) {
agents[role] = { model: "anthropic/claude-haiku-4-5" }
} else if (avail.opencodeZen) {
agents[role] = { model: "opencode/claude-haiku-4-5" }
} else if (avail.copilot) {
agents[role] = { model: "github-copilot/gpt-5-mini" }
} else {
agents[role] = { model: "opencode/gpt-5-nano" }
}

View File

@ -59,14 +59,23 @@ describe("AGENT_MODEL_REQUIREMENTS", () => {
const explore = AGENT_MODEL_REQUIREMENTS["explore"]
// #when - accessing explore requirement
// #then - fallbackChain exists with claude-haiku-4-5 as first entry
// #then - fallbackChain exists with claude-haiku-4-5 as first entry, gpt-5-mini as second, gpt-5-nano as third
expect(explore).toBeDefined()
expect(explore.fallbackChain).toBeArray()
expect(explore.fallbackChain.length).toBeGreaterThan(0)
expect(explore.fallbackChain).toHaveLength(3)
const primary = explore.fallbackChain[0]
expect(primary.providers).toContain("anthropic")
expect(primary.providers).toContain("opencode")
expect(primary.model).toBe("claude-haiku-4-5")
const secondary = explore.fallbackChain[1]
expect(secondary.providers).toContain("github-copilot")
expect(secondary.model).toBe("gpt-5-mini")
const tertiary = explore.fallbackChain[2]
expect(tertiary.providers).toContain("opencode")
expect(tertiary.model).toBe("gpt-5-nano")
})
test("multimodal-looker has valid fallbackChain with gemini-3-flash as primary", () => {

View File

@ -35,6 +35,7 @@ export const AGENT_MODEL_REQUIREMENTS: Record<string, ModelRequirement> = {
explore: {
fallbackChain: [
{ providers: ["anthropic", "opencode"], model: "claude-haiku-4-5" },
{ providers: ["github-copilot"], model: "gpt-5-mini" },
{ providers: ["opencode"], model: "gpt-5-nano" },
],
},