From 9f07aae0a19493a8aca16a5207841864c05e02bf Mon Sep 17 00:00:00 2001 From: sisyphus-dev-ai Date: Wed, 14 Jan 2026 02:25:04 +0000 Subject: [PATCH] feat(config): implement Copilot fallback in model assignment logic Update generateOmoConfig to use GitHub Copilot models as fallback when native providers are unavailable. - Sisyphus: claude-opus-4-5 > github-copilot/claude-opus-4.5 > glm-4.7-free - Oracle: gpt-5.2 > github-copilot/gpt-5.2 > claude-opus-4-5 > glm-4.7-free - Add Copilot detection in detectCurrentConfig from agent models Addresses #762 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus --- src/cli/config-manager.ts | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/cli/config-manager.ts b/src/cli/config-manager.ts index dbf01534..29ea1879 100644 --- a/src/cli/config-manager.ts +++ b/src/cli/config-manager.ts @@ -270,7 +270,9 @@ export function generateOmoConfig(installConfig: InstallConfig): Record> = {} if (!installConfig.hasClaude) { - agents["Sisyphus"] = { model: "opencode/glm-4.7-free" } + agents["Sisyphus"] = { + model: installConfig.hasCopilot ? "github-copilot/claude-opus-4.5" : "opencode/glm-4.7-free", + } } agents["librarian"] = { model: "opencode/glm-4.7-free" } @@ -286,9 +288,12 @@ export function generateOmoConfig(installConfig: InstallConfig): Record agent?.model?.startsWith("github-copilot/") + ) + result.hasCopilot = hasAnyCopilotModel + } catch { /* intentionally empty - malformed omo config returns defaults from opencode config detection */ }