fix: relax openai version constraint to allow 2.x for litellm[proxy] compatibility #4080
+4,439
−4,226
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix: relax openai version constraint to allow 2.x for litellm[proxy] compatibility
Summary
Fixes #4079 - CrewAI could not be installed alongside
litellm[proxy]>=1.74.9due to conflicting openai version requirements.The openai dependency constraint was changed from
~=1.83.0(which resolves to>=1.83.0,<1.84.0) to>=1.83.0,<3. This allows:<3to prevent future breaking changesAdded 5 tests to verify:
Review & Testing Checklist for Human
uv add 'litellm[proxy]>=1.74.9'followed byuv add 'crewai[tools]'in a fresh project to confirm no dependency conflictopenai<2.0.0. Verify the new lock resolves to an instructor version compatible with openai 2.xRecommended test plan: Create a fresh virtualenv, install crewai with the new constraint alongside litellm[proxy], and run a simple crew with an OpenAI agent to verify end-to-end functionality.
Notes
crewai.llms.providers.openai.completionwork correctly<3upper bound follows best practices for library dependencies to prevent silent breaks on future major versionsLink to Devin run: https://app.devin.ai/sessions/a408495cc237451389a7c33a747dcac9
Requested by: João (joao@crewai.com)