Skip to content

Conversation

@Svel26
Copy link

@Svel26 Svel26 commented Aug 2, 2025

Related GitHub Issue

Closes: #

Roo Code Task Context (Optional)

Description

Test Procedure

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.

Screenshots / Videos

Documentation Updates

Additional Notes

Get in Touch


Important

Add support for supportsComputerUse flag in LMStudio and Ollama fetchers based on model capabilities or training status, with tests.

  • Behavior:
    • parseLMStudioModel in lmstudio.ts and parseOllamaModel in ollama.ts now set supportsComputerUse to true if capabilities includes computer_use or if trainedForToolUse is true.
    • Tests added in lmstudio.test.ts and ollama.test.ts to verify supportsComputerUse flag behavior.
  • Error Handling:
    • Improved error logging in getLMStudioModels and getOllamaModels for connection issues.
  • Misc:
    • Updated getLMStudioModels and getOllamaModels to handle default base URLs and connection errors more robustly.

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

@Svel26 Svel26 requested review from cte, jr and mrubens as code owners August 2, 2025 11:34
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Aug 2, 2025
@Svel26 Svel26 closed this Aug 2, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Aug 2, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Aug 2, 2025
Copy link
Contributor

@roomote roomote bot left a 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
Copy link
Contributor

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()),
Copy link
Contributor

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"],
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

1 participant