• Stefy Lanza (nextime / spora )'s avatar
    Add comprehensive tool calls support for Google and Anthropic providers · 60ca20d2
    Stefy Lanza (nextime / spora ) authored
    GoogleProviderHandler enhancements:
    - Process all parts in response content (not just first part)
    - Extract and combine all text parts
    - Detect and convert Google function_call to OpenAI tool_calls format
    - Generate unique call IDs for tool calls
    - Handle function responses for debugging
    - Set content to None when tool_calls are present (OpenAI convention)
    - Add comprehensive logging for tool call detection and conversion
    - Support both text and function/tool calls in same response
    - Validate response against ChatCompletionResponse Pydantic model
    - Add detailed response structure logging
    
    AnthropicProviderHandler enhancements:
    - Process all content blocks (not just text)
    - Detect and convert Anthropic tool_use blocks to OpenAI tool_calls format
    - Generate unique call IDs for tool calls
    - Combine all text parts from multiple blocks
    - Set content to None when tool_calls are present (OpenAI convention)
    - Add comprehensive logging for tool_use detection and conversion
    - Validate response against ChatCompletionResponse Pydantic model
    - Add detailed response structure logging
    
    Both handlers now properly translate provider-specific function calling
    formats to OpenAI-compatible tool_calls structure, ensuring clients receive
    valid structured responses with proper schema validation.
    60ca20d2
Name
Last commit
Last update
aisbf Loading commit data...
config Loading commit data...
.gitignore Loading commit data...
.providers.json.swp Loading commit data...
AI.PROMPT Loading commit data...
CHANGELOG.md Loading commit data...
DEBUG_GUIDE.md Loading commit data...
DOCUMENTATION.md Loading commit data...
LICENSE.txt Loading commit data...
MANIFEST.in Loading commit data...
PYPI.md Loading commit data...
README.md Loading commit data...
aisbf.sh Loading commit data...
build.sh Loading commit data...
clean.sh Loading commit data...
cli.py Loading commit data...
main.py Loading commit data...
pyproject.toml Loading commit data...
requirements.txt Loading commit data...
setup.py Loading commit data...
start_proxy.sh Loading commit data...