Repository navigation
refactor(ai): chat_structured is the one structured-output path - #2452
Merged
Merged
Conversation
Owner
Author
|
Test evidence:
Pending a person: review the diff in tuicr ( |
Only `chat_structured` validates a model reply against a schema in production (roadmap intake, refine and research). The agent loop's schema arm and the pipeline's second parse had no production caller: no module gives a `PydanticAgent` an output type, output schema or output validator, and no production pipeline sets an output schema. - Delete the agent loop's schema arm: `output_type`, `output_schema`, `output_json_schema`, `output_validator`, the runner helpers that validated and reflected, `AgentRetries.output`, and the `output_schema` fields of `AgentSpec` and `AgentInfo`. - Delete the schema arm of `fix_llm_response` and `ai/output/`. - Delete `MultiAgentPipeline.output_schema`, `_parse_pipeline_output`, `final_data`, `parsed_data` and the pipeline's type parameter. - `chat_structured` uses `build_schema_reflection_message`, and its own copy goes. The message text does not change. - A new invariant test fails when another module builds a schema reflection. - The swallowed-failure ceilings fall by 9.
…the change rewrote
dan-petty
force-pushed
the
refactor/1003-structured-output-path
branch
from
October 28, 2026 17:08
096273a to
f051d38
Compare
dan-petty
marked this pull request as ready for review
October 28, 2026 17:16
dan-petty
pushed a commit
that referenced
this pull request
Oct 28, 2026
🤖 I have created a release *beep* *boop* --- ## [0.10.0](v0.9.0...v0.10.0) (2026-10-28) ### Features * **review:** devops review intake hands the findings of a session on merged code to roadmap intake ([#2455](#2455)) ([a5c7b82](a5c7b82)) * **security:** devops k8s audit runs Popeye in the tool sandbox with a kube-api network profile that only reads the API server ([#2467](#2467)) ([e02c3fb](e02c3fb)) * **security:** the App's installation tokens carry only the permissions the roadmap jobs use ([#2482](#2482)) ([9599ef2](9599ef2)), closes [#2473](#2473) ### Bug Fixes * **config:** a config file that is not valid YAML stops the load with an error that quotes none of its text ([#2468](#2468)) ([91fe5dc](91fe5dc)) * **config:** config set reports an unknown key as unknown, not as a key that needs a value ([#2465](#2465)) ([8b650a6](8b650a6)) * **devcontainer:** run the checkout's devops in devcontainer terminals ([#2460](#2460)) ([abd2d41](abd2d41)) * **k8s:** loki runs from the grafana-community chart on loki 3.7.9, out of reach of CVE-2026-21729 ([#2470](#2470)) ([96c50c9](96c50c9)) * **security:** a credential keyword at the end of a line no longer masks the first word of the next line ([#2461](#2461)) ([b754a73](b754a73)) * **security:** a credential value is masked also when the next line starts with a parenthesis ([#2477](#2477)) ([ece25ca](ece25ca)), closes [#2471](#2471) * **security:** pin kubeconform and replace Checkov with Trivy's misconfiguration scan ([#2464](#2464)) ([960e357](960e357)) * **security:** refuse GCONV_PATH, SHELLOPTS, BASHOPTS and PS4 from a caller, and archive the merged security changes ([#2453](#2453)) ([1f9231d](1f9231d)) ### Code Refactoring * **ai:** chat_structured is the one structured-output path ([#2452](#2452)) ([3509732](3509732)) * **github:** pr check-readiness reads one merge-readiness verdict from github/ ([#2456](#2456)) ([16442c4](16442c4)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
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.
Only
chat_structuredvalidates a model reply against a schema in production: roadmap intake, refine and research call it. It sends the schema, repairs the JSON, validates it and retries with a schema reflection. The two other paths that #1003 names had no production caller: no module gives aPydanticAgentan output type, an output schema or an output validator, and no productionMultiAgentPipelinesets an output schema. The review builds no agent since the evidence-first redesign (#1137). This change makeschat_structuredthe one structured-output path by deleting the other two, and it builds no new module, because the owner's direction moves structured output to pydantic-ai (#1001, #1419, #1005).PydanticAgentlosesoutput_type,output_schema,output_json_schema,output_validator, the schema block of its system prompt and its output validation stage.ai/agents/runner.pyloses the helpers that validated and reflected.AgentRetrieskeeps onlytools, andAgentSpecandAgentInfoloseoutput_schema.fix_llm_responseloses itsschemaargument and its validation helpers, andFormattedLLMResponseloses the fields that only they set.ai/output/is deleted.MultiAgentPipelinelosesoutput_schema,_parse_pipeline_output,final_data,parsed_dataand its type parameter.chat_structuredusesbuild_schema_reflection_messagefromai/schema_reflection.py, and its own copy is deleted. The message text does not change.tests/invariants/test_source_tree.pyfails when a module other thanai/client/structured.pyandai/schema_reflection.pybuilds a schema reflection. The swallowed-failure ceilings fall by 9.Closes #1003
Change:
openspec/changes/archive/2026-10-28-1003-structured-output-path/