Repository navigation
Description
Summary
Custom Ollama-backed providers defined in the global config are present in the server catalog (/api/model) and are printed by opencode models, but they do not appear in the TUI /models model dialog.
Environment
- opencode version: v2.4.0
- OS: Darwin 27.2.0 (darwin arm64)
- Terminal: Apple_Terminal,
TERM=xterm-256color,COLORTERM=truecolor - Shell: /bin/zsh
- Install/channel: latest
- Active plugins: none found in config;
opencode plugin listreports "No plugins found"
Reproduction
-
In
~/.config/opencode/opencode.json, define providers such as:{ "providers": { "ollama": { "name": "Ollama (host A)", "package": "aisdk:@ai-sdk/openai-compatible", "settings": { "baseURL": "http://<host-a>:11434/v1" }, "models": { "ta:engineer": { "name": "TA Engineer (Coding)" } } }, "ollama-iride": { "name": "Ollama (host B)", "package": "aisdk:@ai-sdk/openai-compatible", "settings": { "baseURL": "http://<host-b>:11434/v1" }, "models": { "iride:engineer": { "name": "Iride Engineer (Coding)" } } } } }Both endpoints are reachable and return HTTP 200 from
/api/tags. -
Launch the full-screen TUI with
opencode(no--standaloneor--server). -
Run
/models(orCtrl+X, thenM). -
Observe that only
opencode/*models are offered; noollama/*orollama-iride/*entries. -
In another terminal, run
opencode models: all 11 Ollama models are listed. -
opencode api get /api/modelreturns the same 11 models withenabled: trueandstatus: active.
Expected Behavior
/models should offer the same enabled models that opencode models and /api/model return, including the configured Ollama models.
Actual Behavior
The Ollama models are missing from the TUI model dialog. The user reports the problem still occurs. opencode models and the API show no discrepancy on the server side.
Additional Context
- Model list from
opencode models(11 entries):ollama/ta:engineer,ollama/ta:auditor,ollama/ta:architect,ollama/gemma4:12b-nvfp4,ollama/qwen3.5:9b-nvfp4, and sixollama-iride/iride:*entries. /api/model?types=chatalso returns all 11, so the models are considered chat models by the API.- The older discovery warnings in
~/.local/share/opencode/log/opencode.log(EHOSTUNREACH,ECONNREFUSED, timeouts) do not match the current state: both hosts now answer/api/tagswith HTTP 200. - The config uses the legacy-looking
aisdk:@ai-sdk/openai-compatiblepackage string; the server reports it normalized to@opencode/ai/providers/openai-compatible. - No plugins, policies, or provider-disable directives are configured.
- Hostnames/IPs and custom model names are redacted in this report.
Activity
opencodejr commentedon Nov 23, 2026
Thanks for the detailed report, and for checking
opencode modelsand/api/model. Those checks show the server side is fine.I think this is a duplicate of #60587. In v2.4.0 the TUI's "new designs" experiment is on by default. With it on,
/modelstreats you as "connected" only if an integration has a saved connection, for example from/connect. A provider defined only inopencode.json, like your two Ollama providers, doesn't create one. So the TUI opens the Free models picker, which lists only OpenCode's free models. That matches what you see: onlyopencode/*models in the dialog, while the server lists all 11 Ollama models.A possible workaround until this is fixed: turn the experiment off in
~/.config/opencode/cli.json:{ "experimental": { "new-designs": false } }In #60587, turning it off brought back the normal "Select model" dialog with the configured models.
Possible duplicates and related issues, ordered by likelihood:
/modelsshows only the free-models list (open, reproduced)I'm closing this issue now as a duplicate of #60587. Please add your details there (v2.4.0, macOS, two Ollama providers). If you do have a saved
/connectconnection, or the models are still missing withnew-designsset tofalse, then this is a different problem: reply here and the issue will reopen.mezzotokyo commentedon Nov 23, 2026
追加の切り分け結果です。
/modelsに Ollama モデルが表示されました。opencode upgrade 2.4.0 --method curlで再アップグレードし、サービスも再起動したところ、再度/modelsに Ollama モデルが表示されなくなりました。opencode modelsと/api/modelは v2.4.0 でも相変わらず 11 件の Ollama モデルを返します。このことから、v2.4.0 の TUI モデルダイアログ側の回帰である可能性が高いです。
opencodejr commentedon Nov 23, 2026
切り分けありがとうございます。v2.3.2 では表示され、v2.4.0 で表示されなくなるという結果は、前回お伝えした原因と一致します。
v2.4.0 の TUI では、「new designs」という実験的機能が、設定で
falseにしない限りオンになります。以前のバージョンでは設定でオンにする必要がありました。#60587 の報告者も、2.2.3 で自分でオンにしていました。この機能がオンで、/connectなどで保存した接続が一つもない場合、/modelsは無料モデルだけを並べる「Free models」ダイアログに切り替わります。opencode.jsonだけで定義したプロバイダー(今回の Ollama の二つ)は「接続済み」として数えられません。そのため、サーバー側(opencode modelsや/api/model)には 11 件あっても、ダイアログにはopencode/*しか出ません。つまり、ご利用の環境から見れば v2.4.0 での回帰ですが、原因は #60587 と同じなので、そちらで扱います。
修正されるまでの回避策として、
~/.config/opencode/cli.jsonで実験的機能をオフにしてみてください。#60587 では、オフにすると設定済みのモデルが再び表示されました。{ "experimental": { "new-designs": false } }この設定にしても v2.4.0 で Ollama モデルが
/modelsに表示されない場合は、別の問題ですので、ここに返信してください。その場合はこの issue が再オープンされます。表示される場合は、#60587 に「v2.3.2 では問題なく、v2.4.0 から発生した」という情報を追記していただけると助かります。mezzotokyo commentedon Nov 23, 2026
訂正・補足です。
先ほど「コンピューター再起動後に v2.3.2 で表示された」と書きましたが、再起動自体は解消条件ではありませんでした。その後確認したところ、
opencode upgrade 2.3.2 --method curlとopencode service restartだけで正常に表示されました。TUI を開き直すだけで、コンピューターの再起動は不要です。まとめると:
/modelsに Ollama モデルが表示されない(opencode models//api/modelには 11 件存在)つまり v2.4.0 の TUI 側の回帰が原因と思われます。
opencodejr commentedon Nov 23, 2026
訂正ありがとうございます。再起動は関係なく、バージョン(v2.3.2 か v2.4.0 か)だけで結果が変わるということですね。これは前回のコメントでご説明した内容と一致します。v2.4.0 の TUI では「new designs」という実験的機能が、設定で
falseにしない限りオンになります。この機能がオンで保存済みの接続がない場合、/modelsは無料モデルだけの一覧に切り替わります。原因は #60587 と同じです。v2.4.0 のまま、
~/.config/opencode/cli.jsonに次の設定を入れて TUI を開き直すと、Ollama モデルが表示されるか確認していただけますか。{ "experimental": { "new-designs": false } }表示されれば #60587 と同じ問題ですので、「v2.3.2 では問題なく、v2.4.0 から発生した」という情報を #60587 に追記していただけると助かります。この設定でも表示されない場合は、ここに返信してください。その場合はこの issue が再オープンされます。