Skip to content

Conversation

enyst
Copy link
Collaborator

@enyst enyst commented Sep 26, 2025

Problem

  • Sonnet 3.5 models referenced with dot-notation (e.g., claude-3.5-sonnet-...) were not included in FUNCTION_CALLING_PATTERNS, so native tool calling defaulted to off.

Fix

  • Add 'claude-3.5-sonnet*' to FUNCTION_CALLING_PATTERNS in openhands/llm/model_features.py so that Sonnet 3.5 dot-notation models default to native tool calling, consistent with the existing dashed variant ('claude-3-5-sonnet*').

Why

  • Anthropic models appear in both dashed and dotted naming variants. Haiku entries already accounted for both; Sonnet 3.5 should match the same intent.

Risk

  • Low. This only amends the default feature detection for the dotted variant to match the already-enabled dashed variant.

Co-authored-by: openhands [email protected]

@enyst can click here to continue refining the PR


To run this PR locally, use the following command:

GUI with Docker:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:a1b716b-nikolaik   --name openhands-app-a1b716b   docker.all-hands.dev/all-hands-ai/openhands:a1b716b

CLI with uvx:

uvx --python 3.12 --from git+https://github.com/All-Hands-AI/OpenHands@fix/sonnet35-native-tools openhands

…3.5 Sonnet dot-notation models by adding 'claude-3.5-sonnet*' to FUNCTION_CALLING_PATTERNS

- Previously only 'claude-3-5-sonnet*' (dash) was present, so 'claude-3.5-sonnet*' models defaulted to non-native tool calling
- This led to KeyError 'command' when fn_call_converter attempted to process prompts for Sonnet 3.5 with tools

Co-authored-by: openhands <[email protected]>
Copy link

openhands-ai bot commented Sep 27, 2025

Looks like there are a few issues preventing this PR from being merged!

  • GitHub Actions are failing:
    • Run Python Tests

If you'd like me to help, just leave a comment, like

@OpenHands please fix the failing actions on PR #11156 at branch `fix/sonnet35-native-tools`

Feel free to include any additional details that might help me get this PR into a better state.

You can manage your notification settings

@enyst enyst marked this pull request as ready for review September 27, 2025 00:37
Copy link
Contributor

Coverage report

This PR does not seem to contain any modification to coverable code.

@enyst enyst merged commit a1b81fe into main Sep 27, 2025
27 of 28 checks passed
@enyst enyst deleted the fix/sonnet35-native-tools branch September 27, 2025 22:38
@enyst
Copy link
Collaborator Author

enyst commented Sep 27, 2025

Ported to All-Hands-AI/agent-sdk#524

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants