Repository navigation
Fix: Check for openhands/ prefix instead of litellm_proxy in model name - #57
Merged
Merged
Conversation
The CLI uses 'openhands/' prefix for OpenHands-managed models, which the SDK internally translates to 'litellm_proxy/'. This change ensures we check for the correct prefix at the CLI level. This fixes an issue where the previous check for 'litellm_proxy' would not match models at the CLI level, which use the 'openhands/' prefix. Co-authored-by: openhands <openhands@all-hands.dev>
enyst
approved these changes
Nov 17, 2025
xingyaoww
marked this pull request as ready for review
November 17, 2025 18:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The previous PR (#56) introduced a check for
litellm_proxyin the model name to determine iflitellm_extra_bodyshould be set. However, this check is incorrect for the CLI level.As pointed out by @enyst in #56 (comment), in the CLI, users choose models with the
openhands/prefix, and the SDK internally translates that tolitellm_proxy/when making API calls.This means the check at the CLI level should look for
openhands/in the model name, notlitellm_proxy.Solution
This PR updates the
should_set_litellm_extra_body()function to check for"openhands/"in the model name instead of"litellm_proxy".Changes
should_set_litellm_extra_body()inopenhands_cli/utils.pyto check for"openhands/"prefixtests/test_utils.pyto useopenhands/model nameslitellm_proxy/models don't trigger the check (since they wouldn't be seen at CLI level)Testing
Related
cc @enyst @neubig @simonrosenberg @li-boxuan
@xingyaoww can click here to continue refining the PR