GeezerVison is showing github.com — [FEATURE]:LM Studio provider should auto-detect models via /v1/models API (similar to Continue extension) · Issue #23327 · anomalyco/opencode
[FEATURE]:LM Studio provider should auto-detect models via /v1/models API (similar to Continue extension) #23327DescriptionFeature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
When connecting OpenCode to LM Studio, it currently fetches a hardcoded list of models from models.dev instead of querying the local LM Studio server's /v1/models endpoint.
Other tools like the "Continue" VS Code extension handle this by using an AUTODETECT model value (or similar logic) to dynamically query available models on the provider side.
This means users have to manually update their config every time they switch or download a new model in LM Studio.
Steps to Reproduce:
- Install and start LM Studio with Local Server enabled (default port 1234).
- Load any model in LM Studio.
- Connect OpenCode to the lmstudio provider via /connect.
- Run /models inside OpenCode.
Current Behavior:
OpenCode shows a hardcoded list from models.dev (e.g., gpt-oss, qwen3) instead of the models actually loaded in LM Studio.
Expected Behavior:
OpenCode should query http://127.0.0.1:1234/v1/models and display the available local models dynamically, similar to how it works for Ollama or when using "AUTODETECT" logic.
Reacted by coton, lustfeind, daru, Spi, Stefan Chirila and Pavel Kocka Activitygithub-actions commented on Apr 18, 2026 This issue might be a duplicate of existing issues. Please check:
If your request is the same as one of the above, please consider adding a comment there instead to consolidate discussion. SharkyRawr commented on Apr 18, 2026 yuseferi commented on Apr 27, 2026 gx16636 commented on May 22, 2026 Reacted by Spi, Jelloeater and Steve Henderson Jelloeater commented on Jun 25, 2026 This would be so great to have implemented, both Crush and Hermes do it. Shouldn't be too hard, right? github-actions commented on Aug 25, 2026 To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one. yuhp commented on Sep 11, 2026 This LM Studio use case is supported by the community plugin:
https://github.com/yuhp/opencode-models-discovery
The plugin queries the actual LM Studio /v1/models endpoint instead of relying only on the static models.dev catalog, so the discovered model list reflects the models exposed by the local server.
It can also use LM Studio's /api/v1/models inventory endpoint for metadata enrichment:
{
"plugin": ["opencode-models-discovery@latest"],
"provider": {
"lmstudio": {
"npm": "@ai-sdk/openai-compatible",
"name": "LM Studio",
"options": {
"baseURL": "http://127.0.0.1:1234/v1",
"modelsDiscovery": {
"enabled": true,
"modelInfoFormat": "lmstudio"
}
}
}
}
}
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|