feat(ai): support Gemini 3 models and preserve tool call thought signatures

Merged
NA
2mo ago
+329-25

Problem

  1. Gemini 3 Support: Sure lacked catalog entries and pricing for Gemini 3 models (Flash, Flash-Lite, Pro).
  2. Tool Calling 400 Error: Gemini 3 models include an encrypted thought_signature inside an extra_content field on tool calls. When Sure sent follow-up tool results back without echoing extra_content, Google's OpenAI-compatible endpoint rejected the request with 400 Bad Request.

Solution

Testing Done

  • Added unit tests for Gemini 3 pricing and provider detection.
  • Added unit tests verifying extra_content is parsed and preserved on tool calls.
  • Verified test suite and RuboCop in devcontainer.

Summary by CodeRabbit

Summary

  • New Features
    • Added pricing information for Gemini 3 models, including promotional Flash rates and higher-context Pro tiers.
    • Preserved additional provider metadata in tool calls when available, including Google-specific metadata, across requests and turns.
  • Bug Fixes
    • Improved Google model identification and pricing lookup, including for model names with a google/ prefix.
  • Documentation
    • Updated Gemini setup guidance, recommended models, pricing details, and configuration examples.