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.
- Add separate test directories for all 7 packages (core, agent, computer, computer-server, mcp-server, pylume, som)
- Create 30+ unit tests with mocks for external dependencies (liteLLM, PostHog, Computer)
- Add conftest.py fixtures for each package to enable isolated testing
- Implement GitHub Actions CI workflow with matrix strategy to test each package independently
- Add TESTING.md with comprehensive testing guide and architecture documentation
- Follow SOLID principles: SRP, Vertical Slice Architecture, and Testability as Design Signal
Note:
- No API keys required for unit tests
Adds .bumpversion.cfg files to each Python package (agent, computer,
computer-server, core, mcp-server, pylume, som) to enable automated
version bumping with bump2version tool.
Includes comprehensive Makefile with targets for:
- Installing and managing bump2version
- Bumping package versions (major, minor, patch)
- Managing dependencies and building packages
- Running tests and formatting
- Cleaning build artifacts
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>