-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Universal browser tool support #6598
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution! I've reviewed the changes and found some issues that need attention.
| const contextWindow = | ||
| contextKey && typeof rawModel.model_info[contextKey] === "number" ? rawModel.model_info[contextKey] : undefined | ||
|
|
||
| // Check if this is a Qwen model that should support computer use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed this code checks if a model is a Qwen model but the variable is never used. Is this intentional? If not, should this check be integrated into the logic, or can it be removed?
| (rawModel as any).capabilities.some( | ||
| (cap: string) => | ||
| typeof cap === "string" && | ||
| ["computer_use", "computer-use", "browser", "tool_use", "tool-use"].includes(cap.toLowerCase()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider extracting these capability strings to a constant for better maintainability:
| trainedForToolUse: false, | ||
| maxContextLength: 4096, | ||
| contextLength: 4096, | ||
| capabilities: ["completion", "computer_use"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good test coverage for the basic cases! Consider adding tests for the other capability variations that the implementation supports, such as "computer-use", "browser", "tool_use", and "tool-use". This would ensure all the supported formats are properly tested.
Related GitHub Issue
Closes: #
Roo Code Task Context (Optional)
Description
Test Procedure
Pre-Submission Checklist
Screenshots / Videos
Documentation Updates
Additional Notes
Get in Touch
Important
Add support for
supportsComputerUseflag in LMStudio and Ollama fetchers based on model capabilities or training status, with tests.parseLMStudioModelinlmstudio.tsandparseOllamaModelinollama.tsnow setsupportsComputerUseto true ifcapabilitiesincludescomputer_useor iftrainedForToolUseis true.lmstudio.test.tsandollama.test.tsto verifysupportsComputerUseflag behavior.getLMStudioModelsandgetOllamaModelsfor connection issues.getLMStudioModelsandgetOllamaModelsto handle default base URLs and connection errors more robustly.This description was created by
for 81113aa. You can customize this summary. It will automatically update as commits are pushed.