2023-08-02 17:05:35 +08:00
|
|
|
[tool.poetry]
|
|
|
|
|
name = "litellm"
|
2025-10-01 12:17:23 +08:00
|
|
|
version = "1.77.7"
|
2023-08-02 17:05:35 +08:00
|
|
|
description = "Library to easily interface with LLM API providers"
|
2025-09-09 07:58:13 +08:00
|
|
|
authors = ["BerriAI"]
|
2024-01-19 17:47:29 +08:00
|
|
|
license = "MIT"
|
2023-08-02 17:05:35 +08:00
|
|
|
readme = "README.md"
|
2024-05-31 02:36:04 +08:00
|
|
|
packages = [
|
|
|
|
|
{ include = "litellm" },
|
|
|
|
|
{ include = "litellm/py.typed"},
|
|
|
|
|
]
|
2023-08-02 17:05:35 +08:00
|
|
|
|
2024-01-20 23:09:40 +08:00
|
|
|
[tool.poetry.urls]
|
|
|
|
|
homepage = "https://litellm.ai"
|
2025-01-05 02:50:24 +08:00
|
|
|
Homepage = "https://litellm.ai"
|
2024-01-20 23:09:40 +08:00
|
|
|
repository = "https://github.com/BerriAI/litellm"
|
2025-01-05 02:50:24 +08:00
|
|
|
Repository = "https://github.com/BerriAI/litellm"
|
2024-01-20 23:09:40 +08:00
|
|
|
documentation = "https://docs.litellm.ai"
|
2025-01-05 02:50:24 +08:00
|
|
|
Documentation = "https://docs.litellm.ai"
|
2024-01-20 23:09:40 +08:00
|
|
|
|
2023-08-02 17:05:35 +08:00
|
|
|
[tool.poetry.dependencies]
|
2024-02-13 01:49:11 +08:00
|
|
|
python = ">=3.8.1,<4.0, !=3.9.7"
|
2025-09-27 00:14:20 +08:00
|
|
|
fastuuid = ">=0.13.0"
|
2025-02-05 08:10:48 +08:00
|
|
|
httpx = ">=0.23.0"
|
2025-08-09 08:56:23 +08:00
|
|
|
openai = ">=1.99.5"
|
2023-09-03 06:25:34 +08:00
|
|
|
python-dotenv = ">=0.2.0"
|
2024-06-11 12:21:23 +08:00
|
|
|
tiktoken = ">=0.7.0"
|
2023-09-25 22:33:23 +08:00
|
|
|
importlib-metadata = ">=6.8.0"
|
2023-09-26 00:15:50 +08:00
|
|
|
tokenizers = "*"
|
2023-09-27 04:30:35 +08:00
|
|
|
click = "*"
|
2023-10-04 12:05:20 +08:00
|
|
|
jinja2 = "^3.1.2"
|
2025-06-17 08:31:14 +08:00
|
|
|
aiohttp = ">=3.10"
|
2025-07-02 02:37:23 +08:00
|
|
|
pydantic = "^2.5.0"
|
2024-06-30 10:24:00 +08:00
|
|
|
jsonschema = "^4.22.0"
|
2025-05-16 12:53:46 +08:00
|
|
|
numpydoc = {version = "*", optional = true} # used in utils.py
|
2023-09-27 04:30:35 +08:00
|
|
|
|
2025-01-15 13:47:11 +08:00
|
|
|
uvicorn = {version = "^0.29.0", optional = true}
|
2025-05-03 07:09:27 +08:00
|
|
|
uvloop = {version = "^0.21.0", optional = true, markers="sys_platform != 'win32'"}
|
2025-03-22 12:58:43 +08:00
|
|
|
gunicorn = {version = "^23.0.0", optional = true}
|
2024-12-29 09:08:19 +08:00
|
|
|
fastapi = {version = "^0.115.5", optional = true}
|
2023-12-01 07:23:34 +08:00
|
|
|
backoff = {version = "*", optional = true}
|
2024-01-18 15:52:43 +08:00
|
|
|
pyyaml = {version = "^6.0.1", optional = true}
|
2023-12-01 07:23:34 +08:00
|
|
|
rq = {version = "*", optional = true}
|
2023-12-28 15:29:27 +08:00
|
|
|
orjson = {version = "^3.9.7", optional = true}
|
2024-01-24 06:39:35 +08:00
|
|
|
apscheduler = {version = "^3.10.4", optional = true}
|
2024-12-26 11:56:35 +08:00
|
|
|
fastapi-sso = { version = "^0.16.0", optional = true }
|
2024-02-02 23:39:11 +08:00
|
|
|
PyJWT = { version = "^2.8.0", optional = true }
|
2024-12-26 11:56:35 +08:00
|
|
|
python-multipart = { version = "^0.0.18", optional = true}
|
2025-09-09 07:59:32 +08:00
|
|
|
cryptography = {version = "*", optional = true}
|
2024-03-23 23:32:57 +08:00
|
|
|
prisma = {version = "0.11.0", optional = true}
|
|
|
|
|
azure-identity = {version = "^1.15.0", optional = true}
|
|
|
|
|
azure-keyvault-secrets = {version = "^4.8.0", optional = true}
|
2025-07-16 02:47:38 +08:00
|
|
|
azure-storage-blob = {version="^12.25.1", optional=true}
|
2024-03-23 23:32:57 +08:00
|
|
|
google-cloud-kms = {version = "^2.21.3", optional = true}
|
2025-08-06 01:56:34 +08:00
|
|
|
google-cloud-iam = {version = "^2.19.1", optional = true}
|
2024-03-23 23:32:57 +08:00
|
|
|
resend = {version = "^0.8.0", optional = true}
|
2024-07-07 06:30:27 +08:00
|
|
|
pynacl = {version = "^1.5.0", optional = true}
|
2025-03-14 05:38:22 +08:00
|
|
|
websockets = {version = "^13.1.0", optional = true}
|
2025-08-16 08:06:08 +08:00
|
|
|
boto3 = {version = "1.36.0", optional = true}
|
2025-03-25 09:59:32 +08:00
|
|
|
redisvl = {version = "^0.4.1", optional = true, markers = "python_version >= '3.9' and python_version < '3.14'"}
|
2025-07-30 05:25:22 +08:00
|
|
|
mcp = {version = "^1.10.0", optional = true, python = ">=3.10"}
|
2025-10-05 07:16:34 +08:00
|
|
|
litellm-proxy-extras = {version = "0.2.25", optional = true}
|
2025-07-19 02:54:47 +08:00
|
|
|
rich = {version = "13.7.1", optional = true}
|
2025-09-19 10:24:27 +08:00
|
|
|
litellm-enterprise = {version = "0.1.20", optional = true}
|
2025-06-11 05:54:11 +08:00
|
|
|
diskcache = {version = "^5.6.1", optional = true}
|
2025-07-24 04:00:58 +08:00
|
|
|
polars = {version = "^1.31.0", optional = true, python = ">=3.10"}
|
2025-07-25 09:32:56 +08:00
|
|
|
semantic-router = {version = "*", optional = true, python = ">=3.9"}
|
2025-07-30 07:51:27 +08:00
|
|
|
mlflow = {version = ">3.1.4", optional = true, python = ">=3.10"}
|
2023-12-01 07:23:34 +08:00
|
|
|
|
|
|
|
|
[tool.poetry.extras]
|
|
|
|
|
proxy = [
|
2024-01-10 20:17:24 +08:00
|
|
|
"gunicorn",
|
2023-12-01 07:23:34 +08:00
|
|
|
"uvicorn",
|
2025-01-11 05:47:18 +08:00
|
|
|
"uvloop",
|
2023-12-01 07:23:34 +08:00
|
|
|
"fastapi",
|
|
|
|
|
"backoff",
|
2023-12-27 19:52:36 +08:00
|
|
|
"pyyaml",
|
2023-12-01 11:50:47 +08:00
|
|
|
"rq",
|
|
|
|
|
"orjson",
|
2024-02-02 23:39:11 +08:00
|
|
|
"apscheduler",
|
|
|
|
|
"fastapi-sso",
|
|
|
|
|
"PyJWT",
|
2024-03-08 13:48:18 +08:00
|
|
|
"python-multipart",
|
2024-08-25 00:48:45 +08:00
|
|
|
"cryptography",
|
2025-03-14 05:38:22 +08:00
|
|
|
"pynacl",
|
2025-03-19 00:15:17 +08:00
|
|
|
"websockets",
|
2025-03-25 09:56:32 +08:00
|
|
|
"boto3",
|
2025-07-16 02:47:38 +08:00
|
|
|
"azure-identity",
|
|
|
|
|
"azure-storage-blob",
|
2025-03-30 06:27:09 +08:00
|
|
|
"mcp",
|
2025-05-06 12:29:57 +08:00
|
|
|
"litellm-proxy-extras",
|
2025-05-10 08:18:48 +08:00
|
|
|
"litellm-enterprise",
|
2025-05-06 12:29:57 +08:00
|
|
|
"rich",
|
2025-07-24 04:00:58 +08:00
|
|
|
"polars",
|
2024-01-01 11:53:34 +08:00
|
|
|
]
|
|
|
|
|
|
2023-12-02 11:36:06 +08:00
|
|
|
extra_proxy = [
|
|
|
|
|
"prisma",
|
|
|
|
|
"azure-identity",
|
2023-12-26 18:09:24 +08:00
|
|
|
"azure-keyvault-secrets",
|
2024-01-01 16:12:36 +08:00
|
|
|
"google-cloud-kms",
|
2025-08-06 01:56:34 +08:00
|
|
|
"google-cloud-iam",
|
2024-06-06 12:52:34 +08:00
|
|
|
"resend",
|
2025-03-25 09:59:32 +08:00
|
|
|
"redisvl"
|
2023-12-02 11:36:06 +08:00
|
|
|
]
|
|
|
|
|
|
2025-05-16 12:53:46 +08:00
|
|
|
utils = [
|
|
|
|
|
"numpydoc",
|
|
|
|
|
]
|
|
|
|
|
|
2025-06-11 05:54:11 +08:00
|
|
|
caching = ["diskcache"]
|
|
|
|
|
|
2025-07-25 09:32:56 +08:00
|
|
|
semantic-router = ["semantic-router"]
|
|
|
|
|
|
2025-07-30 07:51:27 +08:00
|
|
|
mlflow = ["mlflow"]
|
|
|
|
|
|
2025-09-23 22:55:14 +08:00
|
|
|
|
2024-06-17 23:28:46 +08:00
|
|
|
[tool.isort]
|
|
|
|
|
profile = "black"
|
|
|
|
|
|
2023-09-27 04:30:35 +08:00
|
|
|
[tool.poetry.scripts]
|
|
|
|
|
litellm = 'litellm:run_server'
|
2025-05-06 12:29:57 +08:00
|
|
|
litellm-proxy = 'litellm.proxy.client.cli:cli'
|
2023-08-02 17:05:35 +08:00
|
|
|
|
2023-12-22 15:14:54 +08:00
|
|
|
[tool.poetry.group.dev.dependencies]
|
|
|
|
|
flake8 = "^6.1.0"
|
2023-12-22 15:38:19 +08:00
|
|
|
black = "^23.12.0"
|
2024-06-12 05:43:32 +08:00
|
|
|
mypy = "^1.0"
|
2023-12-22 16:25:57 +08:00
|
|
|
pytest = "^7.4.3"
|
2024-02-23 07:23:06 +08:00
|
|
|
pytest-mock = "^3.12.0"
|
2025-03-19 10:05:26 +08:00
|
|
|
pytest-asyncio = "^0.21.1"
|
2025-05-01 07:27:17 +08: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-05-01 12:57:06 +08:00
|
|
|
responses = "^0.25.7"
|
2025-04-04 13:19:40 +08:00
|
|
|
respx = "^0.22.0"
|
2025-03-30 02:02:13 +08:00
|
|
|
ruff = "^0.1.0"
|
|
|
|
|
types-requests = "*"
|
|
|
|
|
types-setuptools = "*"
|
|
|
|
|
types-redis = "*"
|
|
|
|
|
types-PyYAML = "*"
|
2025-04-23 01:29:01 +08:00
|
|
|
opentelemetry-api = "1.25.0"
|
|
|
|
|
opentelemetry-sdk = "1.25.0"
|
|
|
|
|
opentelemetry-exporter-otlp = "1.25.0"
|
2025-05-24 03:04:27 +08:00
|
|
|
langfuse = "^2.45.0"
|
2025-08-13 12:19:29 +08:00
|
|
|
fastapi-offline = "^1.7.3"
|
2025-03-29 03:32:04 +08:00
|
|
|
|
|
|
|
|
[tool.poetry.group.proxy-dev.dependencies]
|
|
|
|
|
prisma = "0.11.0"
|
|
|
|
|
hypercorn = "^0.15.0"
|
2025-04-05 13:28:45 +08:00
|
|
|
prometheus-client = "0.20.0"
|
2025-04-23 01:29:01 +08:00
|
|
|
opentelemetry-api = "1.25.0"
|
|
|
|
|
opentelemetry-sdk = "1.25.0"
|
|
|
|
|
opentelemetry-exporter-otlp = "1.25.0"
|
2025-05-23 09:05:28 +08:00
|
|
|
azure-identity = "^1.15.0"
|
2023-12-22 15:14:54 +08:00
|
|
|
|
2023-08-02 17:05:35 +08:00
|
|
|
[build-system]
|
2023-12-01 06:20:17 +08:00
|
|
|
requires = ["poetry-core", "wheel"]
|
2023-08-02 17:05:35 +08:00
|
|
|
build-backend = "poetry.core.masonry.api"
|
2023-10-06 13:15:23 +08:00
|
|
|
|
|
|
|
|
[tool.commitizen]
|
2025-10-01 12:23:42 +08:00
|
|
|
version = "1.77.7"
|
2023-10-06 21:45:14 +08:00
|
|
|
version_files = [
|
|
|
|
|
"pyproject.toml:^version"
|
|
|
|
|
]
|
2023-10-06 13:15:23 +08:00
|
|
|
|
2024-05-17 10:39:36 +08:00
|
|
|
[tool.mypy]
|
|
|
|
|
plugins = "pydantic.mypy"
|