feat(llm): GeminiLLM declares supports_structured_output = True#573
Closed
matteomedioli wants to merge 1 commit into
Closed
feat(llm): GeminiLLM declares supports_structured_output = True#573matteomedioli wants to merge 1 commit into
matteomedioli wants to merge 1 commit into
Conversation
GeminiLLM already implements structured output via response_schema/response_mime_type but never set the capability flag, so SchemaFromTextExtractor / LLMEntityRelationExtractor / SimpleKGPipeline saw False and fell back to prompt-based JSON. Behavior change for pipeline users (structured output now on by default with GeminiLLM), documented as breaking in the changelog with the same remediation wording as the AnthropicLLM flag change. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 17, 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.
Description
GeminiLLMalready supports structured output (viaresponse_schema/response_mime_type), but never declared thesupports_structured_outputcapability flag. Pipeline components that check the flag sawFalseand fell back to prompt-based JSON.This PR sets the flag to
True.Breaking for pipeline users:
SimpleKGPipeline,SchemaFromTextExtractor, andLLMEntityRelationExtractornow enable structured output by default withGeminiLLM. To keep the previous behavior, construct the extractors withuse_structured_output=False. The changelog documents this with the same wording as the equivalentAnthropicLLMchange.Split out of #571 so that refactor stays strictly behavior-neutral. Independent of the #565–#572 stack — can merge before or after it.
Type of Change
Complexity
Complexity: Low
How Has This Been Tested?
Checklist