[Contribution] OpenCode Go profile shows only 8 models in the picker after restart (all 24 appear only after /login)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 19.9k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 30
Description
Summary
When jcode restarts, the model picker shows only 8 models for the OpenCode Go provider. After running /login again, all 24 models appear. This happens with a setup where OpenCode Go and OpenCode Zen are both configured as OpenAI-compatible profiles.
Environment
• jcode (local build from source, master at time of report)
• Providers configured: opencode-go and opencode-zen (OpenAI-compatible profiles)
Steps to reproduce
- Configure both opencode-go and opencode-zen as OpenAI-compatible providers.
- Restart jcode.
- Open the model picker immediately.
- Observe that OpenCode Go lists only its 8 exclusive models, instead of all 24.
Expected behavior
OpenCode Go should show all 24 models right after restart, without needing to log in again.
Actual behavior
Only 8 models are listed under OpenCode Go until the user runs /login, after which the full catalog appears (38 entries in the picker, 24 attributed to OpenCode Go).
Root cause
At TUI startup the picker opens before the server’s detailed route frame arrives, so it falls back to the names-only classification in remote_model_routes_fallback (crates/jcode-base/src/provider/catalog_routes.rs). That fallback attributed each shared model to the first configured profile in catalog iteration order. Because OpenCode Zen is iterated before OpenCode Go, the 16 models served by both catalogs (glm-5, kimi-k2.5, …) were labeled “OpenCode Zen”, leaving OpenCode Go with only its 8 exclusive models. After /login the detailed server routes mask the issue, which is why the full catalog only appeared once the user logged in again.
Fix
Commit 77426ba — fix(provider): prefer active openai-compatible profile in remote fallback routes.
Route classification now prefers the active provider’s own profile when its catalog lists the model, while still emitting the sibling profile’s route so models served by two endpoints stay selectable on both. The public remote_openai_compatible_route_for_model keeps its previous no-preference semantics.
Verification
After the fix, all 24 models attribute to OpenCode Go (was 8), and shared models remain selectable under OpenCode Zen as well. Simulated against the real cached catalogs and verified with the picker log (model_picker_open showing opencode_go >= 24 at startup).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in crates/jcode-base/src/provider/catalog_routes.rs and inspect commit 77426ba, which contains the reported fix. Verify the startup picker with OpenCode Go and OpenCode Zen configured: all 24 Go models should appear immediately, while shared models remain selectable under Zen.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- ai, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100