-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fix/issue 5075 lmstudio context length #5122
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
Fix/issue 5075 lmstudio context length #5122
Conversation
- 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
…ub.com/RooCodeInc/Roo-Code into fix/issue-5075-lmstudio-context-length
|
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. |
|
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. |
|
stale |
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
Documentation Updates
[X] No documentation updates are required.
Get in Touch
Username is Angle on the Discord.
Important
Reduces
contextWindowfor LM Studio models from 200,000 to 50,000 and updates model selection logic to use this default when specific info is unavailable.contextWindowinlMStudioDefaultModelInfofrom 200,000 to 50,000 inlm-studio.ts.getSelectedModel()inuseSelectedModel.tsto uselMStudioDefaultModelInfowhen LM Studio model info is unavailable.This description was created by
for f8a661d. You can customize this summary. It will automatically update as commits are pushed.