Files
computer/libs/python
Luca Steingen 7b2ecb8a9a Fix: Enable custom function tools with Anthropic models
This commit fixes three bugs that prevented custom function tools from working alongside the computer tool with Anthropic Claude models:

1. Tool format conversion: Convert OpenAI format to Anthropic format
- Changed from {type, function: {parameters}} to {name, description, input_schema}

2. Response handling (content format): Add custom tool detection
- Check tool name and handle custom tools separately from computer actions
- Prevents 'Unknown action type: None' errors

3. Response handling (tool_calls format): Add custom tool handling
- Parse JSON arguments and route custom tools correctly
- Ensures compatibility with litellm's normalized response format

These changes enable developers to use custom Python functions as tools alongside computer control tools without breaking existing functionality.

Fixes: Custom function tools now work correctly with Anthropic models.
2025-11-06 15:26:40 +01:00
..
2025-10-31 16:18:21 -04:00
2025-10-31 16:18:21 -04:00