fix: relax openai version constraint to allow 2.x for litellm[proxy] compatibility

Fixes #4079

The openai version constraint was pinned to ~=1.83.0 (>=1.83.0,<1.84.0),
which prevented installation alongside litellm[proxy]>=1.74.9 that requires
openai>=2.8.0.

Changes:
- Updated openai constraint from ~=1.83.0 to >=1.83.0,<3
- Added tests to verify the constraint allows openai 2.8.0
- Added import smoke tests for OpenAI provider compatibility

The new constraint:
- Maintains backward compatibility with openai 1.83.x
- Allows openai 2.x for users who need litellm[proxy]
- Caps at <3 to prevent future breaking changes

Verified that all OpenAI SDK imports used by crewAI's OpenAI provider
work correctly with openai 2.8.0.

Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
Devin AI
2025-12-13 10:01:34 +00:00
parent 38b0b125d3
commit 480ad5bbb2
3 changed files with 4365 additions and 4152 deletions

View File

@@ -10,7 +10,7 @@ requires-python = ">=3.10, <3.14"
dependencies = [
# Core Dependencies
"pydantic~=2.11.9",
"openai~=1.83.0",
"openai>=1.83.0,<3",
"instructor>=1.3.3",
# Text Processing
"pdfplumber~=0.11.4",