Back to Changelog
v0.6.1
January 14, 2026

LLM Provider Tool Calling Fixes & Gemini Migration

FixedChanged

#[0.6.1] - 2026-01-14

#Fixed

  • Anthropic Provider - Tool Calling

    • Fixed critical bug where early return on text blocks prevented tool detection
    • Response parsing now scans all content blocks and prioritizes tool_use over text
    • Multiple tool calls per response now work correctly
    • Removed 85 lines of duplicate code and unnecessary tool conversion
    • Streamlined API parameter building with new _build_api_params() helper
  • Grok Provider - Tool Calling

    • Added _safe_parse_arguments() method with JSON error handling
    • Tool argument parsing now gracefully handles malformed JSON
    • Applied error handling to both streaming and non-streaming implementations
  • Gemini Provider - Tool Calling

    • Fixed single tool call limitation - now supports multiple tools per response
    • Fixed tool call ID collision issues with unique ID generation (name_idx_id)
    • Fixed token usage tracking to handle None values from API

#Changed

  • Gemini Provider - Package Migration
    • Migrated from deprecated google-generativeai to new google-genai package
    • Complete rewrite using google.genai.Client API with proper async support
    • Updated message conversion to use types.Content and types.Part objects
    • Updated tool conversion to use types.FunctionDeclaration and types.Tool objects
    • Model support updated for Gemini 2.x series (gemini-2.5-pro, gemini-2.0-flash-exp)
    • Dependencies updated:
      • requirements.txt: google-genai>=0.3.0
      • pyproject.toml: google-genai>=0.3.0 (4 occurrences)
      • Lambda requirements: google-genai>=0.3.0