You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Desktop app model picker never lists BYOK providers from providers.json (CLI does) #954
BYOK providers declared in ~/.commandcode/providers.json load in the CLI but are completely invisible in the desktop app model picker. The config is valid; the desktop never reads it.
Repro
Declare a BYOK provider in ~/.commandcode/providers.json (tested with OpenCode Go: baseURL: https://opencode.ai/zen/v1, wire openai-completions, plus per-model "api": "openai-responses" overrides).
Store the key in ~/.commandcode/auth.json under the provider id.
CLI:cmd --list-models lists all 28 provider models under an OpenCode Go (byok) heading, with no config warnings. A real call succeeds: cmd -p "..." --model opencode-go/deepseek-v4.1-flash.
Desktop: open the model picker (/model or Option+P). The Go models are absent. Only the hardcoded Command Code catalog is listed.
Root cause
fetchModels() in out/main/index.js builds the picker from getModelGroupsInOrder() → getAllModelOptions() → MODEL_OPTIONS, plus the static CMD_PROVIDER_REGISTRY. The harness code that reads the user providers file (loadProvidersConfig / createDeclarativeProviderModules) is not referenced anywhere in the desktop bundle — 0 occurrences, vs. 8 providers.json and 32 byok references elsewhere in the same file.
So the desktop picker can never surface a declarative provider, regardless of config. This is not a stale-cache or restart issue: the harness does support BYOK, and the desktop ships that same harness as a dependency.
Worth noting the boundary is narrow: the desktop does delegate agent turns to the CLI (ipcMain.handle("spawn-cli") → runAgentTurn, passing -m). A BYOK model would therefore run correctly if the picker could select one — the gap is specifically the hardcoded catalog, not the run path.
Requested behavior
Merge declarative BYOK providers into the desktop model list, grouped under their own heading, with the active session switchable to them — matching /model in the CLI.
Activity