Repository navigation
fix(core): build Gemma 4 thinking variants on Interactions - #65038
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Looks good. I compared variant resolution on the base and on this branch. On the base, the new test fails: a toggle-only model on Google Interactions gets no variants. With the PR, it gets none (thinkingLevel: minimal) and thinking (thinkingLevel: high, summaries auto). Models with effort or budget support still get the same variants as before. The Interactions protocol accepts both levels. Core tests and tsc -b pass. I couldn't call the live API here, so the per-level results against Google come from your table.
The public API is unchanged; only the internal Protocol signature in variant.ts changed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
No linked issue.
Type of change
What does this PR do?
I added the same toggle variants that GenerateContent shows for Gemma 4. On Interactions, I use the catalog's toggle-only support to choose these variants. Gemini 2.5 budget models keep their existing behavior.
How did you verify your code works?
I sent the same short arithmetic prompt at each thinking level to Google's live Interactions API. Successful requests show thought token counts; rejected requests show HTTP 400.
minimallowmediumhighxhighgemma-4-31b-itgemma-4-26b-a4b-itI also verified that both models complete with
highand automatic thinking summaries. The regression test checks both toggle variants and confirms a model with a toggle and a budget still gets no variants. All 76 affected core tests passed, along with corebun typecheckand rootbun run check.Screenshots / recordings
Not applicable.
Checklist