Skip to content

Conversation

Mazz-Ather
Copy link

This fixes the error "TypeError: Cannot instantiate typing.Union" that happens in recent openai-python versions (e.g., 1.99.3+). The param type is a Union, so it can't be created directly. Changed to use a dict, which works with the API.

Tested with my own agent code that was failing—now it runs fine without downgrading openai.

Related to openai/openai-python issues like #2529 or #2541 (if they exist; I couldn't find exact matches, but similar problems reported).

Thanks!

@seratch
Copy link
Member

seratch commented Aug 11, 2025

Thanks for sending this, but we'll resolve this by #1415

@seratch seratch closed this Aug 11, 2025
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.

2 participants