fix(models): retry after pydantic schema rebuild error#3106
fix(models): retry after pydantic schema rebuild error#3106MukundaKatta wants to merge 1 commit intoopenai:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b0cd49aa3f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| ) | ||
|
|
||
| import pydantic | ||
| from pydantic.errors import PydanticUserError |
There was a problem hiding this comment.
Guard v2-only PydanticUserError import
Importing PydanticUserError at module load time breaks the declared pydantic>=1.9.0,<3 compatibility path: in Pydantic v1, pydantic.errors does not export PydanticUserError, so importing openai._models raises ImportError before the PYDANTIC_V1 branch can short-circuit. This would fail all v1 environments (including the repo’s test-pydantic-v1 nox session) even though the new retry logic is only intended for v2.
Useful? React with 👍 / 👎.
Summary
Testing