Repository navigation
feat(interactions): concatenate output_text across multi-step model responses in a turn - #3040
Open
copybara-service[bot] wants to merge 1 commit into
Open
copybara-service[bot] wants to merge 1 commit into
copybara-service[bot] wants to merge 1 commit into
Conversation
copybara-service
Bot
force-pushed
the
copybara/992142645
branch
from
October 2, 2026 07:20
a4358fb to
0ad0a01
Compare
…esponses in a turn In the Interactions API, the model may respond across multiple steps in a row within a single turn, including consecutive `model_output` steps and interleaved `thought` steps (e.g., `[thought, model_output, thought, model_output]`). Previously, `interaction.output_text` stopped collecting text as soon as backward traversal encountered a `thought` step or a `model_output` step without `content` after collecting text from the final `model_output` step, returning only the last segment of the model's response. Update the `output_text` helper across the Python and TypeScript SDKs to continue across `thought` steps and empty `model_output` steps when aggregating text from the final model turn, while still stopping at `user_input` and tool call/result boundaries. PiperOrigin-RevId: 992142645
copybara-service
Bot
force-pushed
the
copybara/992142645
branch
from
October 10, 2026 19:53
0ad0a01 to
06abb74
Compare
output_text across interleaved thought steps in multi-hop interactionsThis branch has not been deployed
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.
feat(interactions): concatenate output_text across multi-step model responses in a turn
In the Interactions API, the model may respond across multiple steps in a row within a single turn, including consecutive
model_outputsteps and interleavedthoughtsteps (e.g.,[thought, model_output, thought, model_output]).Previously,
interaction.output_textstopped collecting text as soon as backward traversal encountered athoughtstep or amodel_outputstep withoutcontentafter collecting text from the finalmodel_outputstep, returning only the last segment of the model's response.Update the
output_texthelper across the Python and TypeScript SDKs to continue acrossthoughtsteps and emptymodel_outputsteps when aggregating text from the final model turn, while still stopping atuser_inputand tool call/result boundaries.