Skip to content

docs(llmagent): correct OutputSchema comment — tools still work via set_model_response#786

Open
nuthalapativarun wants to merge 1 commit into
google:mainfrom
nuthalapativarun:fix/756-outputschema-comment
Open

docs(llmagent): correct OutputSchema comment — tools still work via set_model_response#786
nuthalapativarun wants to merge 1 commit into
google:mainfrom
nuthalapativarun:fix/756-outputschema-comment

Conversation

@nuthalapativarun
Copy link
Copy Markdown

Description of Change

Problem:
The comment for OutputSchema in agent/llmagent/llmagent.go incorrectly states that setting OutputSchema prevents the agent from using any tools. This is inaccurate and misleads users into thinking OutputSchema and tools are mutually exclusive.

Solution:
Updated the comment to reflect actual behavior: the framework transparently injects a set_model_response tool when OutputSchema is set, so all tool types (function tools, RAG, agent transfer, etc.) continue to work alongside structured output. See internal/llminternal/outputschema_processor.go for the implementation.

Fixes #756

Testing Plan

Unit Tests:

  • I have added or updated unit tests for my change.
  • All unit tests pass locally.

Comment-only change; no behavior changes.

$ go test ./agent/llmagent/...
ok  	google.golang.org/adk/agent/llmagent	0.239s

Manual End-to-End (E2E) Tests:

Not applicable — documentation fix only.

Checklist

  • I have read the CONTRIBUTING.md document.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have manually tested my changes end-to-end.
  • Any dependent changes have been merged and published in downstream modules.

…et_model_response

The previous comment incorrectly stated that OutputSchema prevents the use of
tools. The framework injects a set_model_response tool transparently so all
tool types (function tools, RAG, agent transfer) continue to work alongside
structured output. Updated the comment to reflect actual behavior.

Fixes google#756
@indurireddy-TF
Copy link
Copy Markdown
Contributor

Hi @kdroste-google Please review this PR? it's a minor comment update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect comment for OutputSchema field in LLMAgentConfig

2 participants