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
fix(provider): auto-discover models for OpenAI-compatible providers (e.g. LM Studio) #32076
When configuring LM Studio (or other OpenAI-compatible local inference servers) as a custom provider in opencode.json, opencode does not auto-discover the list of loaded models from the GET /v1/models endpoint.
Currently only the 3 LM Studio models hardcoded in the models.dev catalog appear in the UI (GPT OSS 20B, Qwen3 30B A3B 2507, Qwen3 Coder 30B), while other models actually loaded in the local LM Studio instance are invisible.
The discoverModels extension point already exists but is only implemented for GitLab. Generic OpenAI-compatible custom providers lack model discovery.
Steps to reproduce
Configure LM Studio provider in opencode.json with baseURL set to http://127.0.0.1:1234/v1
Load multiple models in LM Studio (e.g. 5+ models)
Open the opencode desktop UI and view available models
Only the 3 models from models.dev are shown, not all models loaded in LM Studio
Activity
github-actions commentedon Jun 12, 2026
This issue might be a duplicate of existing issues. Please check:
If your issue is already covered by one of the above, please add a thumbs-up reaction or comment there instead so effort can be consolidated.