Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

Summary

This PR addresses issue #4201 where crewAI's overly restrictive dependency constraints (using ~= operator) caused conflicts when installing alongside packages like opik for monitoring.

The ~= operator (compatible release) was too restrictive as it only allows patch version updates. For example, openai~=1.83.0 means >=1.83.0,<1.84.0, which conflicts with other packages that need different openai versions.

Changes:

  • Changed dependency constraints from ~= to >= for core dependencies in both crewai and crewai-tools
  • Added upper bounds (<3.0.0) for pydantic and pydantic-settings to prevent major version breaks
  • Removed duplicate lancedb entry in crewai-tools
  • Added tests to verify dependency constraints remain flexible

Review & Testing Checklist for Human

  • Verify minimum version compatibility: Some minimum versions were lowered (e.g., opentelemetry-api 1.34.0→1.30.0, chromadb 1.1.0→1.0.0, python-dotenv 1.1.1→1.0.0). Confirm the codebase doesn't rely on features from the newer versions.
  • Test opik integration: Install crewai alongside opik in a fresh environment to confirm the dependency conflict is resolved: pip install crewai opik
  • Verify openai compatibility: The openai constraint was significantly loosened from ~=1.83.0 to >=1.13.3. Test that crewai works correctly with both older and newer openai versions.

Recommended test plan:

# Create fresh environment
python -m venv test_env && source test_env/bin/activate

# Install crewai with opik (this should now succeed)
pip install crewai opik

# Run a basic crewai example to verify functionality

Notes

Fixes #4201

This commit addresses issue #4201 where crewAI's overly restrictive
dependency constraints (using ~= operator) caused conflicts when
installing alongside packages like opik.

Changes:
- Changed dependency constraints from ~= (compatible release) to >=
  (minimum version) for core dependencies in crewai and crewai-tools
- Key dependencies loosened: openai, pydantic, pydantic-settings,
  opentelemetry-*, and others
- Added tests to verify dependency constraints remain flexible

The ~= operator was too restrictive as it only allows patch version
updates (e.g., openai~=1.83.0 means >=1.83.0,<1.84.0). This caused
dependency resolution failures when other packages needed different
versions of shared dependencies.

Fixes #4201

Co-Authored-By: João <joao@crewai.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

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.

[BUG] Dependency error when connecting to OPIK

1 participant