LiteLLM Enterprise
LiteLLM Enterprise is a Python package designed to provide enterprise-grade features and functionality on top of the core LiteLLM library. It currently wraps and re-exports much of the base LiteLLM functionality. The package is at version 0.1.37 and appears to be in an early development stage, with its release cadence likely tied to the rapidly evolving LiteLLM ecosystem.
Warnings
- gotcha The `litellm-enterprise` package's `__init__.py` re-exports all symbols directly from the core `litellm` library. This means that `from litellm_enterprise import X` is functionally identical to `from litellm import X` for most symbols. This can lead to confusion regarding the package's distinct functionality.
- gotcha Dedicated documentation for features unique to `litellm-enterprise` is currently scarce. Users will primarily need to refer to the comprehensive documentation of the main `litellm` library for usage patterns and API details.
- gotcha The version number of `litellm-enterprise` (0.1.x) is significantly lower than the `1.x.x` versions of the main `litellm` library. This disparity might indicate an early-stage project, potential API instability, or a different release cadence, which could impact expectations for production readiness.
- gotcha While named 'enterprise', specific enterprise features like Role-Based Access Control (RBAC), advanced logging, or custom integrations often manifest through the LiteLLM Proxy or specific server configurations, rather than being solely exposed or enabled by this Python package directly. The package primarily facilitates accessing the underlying LiteLLM functionality.
Install
-
pip install litellm-enterprise
Imports
- completion
from litellm_enterprise import completion
- Router
from litellm_enterprise import Router
Quickstart
import os
from litellm_enterprise import completion
os.environ['OPENAI_API_KEY'] = os.environ.get('OPENAI_API_KEY', 'sk-your-openai-key')
try:
response = completion(
model="gpt-3.5-turbo",
messages=[{"role": "user", "content": "What is LiteLLM?"}]
)
print(response.choices[0].message.content)
except Exception as e:
print(f"An error occurred: {e}")