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
tui: /model search no longer matches provider names #60851
In the TUI /model picker, typing a provider name (for example opencode or a custom provider id) no longer lists that provider's models. Only model titles match.
useConnected() in packages/tui/src/component/use-connected.tsx calls data.location.integration.list() with no location ref, so it reads the default location's list instead of the TUI's current location. It gets [], connected() is false, the option category (the provider name) is undefined, and fuzzysort has nothing to match on except the title. The other lists in the picker already pass location.ref.
Thanks for the detailed write-up and for pointing at useConnected(). I couldn't reproduce this on 2.2.0, though.
What I tried, with a connected provider whose name doesn't appear in its model's title:
Opened the TUI, ran /models and typed the provider name: its model was listed, and the provider headers were shown.
Ran /cd into another directory and repeated the search: it still matched.
You're right that useConnected() calls data.location.integration.list() without location.ref, unlike the other lists in the picker (#60591 changes this). In my runs it didn't matter, because the default location's integration list also had the connection. The bug would only show when the default location's list is empty, so something in your setup is probably different. Could you tell us:
How you start OpenCode: plain opencode in the project, -c/-s to open an existing session, --server, --standalone, or the background service?
Whether the session or directory you're in differs from where you launched it (for example after /cd, opening a session from another project, or using workspaces).
How the provider is connected: /connect with an API key or OAuth, an environment variable, or a custom provider in opencode.json (global or project-level)?
Whether the /models list shows provider group headers when the search box is empty.
Thanks for checking. I can't reproduce it now either: the same 2.2.0 binary matches provider names again, so it looks state-dependent.
Plain opencode (sometimes through a wrapper that only sets OPENCODE_CONFIG), attached to the background service. When it broke, the service had just been started after a reboot by the first client, from a different directory than the one I later opened.
Possibly: I move between projects a lot, and I can't say for sure whether that session was opened from another directory.
Both: custom providers in the global opencode.json (no /connect), and others connected with /connect and an API key.
Not sure for the broken state. Now, with search working, the empty list shows no group headers.
Since #60591 also makes useConnected() read the current location, I'm happy to close this PR in favour of it. I'll report back with exact steps if it happens again.
We haven't heard back, so I'm closing this for now as not planned.
On 2.2.0, searching by provider name in /models worked for me with a connected provider, both in the default location and after /cd. The missing location.ref in useConnected() is real, but it only causes this symptom when the default location's integration list is empty. To find out how that happens in your setup, I asked how you start OpenCode, which location or session you're in, and how the provider is connected.
If it still happens, please reply with those details and we can reopen this. Related: #60590 / #60591, which also makes use-connected read the current location.
Activity
opencodejr commentedon Oct 31, 2026
Thanks for the detailed write-up and for pointing at
useConnected(). I couldn't reproduce this on 2.2.0, though.What I tried, with a connected provider whose name doesn't appear in its model's title:
/modelsand typed the provider name: its model was listed, and the provider headers were shown./cdinto another directory and repeated the search: it still matched.You're right that
useConnected()callsdata.location.integration.list()withoutlocation.ref, unlike the other lists in the picker (#60591 changes this). In my runs it didn't matter, because the default location's integration list also had the connection. The bug would only show when the default location's list is empty, so something in your setup is probably different. Could you tell us:opencodein the project,-c/-sto open an existing session,--server,--standalone, or the background service?/cd, opening a session from another project, or using workspaces)./connectwith an API key or OAuth, an environment variable, or a custom provider inopencode.json(global or project-level)?/modelslist shows provider group headers when the search box is empty.Related:
use-connectedread the current location./modelpicker empty with a custom openai-compatible provider on 2.2.3.YamineRL commentedon Oct 31, 2026
Thanks for checking. I can't reproduce it now either: the same 2.2.0 binary matches provider names again, so it looks state-dependent.
opencode(sometimes through a wrapper that only setsOPENCODE_CONFIG), attached to the background service. When it broke, the service had just been started after a reboot by the first client, from a different directory than the one I later opened.opencode.json(no/connect), and others connected with/connectand an API key.Since #60591 also makes
useConnected()read the current location, I'm happy to close this PR in favour of it. I'll report back with exact steps if it happens again.Tarquinen commentedon Nov 2, 2026
Thanks for checking! Since this no longer reproduces, I'm closing this issue. If it happens again, please open a new issue with the steps.
— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊
opencodejr commentedon Nov 3, 2026
We haven't heard back, so I'm closing this for now as not planned.
On 2.2.0, searching by provider name in
/modelsworked for me with a connected provider, both in the default location and after/cd. The missinglocation.refinuseConnected()is real, but it only causes this symptom when the default location's integration list is empty. To find out how that happens in your setup, I asked how you start OpenCode, which location or session you're in, and how the provider is connected.If it still happens, please reply with those details and we can reopen this. Related: #60590 / #60591, which also makes
use-connectedread the current location.