2023-08-02 12:05:35 +03:00
|
|
|
[tool.poetry]
|
|
|
|
|
name = "litellm"
|
2026-03-21 22:56:09 -07:00
|
|
|
version = "1.82.6"
|
2023-08-02 12:05:35 +03:00
|
|
|
description = "Library to easily interface with LLM API providers"
|
2025-09-08 16:58:13 -07:00
|
|
|
authors = ["BerriAI"]
|
2024-01-19 10:47:29 +01:00
|
|
|
license = "MIT"
|
2023-08-02 12:05:35 +03:00
|
|
|
readme = "README.md"
|
2024-05-30 14:36:04 -04:00
|
|
|
packages = [
|
|
|
|
|
{ include = "litellm" },
|
|
|
|
|
{ include = "litellm/py.typed"},
|
|
|
|
|
]
|
2023-08-02 12:05:35 +03:00
|
|
|
|
2024-01-20 16:09:40 +01:00
|
|
|
[tool.poetry.urls]
|
|
|
|
|
homepage = "https://litellm.ai"
|
2025-01-04 10:50:24 -08:00
|
|
|
Homepage = "https://litellm.ai"
|
2024-01-20 16:09:40 +01:00
|
|
|
repository = "https://github.com/BerriAI/litellm"
|
2025-01-04 10:50:24 -08:00
|
|
|
Repository = "https://github.com/BerriAI/litellm"
|
2024-01-20 16:09:40 +01:00
|
|
|
documentation = "https://docs.litellm.ai"
|
2025-01-04 10:50:24 -08:00
|
|
|
Documentation = "https://docs.litellm.ai"
|
2024-01-20 16:09:40 +01:00
|
|
|
|
2023-08-02 12:05:35 +03:00
|
|
|
[tool.poetry.dependencies]
|
2025-11-19 01:06:50 -03:00
|
|
|
python = ">=3.9,<4.0"
|
2025-09-27 01:14:20 +09:00
|
|
|
fastuuid = ">=0.13.0"
|
2025-02-04 16:10:48 -08:00
|
|
|
httpx = ">=0.23.0"
|
2025-11-19 01:06:50 -03:00
|
|
|
openai = ">=2.8.0"
|
2023-09-02 15:25:34 -07:00
|
|
|
python-dotenv = ">=0.2.0"
|
2024-06-10 21:21:23 -07:00
|
|
|
tiktoken = ">=0.7.0"
|
2023-09-25 07:33:23 -07:00
|
|
|
importlib-metadata = ">=6.8.0"
|
2023-09-25 09:15:50 -07:00
|
|
|
tokenizers = "*"
|
2023-09-26 13:30:35 -07:00
|
|
|
click = "*"
|
2023-10-03 21:05:20 -07:00
|
|
|
jinja2 = "^3.1.2"
|
2025-06-16 17:31:14 -07:00
|
|
|
aiohttp = ">=3.10"
|
2025-07-01 11:37:23 -07:00
|
|
|
pydantic = "^2.5.0"
|
2025-12-18 08:49:23 -08:00
|
|
|
jsonschema = ">=4.23.0,<5.0.0"
|
2025-05-15 21:53:46 -07:00
|
|
|
numpydoc = {version = "*", optional = true} # used in utils.py
|
2023-09-26 13:30:35 -07:00
|
|
|
|
2026-02-18 14:19:21 -08:00
|
|
|
uvicorn = {version = ">=0.32.1,<1.0.0", optional = true}
|
2025-05-02 16:09:27 -07:00
|
|
|
uvloop = {version = "^0.21.0", optional = true, markers="sys_platform != 'win32'"}
|
2025-03-21 21:58:43 -07:00
|
|
|
gunicorn = {version = "^23.0.0", optional = true}
|
2025-11-01 04:18:03 +02:00
|
|
|
fastapi = {version = ">=0.120.1", optional = true}
|
2023-11-30 16:23:34 -07:00
|
|
|
backoff = {version = "*", optional = true}
|
2024-01-18 18:52:43 +11:00
|
|
|
pyyaml = {version = "^6.0.1", optional = true}
|
2023-11-30 16:23:34 -07:00
|
|
|
rq = {version = "*", optional = true}
|
2023-12-28 12:59:27 +05:30
|
|
|
orjson = {version = "^3.9.7", optional = true}
|
2024-01-23 14:39:35 -08:00
|
|
|
apscheduler = {version = "^3.10.4", optional = true}
|
2024-12-25 19:56:35 -08:00
|
|
|
fastapi-sso = { version = "^0.16.0", optional = true }
|
2026-03-14 19:17:19 -07:00
|
|
|
PyJWT = { version = "^2.12.0", optional = true, python = ">=3.9" }
|
2025-12-01 11:32:55 -03:00
|
|
|
python-multipart = { version = ">=0.0.20", optional = true}
|
2025-09-08 16:59:32 -07:00
|
|
|
cryptography = {version = "*", optional = true}
|
2026-03-07 22:29:36 -05:00
|
|
|
prisma = {version = "^0.11.0", optional = true}
|
2025-11-21 07:53:44 +09:00
|
|
|
azure-identity = {version = "^1.15.0", optional = true, python = ">=3.9"}
|
2024-03-23 17:32:57 +02:00
|
|
|
azure-keyvault-secrets = {version = "^4.8.0", optional = true}
|
2025-07-15 14:47:38 -04:00
|
|
|
azure-storage-blob = {version="^12.25.1", optional=true}
|
2024-03-23 17:32:57 +02:00
|
|
|
google-cloud-kms = {version = "^2.21.3", optional = true}
|
2025-08-05 10:56:34 -07:00
|
|
|
google-cloud-iam = {version = "^2.19.1", optional = true}
|
2026-01-20 20:22:13 -03:00
|
|
|
google-cloud-aiplatform = {version = ">=1.38.0", optional = true}
|
2025-11-19 01:06:50 -03:00
|
|
|
resend = {version = ">=0.8.0", optional = true}
|
2024-07-06 15:30:27 -07:00
|
|
|
pynacl = {version = "^1.5.0", optional = true}
|
2025-11-27 20:08:16 +02:00
|
|
|
websockets = {version = "^15.0.1", optional = true}
|
2026-03-07 22:29:36 -05:00
|
|
|
boto3 = { version = "^1.40.76", optional = true }
|
2025-03-24 18:59:32 -07:00
|
|
|
redisvl = {version = "^0.4.1", optional = true, markers = "python_version >= '3.9' and python_version < '3.14'"}
|
2026-01-19 07:33:05 +09:00
|
|
|
mcp = {version = ">=1.25.0,<2.0.0", optional = true, python = ">=3.10"}
|
2026-01-17 04:56:52 +05:30
|
|
|
a2a-sdk = {version = "^0.3.22", optional = true, python = ">=3.10"}
|
2026-03-21 22:54:41 -07:00
|
|
|
litellm-proxy-extras = {version = "^0.4.60", optional = true}
|
2026-03-07 22:29:36 -05:00
|
|
|
rich = {version = "^13.7.1", optional = true}
|
2026-03-21 20:42:34 +05:30
|
|
|
litellm-enterprise = {version = "0.1.35", optional = true}
|
2025-06-10 14:54:11 -07:00
|
|
|
diskcache = {version = "^5.6.1", optional = true}
|
2025-07-23 13:00:58 -07:00
|
|
|
polars = {version = "^1.31.0", optional = true, python = ">=3.10"}
|
2025-11-19 01:06:50 -03:00
|
|
|
semantic-router = {version = ">=0.1.12", optional = true, python = ">=3.9,<3.14"}
|
2025-07-29 16:51:27 -07:00
|
|
|
mlflow = {version = ">3.1.4", optional = true, python = ">=3.10"}
|
2025-11-08 16:24:31 -08:00
|
|
|
soundfile = {version = "^0.12.1", optional = true}
|
2026-02-13 17:32:29 -08:00
|
|
|
pyroscope-io = {version = "^0.8", optional = true, markers = "sys_platform != 'win32'"}
|
2025-12-11 15:24:48 -08:00
|
|
|
# grpcio constraints:
|
|
|
|
|
# - 1.62.3+ required by grpcio-status
|
|
|
|
|
# - 1.68.0-1.68.1 has reconnect bug (https://github.com/grpc/grpc/issues/38290)
|
|
|
|
|
# - 1.75.0+ has Python 3.14 wheels and bug fix
|
|
|
|
|
grpcio = [
|
2026-01-20 21:03:52 -06:00
|
|
|
{version = ">=1.62.3,!=1.68.*,!=1.69.*,!=1.70.*,!=1.71.0,!=1.71.1,!=1.72.0,!=1.72.1,!=1.73.0", python = "<3.14", optional = true},
|
|
|
|
|
{version = ">=1.75.0", python = ">=3.14", optional = true},
|
2025-12-11 15:24:48 -08:00
|
|
|
]
|
2023-11-30 16:23:34 -07:00
|
|
|
|
|
|
|
|
[tool.poetry.extras]
|
|
|
|
|
proxy = [
|
2024-01-10 17:47:24 +05:30
|
|
|
"gunicorn",
|
2023-11-30 16:23:34 -07:00
|
|
|
"uvicorn",
|
2025-01-10 13:47:18 -08:00
|
|
|
"uvloop",
|
2023-11-30 16:23:34 -07:00
|
|
|
"fastapi",
|
|
|
|
|
"backoff",
|
2023-12-27 17:22:36 +05:30
|
|
|
"pyyaml",
|
2023-11-30 19:50:47 -08:00
|
|
|
"rq",
|
|
|
|
|
"orjson",
|
2024-02-02 07:39:11 -08:00
|
|
|
"apscheduler",
|
|
|
|
|
"fastapi-sso",
|
|
|
|
|
"PyJWT",
|
2024-03-07 21:48:18 -08:00
|
|
|
"python-multipart",
|
2024-08-24 09:48:45 -07:00
|
|
|
"cryptography",
|
2025-03-13 14:38:22 -07:00
|
|
|
"pynacl",
|
2025-03-18 09:15:17 -07:00
|
|
|
"websockets",
|
2025-03-24 18:56:32 -07:00
|
|
|
"boto3",
|
2025-07-15 14:47:38 -04:00
|
|
|
"azure-identity",
|
|
|
|
|
"azure-storage-blob",
|
2025-03-29 15:27:09 -07:00
|
|
|
"mcp",
|
2025-05-05 21:29:57 -07:00
|
|
|
"litellm-proxy-extras",
|
2025-05-09 17:18:48 -07:00
|
|
|
"litellm-enterprise",
|
2025-05-05 21:29:57 -07:00
|
|
|
"rich",
|
2025-07-23 13:00:58 -07:00
|
|
|
"polars",
|
2025-11-08 16:24:31 -08:00
|
|
|
"soundfile",
|
2026-02-13 17:32:29 -08:00
|
|
|
"pyroscope-io",
|
2024-01-01 09:23:34 +05:30
|
|
|
]
|
|
|
|
|
|
2023-12-01 19:36:06 -08:00
|
|
|
extra_proxy = [
|
|
|
|
|
"prisma",
|
|
|
|
|
"azure-identity",
|
2023-12-26 15:39:24 +05:30
|
|
|
"azure-keyvault-secrets",
|
2024-01-01 13:42:36 +05:30
|
|
|
"google-cloud-kms",
|
2025-08-05 10:56:34 -07:00
|
|
|
"google-cloud-iam",
|
2024-06-05 21:52:34 -07:00
|
|
|
"resend",
|
2026-01-17 04:56:52 +05:30
|
|
|
"redisvl",
|
|
|
|
|
"a2a-sdk"
|
2023-12-01 19:36:06 -08:00
|
|
|
]
|
|
|
|
|
|
2025-05-15 21:53:46 -07:00
|
|
|
utils = [
|
|
|
|
|
"numpydoc",
|
|
|
|
|
]
|
|
|
|
|
|
2026-02-13 17:32:29 -08:00
|
|
|
|
|
|
|
|
|
2025-06-10 14:54:11 -07:00
|
|
|
caching = ["diskcache"]
|
|
|
|
|
|
2025-07-24 18:32:56 -07:00
|
|
|
semantic-router = ["semantic-router"]
|
|
|
|
|
|
2025-07-29 16:51:27 -07:00
|
|
|
mlflow = ["mlflow"]
|
|
|
|
|
|
2026-01-20 21:03:52 -06:00
|
|
|
grpc = ["grpcio"]
|
|
|
|
|
|
2026-01-20 20:22:13 -03:00
|
|
|
google = ["google-cloud-aiplatform"]
|
2025-09-23 23:55:14 +09:00
|
|
|
|
2024-06-17 08:28:46 -07:00
|
|
|
[tool.isort]
|
|
|
|
|
profile = "black"
|
|
|
|
|
|
2023-09-26 13:30:35 -07:00
|
|
|
[tool.poetry.scripts]
|
|
|
|
|
litellm = 'litellm:run_server'
|
2025-05-05 21:29:57 -07:00
|
|
|
litellm-proxy = 'litellm.proxy.client.cli:cli'
|
2023-08-02 12:05:35 +03:00
|
|
|
|
2023-12-22 08:14:54 +01:00
|
|
|
[tool.poetry.group.dev.dependencies]
|
2026-02-04 03:29:29 -03:00
|
|
|
diff-cover = "^9.0"
|
2023-12-22 08:14:54 +01:00
|
|
|
flake8 = "^6.1.0"
|
2023-12-22 08:38:19 +01:00
|
|
|
black = "^23.12.0"
|
2024-06-11 14:43:32 -07:00
|
|
|
mypy = "^1.0"
|
2023-12-22 09:25:57 +01:00
|
|
|
pytest = "^7.4.3"
|
2024-02-22 23:23:06 +00:00
|
|
|
pytest-mock = "^3.12.0"
|
2025-03-18 22:05:26 -04:00
|
|
|
pytest-asyncio = "^0.21.1"
|
2026-02-15 20:28:50 -03:00
|
|
|
pytest-postgresql = "^6.0.0"
|
2026-02-17 16:55:37 -03:00
|
|
|
pytest-xdist = "^3.5.0"
|
2025-04-30 16:27:17 -07:00
|
|
|
requests-mock = "^1.12.1"
|
Add low-level HTTP client (#10452)
The client provides access to a low-level HTTP client for making direct
requests to the LiteLLM proxy server. This is useful when you need more
control or when working with endpoints that don't yet have a high-level
interface.
```python
In [2]: client.http.request(
...: method="POST",
...: uri="/health/test_connection",
...: json={
...: "litellm_params": {
...: "model": "gpt-4",
...: "custom_llm_provider": "azure_ai",
...: "litellm_credential_name": None,
...: "api_key": "6xxxxxxx",
...: "api_base": "https://litellm8397336933...",
...: },
...: "mode": "chat",
...: },
...: )
Out[2]:
{'status': 'error',
'result': {'model': 'gpt-4',
'custom_llm_provider': 'azure_ai',
'litellm_credential_name': None,
'api_base': 'https://litellm8397336933...',
...
```
2025-04-30 21:57:06 -07:00
|
|
|
responses = "^0.25.7"
|
2025-04-04 01:19:40 -04:00
|
|
|
respx = "^0.22.0"
|
2026-02-04 03:29:29 -03:00
|
|
|
ruff = "^0.2.1"
|
2025-03-29 11:02:13 -07:00
|
|
|
types-requests = "*"
|
|
|
|
|
types-setuptools = "*"
|
|
|
|
|
types-redis = "*"
|
|
|
|
|
types-PyYAML = "*"
|
2026-01-17 04:56:52 +05:30
|
|
|
opentelemetry-api = "^1.28.0"
|
|
|
|
|
opentelemetry-sdk = "^1.28.0"
|
|
|
|
|
opentelemetry-exporter-otlp = "^1.28.0"
|
2025-05-23 12:04:27 -07:00
|
|
|
langfuse = "^2.45.0"
|
2025-08-12 21:19:29 -07:00
|
|
|
fastapi-offline = "^1.7.3"
|
2026-02-15 20:33:09 -03:00
|
|
|
fakeredis = "^2.27.1"
|
2026-02-17 15:34:14 -03:00
|
|
|
pytest-rerunfailures = "^14.0"
|
2026-03-18 15:02:03 -05:00
|
|
|
parameterized = "^0.9.0"
|
2025-03-28 12:32:04 -07:00
|
|
|
|
|
|
|
|
[tool.poetry.group.proxy-dev.dependencies]
|
|
|
|
|
prisma = "0.11.0"
|
|
|
|
|
hypercorn = "^0.15.0"
|
2025-04-04 22:28:45 -07:00
|
|
|
prometheus-client = "0.20.0"
|
2026-01-17 04:56:52 +05:30
|
|
|
opentelemetry-api = "^1.28.0"
|
|
|
|
|
opentelemetry-sdk = "^1.28.0"
|
|
|
|
|
opentelemetry-exporter-otlp = "^1.28.0"
|
2025-11-21 07:53:44 +09:00
|
|
|
azure-identity = {version = "^1.15.0", python = ">=3.9"}
|
2026-02-14 12:11:53 -08:00
|
|
|
a2a-sdk = {version = "^0.3.22", python = ">=3.10"}
|
2023-12-22 08:14:54 +01:00
|
|
|
|
2023-08-02 12:05:35 +03:00
|
|
|
[build-system]
|
2023-11-30 14:20:17 -08:00
|
|
|
requires = ["poetry-core", "wheel"]
|
2023-08-02 12:05:35 +03:00
|
|
|
build-backend = "poetry.core.masonry.api"
|
2023-10-05 22:15:23 -07:00
|
|
|
|
|
|
|
|
[tool.commitizen]
|
2026-03-21 22:56:09 -07:00
|
|
|
version = "1.82.6"
|
2023-10-06 06:45:14 -07:00
|
|
|
version_files = [
|
|
|
|
|
"pyproject.toml:^version"
|
|
|
|
|
]
|
2023-10-05 22:15:23 -07:00
|
|
|
|
2024-05-17 10:39:36 +08:00
|
|
|
[tool.mypy]
|
|
|
|
|
plugins = "pydantic.mypy"
|
2025-10-24 14:31:59 -07:00
|
|
|
|
|
|
|
|
[tool.pytest.ini_options]
|
|
|
|
|
asyncio_mode = "auto"
|
2026-02-17 16:46:12 -03:00
|
|
|
asyncio_default_fixture_loop_scope = "session"
|
2025-10-24 14:31:59 -07:00
|
|
|
markers = [
|
|
|
|
|
"asyncio: mark test as an asyncio test",
|
2026-01-09 17:36:10 -08:00
|
|
|
"limit_leaks: mark test with memory limit for leak detection (e.g., '40 MB')",
|
|
|
|
|
"no_parallel: mark test to run sequentially (not in parallel) - typically for memory measurement tests",
|
|
|
|
|
]
|
|
|
|
|
filterwarnings = [
|
|
|
|
|
# Suppress Pydantic serializer warnings from mock server responses (non-critical for memory tests)
|
|
|
|
|
# These occur because the mock server returns a simplified response format
|
|
|
|
|
"ignore:Pydantic serializer warnings:UserWarning",
|
|
|
|
|
"ignore::UserWarning:pydantic.main",
|
|
|
|
|
# Suppress pytest-asyncio event loop deprecation warning (handled automatically by pytest-asyncio)
|
|
|
|
|
"ignore::DeprecationWarning:pytest_asyncio.plugin",
|
2025-10-24 14:31:59 -07:00
|
|
|
]
|