GeezerVison is showing github.com — desktop 2.2.0: model picker hides auto-discovered Ollama provider despite /api/model containing its models · Issue #60672 · anomalyco/opencode
desktop 2.2.0: model picker hides auto-discovered Ollama provider despite /api/model containing its models #60672DescriptionSummary
The desktop app's "Select model" dialog omits the auto-discovered ollama provider group entirely (and does not include its models in in-dialog search), even though the same server the dialog runs against returns the Ollama models from the exact same API query the picker uses. The composer's model trigger, by contrast, correctly shows the Ollama model as the active default. As a result, users with local (Ollama / LM Studio / vLLM) models cannot browse or pick them from the model selection dialog; setting the model only works if the server default points to it or it is set via API.
Environment
- opencode version: 2.2.0 (desktop app
ai.opencode.desktop, Electron; bundled CLI opencode-cli.exe 2.2.0)
- OS: Windows 11 Home (Windows_NT 10.0.26100, win32 x64, build 26100)
- Terminal: desktop app (Electron webview); report skill snapshot showed TERM=xterm-256color, cmd.exe shell
- Install/channel: latest (public desktop release)
- Active plugins: none configured (default;
opencode.provider.ollama discovery plugin untouched)
Local stack: Ollama 0.40.13 running at http://127.0.0.1:11434 with three chat models pulled (one family qwen3moe, one llama, one HF GGUF), all reporting completion and tools capabilities via /api/show.
Reproduction
- Install OpenCode Desktop (2.2.0) on Windows and install/run Ollama locally with at least one chat model pulled.
- Open the app, open a session, and use the model picker (in-dialog: "Seleziona modello" / "Select model").
- Observe: the dialog lists only the groups
OpenCode (free models), Alibaba, and Alibaba (China). There is no Ollama group and the dialog's internal search ("Cerca modelli") finds nothing for a string unique to the local models (e.g. searching qwen3 matches only unrelated Alibaba catalog entries, not the local qwen3-coder:30b).
Expected Behavior
The "Select model" dialog should include the discovered ollama provider group with its local models, consistent with the docs: "OpenCode probes http://127.0.0.1:11434, discovers completion models, and adds them to /models without an account connection" — and consistent with what /api/model already returns to the same client.
Actual Behavior
GET /api/model?location[directory]=<project dir> (the same location-scoped query the picker makes) returns 98 models including the 3 Ollama models at providerID: "ollama" (verified with an in-page fetch() from the app's own webview, with accept: application/json, HTTP 200).
- The composer model trigger shows
Ollama / qwen3-coder:30b as the active default (so the selection state resolves the Ollama model fine).
- The "Select model" dialog, rebuilt fresh (dialog closed and reopened, page reloaded, app process restarted, background service restarted), shows only groups
OpenCode, Alibaba, Alibaba (China) — each with a small per-group subset (6 items) rather than the full fetched catalog — and no Ollama group.
GET /api/provider lists alibaba, opencode, alibaba-cn, ollama (ollama activation: "enabled"), so the provider is known to the dialog's data source.
Additional findings:
- Clicking the
← / → affordances at the bottom of the dialog does not page to further providers.
- Adding an explicit
providers.ollama.models block in the global config (with name and limit values) and reloading config did not make the group appear in the dialog.
- Functionally the model still works once selected: setting the session model server-side (
POST /api/session/{id}/model with {"model":{"providerID":"ollama","id":"qwen3-coder:30b"}}) works, and the model performs structured tool calls normally. So this is purely a picker/listing visibility defect.
Additional Context
Evidence summary (all from the same running service, same session, minutes apart):
| Probe |
Result |
In-page fetch('/api/model?location[directory]=...') |
98 models, providers {opencode:8, alibaba:39, alibaba-cn:48, ollama:3}, incl. qwen3-coder:30b, hf.co/...SecGPT-7B...Q6_K, llama3.2:3b |
Same query via CLI opencode api get (authenticated) |
includes ollama provider models |
| Dialog DOM (fresh rebuild after app restart) |
groups: OpenCode, Alibaba, Alibaba (China) only; per-group list appears truncated (6 items vs 39 cataloged for Alibaba) |
Dialog search qwen3 |
only Alibaba catalog matches; local qwen3-coder:30b absent |
Hypothesis: the dialog builds its provider groups from a filtered/curated subset of the fetched catalog (possibly models.dev-based "featured" providers only) rather than from the full /api/model payload, and local runtime providers (ollama/lmstudio/vllm) are dropped during that client-side aggregation. Alternatively the per-provider group rendering caps at the first N entries of some pre-aggregated list where Ollama sorts beyond the cap. The truncated per-group lists (6 items for a 39-model catalog) suggests the aggregation happens before rendering, so the Ollama entries likely never make it into the picker's data at all.
Work-arounds tried that did NOT fix picker visibility: app/process restart, background service restart, config reload, explicit providers.ollama.models in global config.
Work-around that DOES let the user switch models: change the global model default in config (new sessions) or set the session model through the API. Activityopencodejr commented on Oct 30, 2026 Thanks for the very thorough report. I think this is a duplicate of #50726. Another user confirmed that issue for the auto-discovered Ollama provider on desktop 2.2.0, with the same symptoms you describe.
What's happening: discovered Ollama models (and config models without a release date) come back from /api/model with time.released: 0. The app read that as the release date 1970-01-01. The picker hides models released more than six months ago by default, and its search only covers visible models. So the Ollama models never appeared, even though the composer could show the selected one. The same filter explains why each group showed only a few models.
#50726 was closed today by a change that treats an unknown release date as unknown instead of 1970 (#60496). It is on dev but not in a release yet (it is not in v2.2.4). Until then, this workaround from #50726 should make the models show up: give each model an explicit release date in your global config, then reload:
"providers": {
"ollama": {
"models": {
"qwen3-coder:30b": { "releaseDate": "2026-10-01" }
}
}
}
Possible duplicates and related issues, ordered from most to least likely:
The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different.
alessiosonaglio commented on Oct 30, 2026 Confirmed as a duplicate — thanks for the excellent diagnosis.
After seeing the release-date filter explanation, I rechecked my /api/model captures and they match exactly: the three Ollama entries (qwen3-coder:30b, SecGPT-7B, llama3.2:3b) all come back with time.released: 0, which the picker reads as 1970-01-01 and hides under the 6-month cutoff. It also explains everything I couldn't figure out in my report, including:
- the composer still resolving the correct Ollama default (selection isn't filtered),
- each group showing only a small subset of the catalog (those had recent release dates),
- my earlier workaround attempt failing: I had added explicit
providers.ollama.models entries with name/limit but without releaseDate, so those models didn't get a recent date from config and the filter still hid them — the missing key here was releaseDate specifically.
The workaround from #50726 (releaseDate per model in global config, then reload) is verified working on my setup too.
Happy to have this closed as a duplicate of #50726 (fixed by #60496). I'll remove the releaseDate workaround block once a release after v2.2.4 ships it. opencodejr commented on Oct 31, 2026 Closing this as a duplicate of #50726, since there's been no reply showing it's a different problem. Local Ollama models were hidden in the desktop model picker because their unknown release date was read as 1970, so the picker treated them as old models. The fix (#60496) is on dev but not in a release yet. Until it ships, setting releaseDate for each model under providers.ollama.models in your config should make them show up. If you still see this after updating to a release that includes the fix, please reply here and we can reopen it. Thanks again for the detailed report.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|