-
Notifications
You must be signed in to change notification settings - Fork 185
fix: gemini function declaration conversion #1218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: gemini function declaration conversion #1218
Conversation
📝 WalkthroughSummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings. WalkthroughThe changes consolidate tool conversion logic in the Gemini and Vertex providers to build a single Tool object containing all FunctionDeclarations instead of creating multiple Tool instances. Test configuration was updated to enable multiple tool calls support, and changelog entries were added documenting the refactor. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (5)
🧰 Additional context used📓 Path-based instructions (1)**⚙️ CodeRabbit configuration file
Files:
🧠 Learnings (4)📚 Learning: 2025-12-09T17:07:42.007ZApplied to files:
📚 Learning: 2025-12-29T11:54:55.836ZApplied to files:
📚 Learning: 2025-12-15T10:16:21.909ZApplied to files:
📚 Learning: 2025-12-19T09:26:54.961ZApplied to files:
🧬 Code graph analysis (2)core/providers/gemini/responses.go (2)
core/providers/gemini/utils.go (1)
🔇 Additional comments (5)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🧪 Test Suite AvailableThis PR can be tested by a repository admin. |
Merge activity
|

Summary
Fix Gemini/Vertex tool handling to properly support multiple function declarations by appending them to a single Tool object rather than creating separate Tool objects for each function.
Changes
convertResponsesToolsToGeminiandconvertBifrostToolsToGeminito append all function declarations to a single Tool object instead of creating multiple Tool objectsType of change
Affected areas
How to test
Test that multiple function declarations work correctly with Gemini and Vertex:
Also test with actual API calls to ensure multiple function tools are properly handled in a single request.
Breaking changes
Related issues
Fixes issue with Gemini/Vertex providers not properly handling multiple function tools.
Security considerations
No security implications.
Checklist