forked from cline/cline
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
fix: improve LM Studio model detection to show all downloaded models #5047
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Change from listLoaded() to listDownloadedModels() to fetch all available models - Add fallback to listLoaded() for backward compatibility - Fix context length detection for both loaded and downloaded model types - Update tests to cover new functionality This fixes the issue where only the currently loaded model was visible and users had to restart VSCode to see newly downloaded models.
…h models for LMStudio and Ollama components
…lers for LMStudio and Ollama components
mrubens
approved these changes
Jun 23, 2025
cte
pushed a commit
that referenced
this pull request
Jun 24, 2025
daniel-lxs
added a commit
that referenced
this pull request
Jun 26, 2025
- Fix import button getting stuck on 'Importing...' when user cancels file dialog - Add missing 'importing' translation key to all locales - Prevent error logging for user cancellation in import flow Fixes #5047
Alorse
pushed a commit
to Alorse/Roo-Code
that referenced
this pull request
Jun 27, 2025
hannesrudolph
pushed a commit
that referenced
this pull request
Jun 29, 2025
- Fix import button getting stuck on 'Importing...' when user cancels file dialog - Add missing 'importing' translation key to all locales - Prevent error logging for user cancellation in import flow Fixes #5047
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
Issue/PR - Triage
New issue. Needs quick review to confirm validity and assign labels.
lgtm
This PR has been approved by a maintainer
size:M
This PR changes 30-99 lines, ignoring generated files.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes an issue where LM Studio was only showing the currently loaded model instead of all available downloaded models. Users previously had to restart VSCode to see newly downloaded models.
Problem
As reported in the community:
Solution
The issue was that the code was using
client.llm.listLoaded()which only returns currently loaded models. This PR changes it to useclient.system.listDownloadedModels("llm")which fetches ALL downloaded models in LM Studio.Changes
Backend Changes
Updated model fetching logic in
src/api/providers/fetchers/lmstudio.ts:listLoaded()tolistDownloadedModels("llm")listLoaded()for backward compatibility with older LM Studio versionsFixed type handling to support both:
LLMInstanceInfo(from loaded models)LLMInfo(from downloaded models)Added comprehensive tests to ensure the new functionality works correctly
UI Improvements
Testing
Impact
Related Issues
This addresses the model detection issue mentioned in PR #4314's discussion.
Important
Improves LM Studio to display all downloaded models by updating model fetching logic and adding UI auto-refresh.
lmstudio.tsfromlistLoaded()tolistDownloadedModels("llm")to show all downloaded models.listLoaded()for older LM Studio versions.LLMInstanceInfoandLLMInfotypes.lmstudio.test.ts.LMStudio.tsxandOllama.tsx.webviewMessageHandler.ts.This description was created by
for b5ae4d3. You can customize this summary. It will automatically update as commits are pushed.