Skip to content

fix: preserve single-turn structured output#6100

Open
he-yufeng wants to merge 1 commit into
google:mainfrom
he-yufeng:fix/single-turn-output-schema
Open

fix: preserve single-turn structured output#6100
he-yufeng wants to merge 1 commit into
google:mainfrom
he-yufeng:fix/single-turn-output-schema

Conversation

@he-yufeng

Copy link
Copy Markdown
Contributor

Fixes #6089.

Summary

  • Keep message_as_output for plain single-turn agent text output.
  • Leave structured output_schema results as event.output instead of marking them as message output.
  • Add direct tests for both plain text and structured single-turn output handling.

To verify

  • $env:PYTHONPATH=(Resolve-Path .\src).Path; python -m pytest tests\unittests\workflow\test_llm_agent_as_node.py -q
  • python -m py_compile src\google\adk\workflow\_llm_agent_wrapper.py tests\unittests\workflow\test_llm_agent_as_node.py
  • python -m ruff check src\google\adk\workflow\_llm_agent_wrapper.py
  • git diff --check

@rohityan rohityan self-assigned this Jun 15, 2026
@wyf7107 wyf7107 self-assigned this Jun 16, 2026
@rohityan rohityan removed their assignment Jun 17, 2026
@rohityan rohityan added request clarification [Status] The maintainer need clarification or more information from the author core [Component] This issue is related to the core interface and implementation labels Jun 17, 2026
@rohityan

Copy link
Copy Markdown
Collaborator

Hi @he-yufeng , Thank you for your contribution! We appreciate you taking the time to submit this pull request. Can you please fix the failing unit tests before we can proceed with the review.

@he-yufeng he-yufeng force-pushed the fix/single-turn-output-schema branch from 0f797cc to 0cefc95 Compare June 17, 2026 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core [Component] This issue is related to the core interface and implementation request clarification [Status] The maintainer need clarification or more information from the author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

message_as_output=True unconditionally set, destroying structured event.output for single_turn agents with output_schema

3 participants