Closed
Description
Describe the bug
Using adk v0.3.0 + litellm v1.67.4 (latest), no interaction with any agent can be performed in adk web. An exception is thrown: "No module named 'enterprise'".
Last week should have been normal, but after updating adk and litellm to the latest version, it became abnormal.
To Reproduce
Steps to reproduce the behavior:
- Direct new environment
pip install adk
pip install litellm
- Follow the official example weather_time_agent,Modify the model to connect to litellm:
model=LiteLlm(
model="openai/Qwen/Qwen2.5-72B-Instruct",
base_url="https://api.siliconflow.cn/v1",
api_key="***"
),
- run
adk web
,Error occurred "No module named 'enterprise'"
Exception stack
2025-04-27 17:42:32,617 - INFO - envs.py:54 - No .env file found for mcp_file_v2_agent
2025-04-27 17:42:32,680 - ERROR - fast_api.py:637 - Error in event_generator: No module named 'enterprise'
Traceback (most recent call last):
File "D:\tools\anaconda3\envs\test_adk_313\Lib\site-packages\google\adk\cli\fast_api.py", line 625, in event_generator
runner = await _get_runner_async(req.app_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\tools\anaconda3\envs\test_adk_313\Lib\site-packages\google\adk\cli\fast_api.py", line 796, in _get_runner_async
root_agent = await _get_root_agent_async(app_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\tools\anaconda3\envs\test_adk_313\Lib\site-packages\google\adk\cli\fast_api.py", line 773, in _get_root_agent_async
agent_module = importlib.import_module(app_name)
File "D:\tools\anaconda3\envs\test_adk_313\Lib\importlib\__init__.py", line 88, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 1026, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "D:\code\test_adk\mcp_file_v2_agent\__init__.py", line 1, in <module>
from . import agent
File "D:\code\test_adk\mcp_file_v2_agent\agent.py", line 1, in <module>
from google.adk.models.lite_llm import LiteLlm
File "D:\tools\anaconda3\envs\test_adk_313\Lib\site-packages\google\adk\models\lite_llm.py", line 31, in <module>
from litellm import acompletion
File "D:\tools\anaconda3\envs\test_adk_313\Lib\site-packages\litellm\__init__.py", line 1058, in <module>
from .responses.main import *
File "D:\tools\anaconda3\envs\test_adk_313\Lib\site-packages\litellm\responses\main.py", line 13, in <module>
from litellm.responses.litellm_completion_transformation.handler import (
LiteLLMCompletionTransformationHandler,
)
File "D:\tools\anaconda3\envs\test_adk_313\Lib\site-packages\litellm\responses\litellm_completion_transformation\handler.py", line 8, in <module>
from litellm.responses.litellm_completion_transformation.streaming_iterator import (
LiteLLMCompletionStreamingIterator,
)
File "D:\tools\anaconda3\envs\test_adk_313\Lib\site-packages\litellm\responses\litellm_completion_transformation\streaming_iterator.py", line 5, in <module>
from litellm.responses.litellm_completion_transformation.transformation import (
LiteLLMCompletionResponsesConfig,
)
File "D:\tools\anaconda3\envs\test_adk_313\Lib\site-packages\litellm\responses\litellm_completion_transformation\transformation.py", line 9, in <module>
from enterprise.enterprise_hooks.session_handler import (
...<2 lines>...
)
ModuleNotFoundError: No module named 'enterprise'
Desktop :
- OS: windows11
- Python version: 3.13.3
- ADK version: 0.3.0
- Litellm version: 1.67.4(latest)