Skip to content

test(crewai): install a litellm that crewAI 1.15.31+ can load - #290

Merged
ralf0131 merged 1 commit into
alibaba:mainfrom
pylaterreur:crewai-1.15.32-llm
Oct 28, 2026
Merged

ralf0131 merged 1 commit into
alibaba:mainfrom
pylaterreur:crewai-1.15.32-llm

Conversation

@pylaterreur

Copy link
Copy Markdown
Contributor

Description

Since crewAI 1.15.31 (2026-10-27), the crewai jobs fail on every Python version: the 11 tests whose agents use openai/qwen-turbo raise ImportError: Unable to initialize LLM with model 'openai/qwen-turbo'. ... the LiteLLM fallback package is not installed, even though litellm 1.95.0 is installed. main fails the same way (run 40613512657).

crewAI has no native model named qwen-turbo, so it serves that model through its LiteLLM fallback. crewAI 1.15.31 (crewAIInc/crewAI#8676) made the fallback import ChatCompletionDeltaCustomToolCall from litellm.types.utils. litellm added that name in 1.97.0, and crewAI reports the ImportError as LiteLLM not being installed. The tests' aiohttp<3.12 cap held litellm at 1.95.0, because every later litellm release needs aiohttp 3.14.2 or later.

This PR drops the cap from the crewai test requirements and requires litellm 1.97.0 or later. Alternatives that don't work:

vcrpy has supported aiohttp 3.14 since 8.2.0. CI installs vcrpy 8.5.0 on Python 3.10 and 9.2.0 on later versions.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • tox -c tox-loongsuite.ini -e py3{10,11,12,13}-test-loongsuite-instrumentation-crewai -- -ra as CI runs it (tox-uv 1.35.2, GitHub CPython 3.10.22/3.11.18/3.12.16/3.13.18), which installed crewai 1.15.32, litellm 1.106.5 and aiohttp 3.14.5: 48 passed on each version. The same envs also passed offline (bwrap --unshare-net): 1 run each, plus 5 more on 3.12 and 3 more on 3.10.
  • With the failing CI run's package set (--exclude-newer), offline, Python 3.12:
    • on main: 48 passed with crewai 1.15.30, and 11 failed with crewai 1.15.32 (the CI failure);
    • on this branch: 48 passed with crewai 1.15.32 (Python 3.10 and 3.12) and with crewai 1.15.30.
  • The spans of all 41 span-checking tests (name, kind, operation, status, parent) are the same on main with crewai 1.15.30 as on this branch with crewai 1.15.32.
  • tox -c tox-loongsuite.ini -e lint-loongsuite-instrumentation-crewai (Python 3.13) and tox -e precommit (Python 3.11) pass.

Does This PR Require a Core Repo Change?

  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

🤖 Generated with Claude Code

https://claude.ai/code/session_01GwUvhmzgfkiZ6vo4uGyesN

Since crewAI 1.15.31 (2026-10-27), the 11 crewai tests whose agents
use "openai/qwen-turbo" fail on every Python with "Unable to
initialize LLM with model 'openai/qwen-turbo'. ... the LiteLLM
fallback package is not installed", although litellm 1.95.0 is
installed.

crewAI has no native model named qwen-turbo, so it serves that model
through its LiteLLM fallback. crewAI 1.15.31 (crewAIInc/crewAI#8676)
made the fallback import ChatCompletionDeltaCustomToolCall from
litellm.types.utils, which litellm added in 1.97.0, and it reports
the ImportError as LiteLLM not being installed. The tests' aiohttp<3.12
cap held litellm at 1.95.0: every later release needs aiohttp 3.14.2
or later.

Drop the aiohttp cap and require litellm 1.97.0 or later. vcrpy has
supported aiohttp 3.14 since 8.2.0; CI installs 8.5.0 on Python 3.10
and 9.2.0 on later versions. crewai[litellm] would not do: crewAI pins
litellm 1.100.4 there, which fails to import on Python 3.10.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GwUvhmzgfkiZ6vo4uGyesN
@pylaterreur

Copy link
Copy Markdown
Contributor Author

@sipercai @ralf0131 CI is green here. main has been red on the crewai jobs since crewAI 1.15.31 (the push run after #285 fails the same 11 tests on all four crewai jobs), and #289, #292 and any other PR that touches crewai or a shared file inherit that. Could you review this one first? It only changes the crewai test requirements and the package changelog.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GwUvhmzgfkiZ6vo4uGyesN

@ralf0131
ralf0131 merged commit 0256613 into alibaba:main Oct 28, 2026
22 checks passed
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.

4 participants