Skip to content

feat(js/plugins/google-genai): 'Steps' for Interactions (googleAI only)#5317

Merged
ifielker merged 2 commits into
mainfrom
if-fixBreakingChange
May 12, 2026
Merged

feat(js/plugins/google-genai): 'Steps' for Interactions (googleAI only)#5317
ifielker merged 2 commits into
mainfrom
if-fixBreakingChange

Conversation

@ifielker

Copy link
Copy Markdown
Collaborator

Gemini API announced breaking changes to Interactions API which is used for several models (deep research, lyria 3).
This PR adds the opt-in header and switches to Steps based responses.
We needed to split the previous 'common' interactions converters & types because while VertexAI will eventually also
use steps (and we can go back to common at that point), the timeline for the rollout is different and has not started yet.

Checklist (if applicable):

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

Copy link
Copy Markdown
Contributor

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 refactors the Google Generative AI and Vertex AI plugins to use a new interaction-based API structure, introducing interaction-converters.ts and interaction-types.ts while updating client.ts and model definitions. The feedback focuses on improving the robustness of the new converters by suggesting fallbacks for potentially missing data in tool requests, tool responses, and Google Search arguments to prevent runtime parsing errors. Additionally, it is recommended to avoid throwing hard errors for unknown content types or part types to ensure the system remains resilient as the underlying API evolves, and to ensure unique IDs are generated for Google Search and code execution calls to avoid collisions.

Comment thread js/plugins/google-genai/src/googleai/interaction-converters.ts Outdated
Comment thread js/plugins/google-genai/src/googleai/interaction-converters.ts Outdated
Comment thread js/plugins/google-genai/src/googleai/interaction-converters.ts Outdated
Comment thread js/plugins/google-genai/src/googleai/interaction-converters.ts Outdated
Comment thread js/plugins/google-genai/src/googleai/interaction-converters.ts Outdated
Comment thread js/plugins/google-genai/src/googleai/interaction-converters.ts Outdated
@ifielker ifielker requested a review from pavelgj May 12, 2026 18:25
@ifielker ifielker merged commit 61d9a5f into main May 12, 2026
8 checks passed
@ifielker ifielker deleted the if-fixBreakingChange branch May 12, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants