From 46c28abc23743f42b21c3b1d52fecf7dfb3c88b3 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Le Borgne Date: Wed, 28 Oct 2026 10:07:50 +0000 Subject: [PATCH] test(crewai): install a litellm that crewAI 1.15.31+ can load 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 Claude-Session: https://claude.ai/code/session_01GwUvhmzgfkiZ6vo4uGyesN --- .../loongsuite-instrumentation-crewai/CHANGELOG.md | 4 ++++ .../tests/test-requirements.txt | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/instrumentation-loongsuite/loongsuite-instrumentation-crewai/CHANGELOG.md b/instrumentation-loongsuite/loongsuite-instrumentation-crewai/CHANGELOG.md index 69b06d97a..c8a49cfae 100644 --- a/instrumentation-loongsuite/loongsuite-instrumentation-crewai/CHANGELOG.md +++ b/instrumentation-loongsuite/loongsuite-instrumentation-crewai/CHANGELOG.md @@ -17,6 +17,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 block real connections. A telemetry export in flight let concurrent LLM calls skip their cassettes, so tests failed at random. ([#287](https://github.com/alibaba/loongsuite-python/pull/287)) +- Fix the CrewAI tests on crewAI 1.15.31 and later: its LiteLLM fallback, which + serves the tests' `openai/qwen-turbo` model, needs litellm 1.97.0 or later, + and the tests' `aiohttp<3.12` cap held litellm at 1.95.0. + ([#290](https://github.com/alibaba/loongsuite-python/pull/290)) ## Version 0.9.0 (2026-09-07) diff --git a/instrumentation-loongsuite/loongsuite-instrumentation-crewai/tests/test-requirements.txt b/instrumentation-loongsuite/loongsuite-instrumentation-crewai/tests/test-requirements.txt index 66ec984bc..82cc1f0fd 100644 --- a/instrumentation-loongsuite/loongsuite-instrumentation-crewai/tests/test-requirements.txt +++ b/instrumentation-loongsuite/loongsuite-instrumentation-crewai/tests/test-requirements.txt @@ -30,12 +30,16 @@ # the crewai latest supported version of external dependencies. crewai>=0.80.0 -litellm>=1.79.0 +# crewAI runs "openai/qwen-turbo" through its LiteLLM fallback, which since +# crewAI 1.15.31 needs litellm 1.97.0+ and otherwise reports LiteLLM as not +# installed. Such litellm releases need aiohttp 3.14.2+, so aiohttp is not +# capped. Not crewai[litellm]: it pins litellm 1.100.4, which fails to +# import on Python 3.10. +litellm>=1.97.0 openai>=2.0.0 respx>=0.20.0 pysqlite3 vcrpy>=6.0.0 -aiohttp<3.12 opentelemetry-test-utils pytest-recording>=0.13.0 opentelemetry-api