-
Notifications
You must be signed in to change notification settings - Fork 6
T8 #1610
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
Conversation
…mplementation Improve Gemini tool calling handling
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request enhances Gemini 2.5/3 tool calling support and improves job loading flexibility by handling both YAML and JSON formats. The main improvements include proper handling of Gemini's function call/response flow, robust tool argument parsing (supporting both object and JSON string formats), and the ability to load jobs from either YAML or JSON files with automatic daemon property removal.
Key Changes:
- Refactored tool call handling to properly map Gemini's
functionCallparts tofunctionResponseparts with improved argument parsing - Enhanced job loading to support both YAML and JSON formats with daemon property cleanup
- Updated documentation with Gemini 2.5/3-specific notes on tool calling and JSON output configuration
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| js/owrap.ai.js | Refactored tool calling logic to support Gemini 2.5/3's function call/response flow with improved tool selection and argument parsing |
| js/openaf.js | Enhanced job loading to handle both YAML and JSON formats with automatic daemon property removal via temporary file processing |
| docs/ow-ai-gpttypes.md | Added documentation for Gemini 2.5/3 tool calling behavior and best practices |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This pull request introduces significant improvements to Gemini 2.5/3 tool calling support and enhances job loading flexibility in the codebase. The most important changes include a refactor of tool call handling to support Gemini's function call/response flow, improved robustness in tool argument parsing, and updates to the documentation for Gemini-specific behaviors. Additionally, job loading now handles both YAML and JSON formats more flexibly.
Gemini 2.5/3 Tool Calling Enhancements:
OpenWrap.ai.prototype.__gpttypesto support Gemini 2.5/3's function call/response flow: the model'sfunctionCallparts are now properly mapped to follow-upfunctionResponseparts from the user, and tool arguments are parsed as either objects or JSON strings depending on the model/version. [1] [2]Job Loading Improvements:
js/openaf.jsto support both YAML and JSON job definitions, and to remove anydaemonproperty before execution for consistency.Documentation Updates:
docs/ow-ai-gpttypes.mdwith notes on Gemini 2.5/3 tool call handling, argument types, and best practices for requesting JSON output.