fix(ai): isolate Gemini function-response turns - #43479
Open
major wants to merge 1 commit into
Open
Conversation
Contributor
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
major
marked this pull request as draft
August 19, 2026 16:48
Contributor
Author
|
Anthropic message change is too broad... converting to draft to fix it up |
major
force-pushed
the
vertex-tool-continuation
branch
from
August 19, 2026 17:01
ecfec6b to
0827266
Compare
major
marked this pull request as ready for review
August 19, 2026 17:03
6 tasks
- keep chronological system updates out of the Gemini turn that answers a function call - cover repeated updates following a tool result Refs anomalyco#43478 Signed-off-by: Major Hayden <major@mhtx.net>
major
force-pushed
the
vertex-tool-continuation
branch
from
August 19, 2026 22:24
0827266 to
980ea4a
Compare
Contributor
Author
|
Good method for testing: |
This was referenced Aug 19, 2026
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
Refs #43478
Type of change
What does this PR do?
Prevents Gemini system updates from being merged into the user turn containing a function response.
Gemini requires that function-response turn to contain only the function response when continuing after a tool call.
Updates after a function response now start a separate user turn, while consecutive updates continue to coalesce.
How did you verify your code works?
bun test test/provider/gemini.test.tsfrompackages/aibun typecheckfrompackages/aiScreenshots / recordings
N/A
Checklist