Skip to content

fix: #3315 align generic dict output schemas#3316

Merged
seratch merged 1 commit intoopenai:mainfrom
Aphroq:fix/generic-dict-output-schema
May 9, 2026
Merged

fix: #3315 align generic dict output schemas#3316
seratch merged 1 commit intoopenai:mainfrom
Aphroq:fix/generic-dict-output-schema

Conversation

@Aphroq
Copy link
Copy Markdown
Contributor

@Aphroq Aphroq commented May 9, 2026

Summary

  • Detect generic dict output types by checking their origin before rejecting non-type objects.
  • Keep dict[str, int] unwrapped like bare dict when generating and validating non-strict structured output schemas.
  • Add regression coverage for direct generic dict validation and wrapper-shape rejection.

Test plan

  • uv run pytest tests/test_output_tool.py -k generic_dict
  • bash .agents/skills/code-change-verification/scripts/run.sh

Issue number

Closes #3315

Checks

  • I've added new tests (if relevant)
  • I've added/updated the relevant documentation
  • I've run make lint and make format
  • I've made sure tests pass

@github-actions github-actions Bot added bug Something isn't working feature:core labels May 9, 2026
@seratch seratch added this to the 0.17.x milestone May 9, 2026
@seratch seratch merged commit 94fa9e2 into openai:main May 9, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working feature:core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generic dict output types are wrapped under response

2 participants