Skip to content

Conversation

@Angular-Angel
Copy link

@Angular-Angel Angular-Angel commented Jun 25, 2025

Related GitHub Issue

Closes: #5121

Description

This PR makes Roo use the default info for an LM Studio model, and changes that default info to be slightly more sensible, with a context window of 50K, not 200k.

Test Procedure

Try to use a model through LM Studio when Roo cannot get it's model info.

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Documentation Updates

[X] No documentation updates are required.

Get in Touch

Username is Angle on the Discord.


Important

Reduces contextWindow for LM Studio models from 200,000 to 50,000 and updates model selection logic to use this default when specific info is unavailable.

  • Behavior:
    • Changes contextWindow in lMStudioDefaultModelInfo from 200,000 to 50,000 in lm-studio.ts.
    • Updates getSelectedModel() in useSelectedModel.ts to use lMStudioDefaultModelInfo when LM Studio model info is unavailable.

This description was created by Ellipsis for f8a661d. You can customize this summary. It will automatically update as commits are pushed.

daniel-lxs and others added 4 commits June 24, 2025 13:33
- Add fetchModel() method to LmStudioHandler to dynamically fetch model info
- Update getModel() to return actual context length instead of default value of 1
- Add comprehensive tests for new functionality with proper error handling
- Maintain backward compatibility with graceful fallback to defaults

Fixes RooCodeInc#5075
…nc#5075)

- Updated LmStudioHandler.fetchModel() to use getModels() from model cache
- Removed custom getModelWithFetch() method for consistency with other providers
- Updated createMessage() and completePrompt() to use await this.fetchModel()
- Fixed tests to mock getModels instead of getLMStudioModels
- Ensures LM Studio models show correct context length instead of default value

Fixes RooCodeInc#5075
@Angular-Angel Angular-Angel requested review from cte, jr and mrubens as code owners June 25, 2025 19:50
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels Jun 25, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jun 25, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Jun 25, 2025
@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Jun 25, 2025
@Angular-Angel
Copy link
Author

In retrospect, I think this is based on the wrong branch - so, if the commit in question can be cherrypicked on it's lonesome it's fine, but otherwise it needs to be redone based on the main branch, instead of the LM Studio fix one.

@daniel-lxs daniel-lxs changed the base branch from fix/issue-5075-lmstudio-context-length to main June 30, 2025 16:13
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Jun 30, 2025
@daniel-lxs
Copy link
Member

I think this needs to be cleaned up, as you mentioned there are other unrelated changes from another PR.

I'll move this back to draft, let me know if you have any questions.

@daniel-lxs daniel-lxs moved this from PR [Needs Prelim Review] to PR [Draft / In Progress] in Roo Code Roadmap Jun 30, 2025
@daniel-lxs daniel-lxs marked this pull request as draft June 30, 2025 16:15
@hannesrudolph
Copy link
Collaborator

stale

@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 7, 2025
@github-project-automation github-project-automation bot moved this from PR [Draft / In Progress] to Done in Roo Code Roadmap Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working PR - Draft / In Progress size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Roo does not correctly use LM Studio default settings

3 participants