Repository navigation
v0.2.1 - Gemini Parallel Tool Calls Fix
What's Changed
Bug Fixes
-
Gemini parallel tool calls: Fixed issue where Gemini models failed when multiple tool calls occurred in a single turn. OCI's Generic format doesn't properly support parallel function calls for Gemini, so we now use a text fallback approach (same as Llama/xAI) when 2+ tool calls are detected.
-
Finish reason detection: Fixed
finishReasonto correctly returntool-callswhen tool calls are present in the response. -
Zod v4 schema support: Added
ensureJsonSchema()helper that converts Zod v4 schemas to JSON Schema when needed (AI SDK v5 compatibility).
Other Changes
- Updated
.gitignoreto exclude local test files and tool directories - Bumped
aiSDK to 5.0.126 - Added
zod-to-json-schemadev dependency
Technical Details
The parallel tool call fix works by:
- Single tool call: Uses standard
toolCallsarray +TOOLmessage (works correctly) - Parallel tool calls (2+): Converts both tool calls and results to text format in
ASSISTANT/USERmessages
This is a workaround for OCI's Generic format limitation that doesn't properly batch multiple TOOL responses for Gemini.
Full Changelog: v0.2.0...v0.2.1