fix(openai): remove unreachable None type assignments for OpenAI classes (#1546)
The second try/except block that assigns None to AsyncOpenAI, AsyncAzureOpenAI, AzureOpenAI, and OpenAI is unreachable because: 1. The first try/except raises ModuleNotFoundError if openai is missing 2. Line 28 already imports from openai._types (v1.x only), so if execution reaches the second block, openai 1.x is installed Merge both imports into a single try/except so type checkers correctly infer these as their actual types instead of type | None. Co-authored-by: Hassieb Pakzad <68423100+hassiebp@users.noreply.github.com>
B
Br1an committed
849db5eb028c00e5940b745b6585edcddbb75ded
Parent: 3e0fa96
Committed by GitHub <noreply@github.com>
on 3/2/2026, 9:46:51 AM