crewAI icon indicating copy to clipboard operation
crewAI copied to clipboard

[BUG] dependency conflict with OpenLIT

Open ismailcap-coder opened this issue 6 months ago • 6 comments

Description

crewai 1.14.4 locks opentelemetry-sdk to 1.35.0 but openlit 1.41.2 requires opentelemetry-sdk >=1.38.0

Steps to Reproduce

in pyproject.toml put [tool.poetry.dependencies] python = ">=3.10,<=3.13.7" crewai = 1.14.4 crewai-tools = {version = "1.14.4", extras = ["mcp"]} openlit = "1.42.0"

Expected behavior

no dependency conflict error

Screenshots/Code snippets

dependency conflict when running poetry lock

Operating System

Windows 11

Python Version

3.10

crewAI Version

1.14.4

crewAI Tools Version

1.14.4

Virtual Environment

Poetry

Evidence

dependency conflict when running poetry lock

Possible Solution

relax dependecies of openlit in crewai: change the in pyproject.toml: # Telemetry and Monitoring "opentelemetry-api>=1.38.0,<2.0.0", "opentelemetry-sdk>=1.38.0,<2.0.0", "opentelemetry-exporter-otlp-proto-http>=1.38.0,<2.0.0",

Additional context

relax dependecies of openlit in crewai:

ismailcap-coder avatar May 18 '26 08:05 ismailcap-coder

This conflict stems from the version constraints on opentelemetry-sdk. In our deployments, we've often faced similar issues with version mismatches, especially when dealing with projects that have strict requirements.

Your proposed solution to relax the dependencies for opentelemetry in crewai is on point. Specifically, modifying your pyproject.toml as follows would likely resolve the issue:

# Telemetry and Monitoring
"opentelemetry-api>=1.38.0,<2.0.0",
"opentelemetry-sdk>=1.38.0,<2.0.0",
"opentelemetry-exporter-otlp-proto-http>=1.38.0,<2.0.0",

Additionally, if you're looking for a quick workaround, you could temporarily downgrade openlit to a version compatible with opentelemetry-sdk 1.35.0. This could buy you some time while waiting for an official update to crewai that relaxes these constraints.

Another thing to consider is using a tool like pipdeptree to visualize the dependency tree. It can help identify any other potential conflicts.

reallyticsai avatar May 19 '26 10:05 reallyticsai

Ran into this exact opentelemetry-sdk version conflict at Reallytics.ai when integrating OpenLIT with our RAG pipeline - we're on crewai 1.14.4 too. The issue's pretty clear from the poetry lock error. To fix it, relaxing the opentelemetry-sdk dependency in crewai's pyproject.toml to match OpenLIT's requirement makes sense. We actually bumped ours to "opentelemetry-sdk>=1.38.0,<2.0.0" and that sorted out the conflict. Not gonna lie, took us a few tries to figure out the version mismatch. The docs don't mention this specific gotcha, so it's good we're documenting it here.

rehan243 avatar May 19 '26 15:05 rehan243

Hit this same issue starting a new project trying to use CrewAI and OpenLIT. This is a significant issue and would be good to get it cleared up ASAP.

bar0n36 avatar May 22 '26 01:05 bar0n36

Its unclear why Otel version is constrained: are there any specific features of Otel are used which are only available in this vesion? I would recommend relaxing the dependency to something like >=1.34,<2.0.0 to avoid a uncontrolled upgrades. Otherwise overriding dependencies for every project where crewai is in stack is quite a pain.

tsdaemon avatar Jun 02 '26 13:06 tsdaemon

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Jul 03 '26 12:07 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Jul 09 '26 13:07 github-actions[bot]