Skip to content

ModuleNotFoundError: No module named 'enterprise' #10353 #21

@Naveed101633

Description

@Naveed101633

Bug Description
Running a Python script in Google Colab using litellm==1.48.1 throws ModuleNotFoundError: No module named 'enterprise' when importing LitellmModel from agents.extensions.models.litellm_model. The same script worked fine the previous night, suggesting a recent environment or dependency change.

Additional Context

The error originates from litellm/responses/litellm_completion_transformation/transformation.py, attempting to import from enterprise.enterprise_hooks.session_handler.
Similar issue reported in BerriAI/litellm#5909 — likely related to a missing or premium enterprise module.
Colab’s runtime may have reset, causing package mismatches.
Possible Causes

Missing Enterprise Module: enterprise might be a separate (undocumented) package like litellm-proxy-enterprise.
New Dependency: litellm==1.48.1 may have introduced this dependency unexpectedly.
Colab Reset: Temporary Colab environment reset could have lost critical packages.
Undocumented Feature: enterprise might belong to a premium feature and should be handled optionally.
Suggested Fix

Clarify if enterprise is required for standard usage or is a separate installation.
If optional, update litellm to handle missing imports gracefully (e.g., try-except block).
Recommend a stable, verified litellm version or pin dependencies to avoid such issues.
Provide clear installation guidance for any enterprise-related modules.
Workarounds Attempted

Reinstalled litellm==1.48.1 and agents; error persists.
Tried !pip install litellm-proxy-enterprise; package not found on PyPI.
Downgrading to litellm==1.40.14 (which might avoid the dependency) was considered but not yet tested.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions