8000 Added a hardcoded list of computer use models for litellm as a fallba… by slytechnical · Pull Request #4052 · RooCodeInc/Roo-Code · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Added a hardcoded list of computer use models for litellm as a fallba… #4052

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
merged 1 commit into from
May 27, 2025

Conversation

slytechnical
Copy link
Collaborator
@slytechnical slytechnical commented May 27, 2025

Description

This adds a hardcoded list of litellm computer use models as a fallback for users still on an older litellm verison before supports_computer_use was added to the v1/model/info endpoint

Test Procedure

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • ♻️ Refactor Changes
  • 💅 Cosmetic Changes
  • 📚 Documentation update
  • 🏃 Workflow Changes

Pre-flight Checklist

  • Changes are limited to a single feature, bugfix or chore (split larger changes into separate PRs)
  • Tests are passing (npm test) and code is formatted and linted (npm run format && npm run lint)
  • I have created a changeset using npm run changeset (required for user-facing changes)
  • I have reviewed contributor guidelines

Screenshots

Additional Notes


Important

Adds a hardcoded fallback list for computer use models in LiteLLM to handle older versions lacking supports_computer_use.

  • Behavior:
    • Adds a hardcoded list LITELLM_COMPUTER_USE_MODELS in api.ts for fallback in older LiteLLM versions.
    • Updates getLiteLLMModels in litellm.ts to use fallback list when supports_computer_use is missing.
    • Prioritizes explicit supports_computer_use over fallback.
  • Tests:
    • Adds tests in litellm.test.ts for fallback detection and prioritization of explicit supports_computer_use.
    • Tests various model name formats for fallback detection.

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

@mrubens
Copy link
Collaborator
mrubens commented May 27, 2025

So it’s not loaded dynamically?

@slytechnical
Copy link
Collaborator Author

So it’s not loaded dynamically?

It's still loaded dynamically. This is a fallback if they're running an old version of litellm, which was a good callout.

So:

  • new litellm versions and going forward this loads it dynamically
  • old litellm versions it at least just checks against a hardcoded list of known models in litellm that support it

I'm not set on this being how we do it, it's just an option

@mrubens
Copy link
Collaborator
mrubens commented May 27, 2025

I thought they were saying that old versions of LiteLLM would also load the config file dynamically. Did you have a chance to try?

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label May 27, 2025
@slytechnical
Copy link
Collaborator Author

I thought they were saying that old versions of LiteLLM would also load the config file dynamically. Did you have a chance to try?

I checked with an older version and supports_computer_use just isn't present in /v1/models/info - I suspected that based on the code I had to change but I should have double checked it manually sooner

I think the part of the PR that was necessary was https://github.com/BerriAI/litellm/blob/acaa80294c2c86892a80f49bc15994393f869300/litellm/utils.py#L4502 - so maybe they meant values of properties are loaded via the config but entirely new properties aren't

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label May 27, 2025
@slytechnical slytechnical merged commit 73d1623 into main May 27, 2025
17 checks passed
@slytechnical slytechnical deleted the st/computer-use-dynamic-fallback branch May 27, 2025 19:58
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap May 27, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. lgtm This PR has been approved by a maintainer
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants
0