Fixes: Passing a supported JSON Schema dictionary into structured-output generation raises TypeError before any model request instead of parsing the returned dictionary.
Root cause: get_structured_output_parser documents and types dictionaries as valid schemas but calls the class-only issubclass builtin before dispatching dictionary schemas to _dict_output_parser.
I also attempted the repository CI selection, uv run pytest tests/ -m "unit or not integration". It reached 95% with unrelated live-provider, browser, network, and existing assertion failures, then was interrupted when an external proxy request stalled. The deterministic affected suites listed above pass.
dosubotBot
added
size:XS
This PR changes 0-9 lines, ignoring generated files.
bug
Something isn't working
tests
Improvements or additions to test
labels
Aug 11, 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
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.
Summary
Regression evidence
Before: PYTHONDONTWRITEBYTECODE=1 uv run --frozen pytest -o addopts='' -p no:cacheprovider tests/utils/output_parser_test.py::test_structured_output_parser_accepts_json_schema -q exited 1
After: PYTHONDONTWRITEBYTECODE=1 uv run --frozen pytest -o addopts='' -p no:cacheprovider tests/utils/output_parser_test.py::test_structured_output_parser_accepts_json_schema -q exited 0
Verification
Scope
Local full-suite note
I also attempted the repository CI selection, uv run pytest tests/ -m "unit or not integration". It reached 95% with unrelated live-provider, browser, network, and existing assertion failures, then was interrupted when an external proxy request stalled. The deterministic affected suites listed above pass.