Summary
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.
Two adjacent gaps, for whoever picks this up:
Environment
- command-code (CLI) 1.69.0
- Command Code Desktop 0.1.42 (macOS, arm64)
- Both read the same
~/.commandcode/providers.json
Config used is available on request.
Summary
BYOK providers declared in
~/.commandcode/providers.jsonload in the CLI but are completely invisible in the desktop app model picker. The config is valid; the desktop never reads it.Repro
~/.commandcode/providers.json(tested with OpenCode Go:baseURL: https://opencode.ai/zen/v1, wireopenai-completions, plus per-model"api": "openai-responses"overrides).~/.commandcode/auth.jsonunder the provider id.cmd --list-modelslists all 28 provider models under anOpenCode Go (byok)heading, with no config warnings. A real call succeeds:cmd -p "..." --model opencode-go/deepseek-v4.1-flash./modelorOption+P). The Go models are absent. Only the hardcoded Command Code catalog is listed.Root cause
fetchModels()inout/main/index.jsbuilds the picker fromgetModelGroupsInOrder()→getAllModelOptions()→MODEL_OPTIONS, plus the staticCMD_PROVIDER_REGISTRY. The harness code that reads the user providers file (loadProvidersConfig/createDeclarativeProviderModules) is not referenced anywhere in the desktop bundle — 0 occurrences, vs. 8providers.jsonand 32byokreferences 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
/modelin the CLI.Two adjacent gaps, for whoever picks this up:
cmd#879.Environment
~/.commandcode/providers.jsonConfig used is available on request.