fix(workflow): Preserve explicit single-turn contents#6047
Open
spectaclehong wants to merge 1 commit into
Open
fix(workflow): Preserve explicit single-turn contents#6047spectaclehong wants to merge 1 commit into
spectaclehong wants to merge 1 commit into
Conversation
single_turn workflow nodes previously forced include_contents to none even when users explicitly set include_contents='default'. Use Pydantic field tracking to keep explicit values while preserving the implicit default. Fixes google#6046
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Collaborator
|
Response from ADK Triaging Agent Hello @spectaclehong, thank you for your contribution! We noticed that a couple of things are missing according to our contribution guidelines:
This information will help reviewers to review your PR more efficiently. Thanks! |
This was referenced Jun 10, 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.
Please ensure you have read the contribution guide before creating a pull request.
Link to Issue or Description of Change
1. Link to an existing issue (if applicable):
single_turnworkflow nodes overwrite explicitinclude_contents#6046Problem:
single_turnLlmAgentworkflow nodes currently forceinclude_contentstononeat runtime, even when the user explicitly configuresinclude_contents="default". That silently changes the agent configuration and prevents one-shot workflow nodes from intentionally receiving relevant session or workflow history.Solution:
Only apply the workflow
single_turndefault ofinclude_contents="none"wheninclude_contentswas not explicitly set by the user. This preserves the existing implicit default behavior while respecting explicitinclude_contents="default"andinclude_contents="none"values.Regression coverage was added for implicit and explicit
include_contentscases.Testing Plan
Unit Tests:
Targeted workflow tests pass locally:
Result:
Python 3.10 tox unit suite passes locally:
Result:
Pre-commit hooks pass for changed files:
Manual End-to-End (E2E) Tests:
Validated manually with a local workflow application that uses a
single_turnworkflowLlmAgentconfigured withinclude_contents="default". The run confirmed that the explicit contents mode is preserved instead of being overwritten tonone.No ADK Web or UI behavior is changed.
Checklist
Additional context
No documentation update was made because this change does not add a new user-facing API or guide behavior; it preserves explicit configuration that was already supported by
LlmAgent.include_contents.No dependent changes are required.