Repository navigation
Closed
Labels
Description
Description
Summary
Custom OpenAI-compatible provider models are served by the server (model.list returns all 22, enabled: true) and work for inference (opencode run --model polza/... succeeds), but the desktop /models dialog does not list any of them — neither by browsing the full list nor by filtering with the provider name or model names.
Environment
- opencode version: 2.0.14 (desktop + bundled CLI,
resources/opencode-cli.version) - OS: Windows 10 Pro 10.0.19045 x64
- Terminal: OpenCode Desktop app (Electron TUI)
- Shell: PowerShell (irrelevant — issue is in the desktop models dialog)
- Install/channel: latest (release channel per
app-update.yml) - Active plugins: none (no
pluginsin config, no.opencode/plugin*dirs)
Reproduction
- Add a custom OpenAI-compatible provider with explicitly listed models to the global
opencode.json:{ "model": "polza/gigachat-2-pro", "providers": { "polza": { "name": "Polza", "package": "@opencode/ai/providers/openai-compatible", "settings": { "baseURL": "https://polza.ai/api/v1", "apiKey": "<redacted>" }, "models": { "gigachat-2-pro": { "modelID": "sber/gigachat-2-pro", "name": "GigaChat 2 Pro" } // ... 22 models total } } } } - Restart the desktop app (also tried: full OS reboot + deleting Electron
Cache,Code Cache,GPUCache,Session Storage). - Open
/models, scroll the whole list or filter bypolza,gigachat,qwen,grok,luna.
Expected Behavior
A Polza group (or the configured models) appears in /models and is selectable, since the server reports them as available and enabled.
Actual Behavior
No polza/* models appear in /models at all. Other (catalog) models are listed normally.
Additional Context
opencode api provider.list→polzapresent,activation: "enabled", correct package/settings.opencode api model.list→ 96 models total, all 22polza/*present withenabled: true(e.g.polza/gigachat-2-pro,polza/qwen3.8-flash).opencode run '...' --model polza/qwen3.8-flash→ succeeds, model responds. API key and endpoint are functional.- Default
"model": "polza/gigachat-2-pro"in config does not surface the models in the dialog either. - Frequency: consistent, survives app restart, OS reboot, and Electron cache purge.
- Related: config hot-reload works (
provider.updatedevents inopencode.log), no provider load errors in logs. - Workaround: switch models by editing
"model"inopencode.jsonmanually, or one-shot viaopencode run --model polza/<id>.
Plugins
No response
OpenCode version
No response
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
Windows 10
Terminal
No response
Activity
github-actions commentedon Sep 22, 2026
This issue might be a duplicate of existing issues. Please check:
released:0being coerced to a past date — potential root cause overlapIf your issue is distinct from these, please mention how it differs.
pavligd commentedon Sep 22, 2026
Update: found a workaround.
In the providers UI I disabled the
Personal / OpenCodegroup, clicked around, then re-enabled it — after that thePolzagroup appeared in/modelsand the custom models became selectable.So the data was always there (server-side
model.listreturned all 22polza/*models withenabled: trueall along); the/modelsdialog just never refreshed its list — not on config hot-reload (provider.updatedevents fire, I verified inopencode.log), not on app restart, OS reboot, or Electron cache purge. Toggling an unrelated provider forced the refresh.Looks like the dialog caches the model list on first open and doesn't invalidate it when providers/models update.
opencodejr commentedon Oct 28, 2026
Thanks for the detailed report! I was able to reproduce this on 2.0.14, and it still happens on the newest release, 2.2.0. I couldn't run the latest
devfrom source in my sandbox, so 2.2.0 is the newest version I checked.What I did:
polzaprovider using@opencode/ai/providers/openai-compatible, with two models (name+modelID, noreleaseDate) and"model": "polza/gigachat-2-pro", like your config.opencode serve:/api/modellists bothpolza/*models withenabled: true.polza,gigachatorqwengives "No model results". The screenshots below show this on both versions, and the script below automates it.A likely cause, not confirmed yet: models declared in config without a release date get a release time of
0, which the app reads as 1970-01-01. The picker hides models with a release date older than six months by default (unless they are the newest in their model family), and its search only covers visible models. That would hide these models in both places.Until this is fixed, your workarounds (setting
"model"in the config, or usingopencode run --model) should keep working, and turning these models on in Manage models may also help.Related: #59840 reports the same symptom on macOS with 2.2.0.
Reproduction script (web.mjs)
Run it:
bun web.mjssaeedyaqoob commentedon Oct 28, 2026
Same bug, but on the built-in Ollama provider (auto-discovered, not config-declared), which extends the scope beyond custom providers.
Environment
10.0.26300.9711x64http://127.0.0.1:11434with one model pulled:qwen2.5-coder:3bWhat I see
GET /api/modelreturnsollama/qwen2.5-coder:3bwithenabled: true,status: "active",capabilities.tools: true,limit.context: 32768.GET /api/providerreturnsollamawithactivation: "enabled"./modelsdialog does not list it, and searchingqwenorollamain the picker returns no results.opencode/*plus the Ollama one).Confirms the release-date hypothesis
The discovered model's
timeis{"released": 0}→ 1970-01-01.Adding an explicit release date in config:
changes
/api/modeltotime: {"released": 1793145600000}(2026-10-28), whilesettings.baseURL,capabilities.toolsandlimit.contextare preserved.So models discovered from a local provider with
released: 0are affected too, not only config-declared ones. SettingreleaseDateis a usable workaround in the meantime.Possibly related
The
ollamaentry in/api/providerhas nointegrationID, whileopencodehas"integrationID": "opencode". Not sure whether the picker's provider grouping relies on it.