Skip to content

Conversation

andrewheard
Copy link
Contributor

@andrewheard andrewheard commented Sep 2, 2025

Added support for the Code Execution tool that enables the model to generate and run Python code.

@andrewheard andrewheard added this to the 12.3.0 - M170 milestone Sep 3, 2025
@firebase firebase deleted a comment from google-oss-bot Sep 3, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for the CodeExecution tool, enabling the model to generate and run Python code. The changes are well-implemented across the SDK, including updates to data models (Part, ModelContent, Tool), addition of new log codes, and comprehensive unit and integration tests. The refactoring of the Tool initializer is a nice improvement for future extensibility. I have one minor suggestion to improve consistency in parameter naming.

@google-oss-bot
Copy link

1 Warning
⚠️ New public headers were added, did you remember to add them to the umbrella header?

Generated by 🚫 Danger

Copy link
Member

@paulb777 paulb777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM pending todo's and optionally adding logging for unexpected fallbacks

@andrewheard andrewheard marked this pull request as ready for review September 5, 2025 20:42
@andrewheard andrewheard requested a review from ncooke3 September 5, 2025 20:44
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for the Code Execution tool, enabling the model to generate and run Python code. The changes are well-structured, introducing new types for executable code and its results, updating the Tool configuration, and adding comprehensive unit and integration tests. The refactoring of the Tool initializer is a good improvement. The implementation is robust, using safe unwrapping for optional values from the backend. Overall, this is a solid contribution.

@andrewheard andrewheard merged commit 10678f6 into main Sep 6, 2025
47 checks passed
@andrewheard andrewheard deleted the ah/ai-code-execution branch September 6, 2025 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants