docs(llmagent): correct OutputSchema comment — tools still work via set_model_response#786
Open
nuthalapativarun wants to merge 1 commit into
Open
Conversation
…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
Contributor
|
Hi @kdroste-google Please review this PR? it's a minor comment update. |
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.
Description of Change
Problem:
The comment for
OutputSchemainagent/llmagent/llmagent.goincorrectly states that settingOutputSchemaprevents the agent from using any tools. This is inaccurate and misleads users into thinkingOutputSchemaand tools are mutually exclusive.Solution:
Updated the comment to reflect actual behavior: the framework transparently injects a
set_model_responsetool whenOutputSchemais set, so all tool types (function tools, RAG, agent transfer, etc.) continue to work alongside structured output. Seeinternal/llminternal/outputschema_processor.gofor the implementation.Fixes #756
Testing Plan
Unit Tests:
Comment-only change; no behavior changes.
Manual End-to-End (E2E) Tests:
Not applicable — documentation fix only.
Checklist