Skip to content

fix: handle bare dict in transform - #3457

Closed
nightcityblade wants to merge 1 commit into
openai:mainfrom
nightcityblade:fix/issue-3338
Closed

fix: handle bare dict in transform#3457
nightcityblade wants to merge 1 commit into
openai:mainfrom
nightcityblade:fix/issue-3338

Conversation

@nightcityblade

Copy link
Copy Markdown
Contributor
  • I understand that this repository is auto-generated and my pull request may not be merged

Changes being requested

Fixes #3338.

Return bare dict inputs unchanged in both sync and async transform paths when there is no value type to recurse into, and add a regression test that covers both code paths.

Additional context & links

Validation:

  • uv run pytest tests/test_transform.py -k bare_dict_annotation
  • uv run ruff check src/openai/_utils/_transform.py tests/test_transform.py

@nightcityblade
nightcityblade requested a review from a team as a code owner June 30, 2026 15:18

Copy link
Copy Markdown
Contributor

Thank you for the contribution. The missing type arguments for bare dict annotations are now handled in sync/async request transformation by #3760, which is merged into main.

Closing this PR because the merged change resolves the same crash. Please use a release containing #3760 when available; the fix is not included in v3.11.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: IndexError in _transform_recursive when TypedDict field uses bare dict annotation

2 participants