The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
[Infra] Packaging: Relax Core Runtime Pins To Ranges
Yuneng Jiang3d55afe38b51
diff --git a/.github/workflows/check-dependency-floors.yml b/.github/workflows/check-dependency-floors.ymlnew file mode 100644index 00000000000..8fc5b8564ee--- /dev/null+++ b/.github/workflows/check-dependency-floors.yml@@ -0,0 +1,117 @@+name: Check dependency floors++on:+ pull_request:+ paths:+ - 'pyproject.toml'+ - '.github/workflows/check-dependency-floors.yml'+ workflow_dispatch:++permissions:+ contents: read++jobs:+ resolve-and-import:+ name: Install at lowest-direct + smoke-import litellm+ runs-on: ubuntu-latest+ timeout-minutes: 10+ strategy:+ fail-fast: false+ matrix:+ python-version: ["3.10", "3.13"]+ steps:+ - name: Checkout PR+ uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0+ with:+ persist-credentials: false++ - name: Set up uv+ uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7+ with:+ version: "0.10.9"+ enable-cache: false++ - name: Set up Python ${{ matrix.python-version }}+ run: uv python install ${{ matrix.python-version }}++ - name: Resolve litellm core deps at floor versions+ run: |+ uv venv --python ${{ matrix.python-version }} /tmp/floor-venv+ uv pip install --python /tmp/floor-venv/bin/python --resolution=lowest-direct .++ - name: Smoke-import litellm at floor versions+ run: |+ /tmp/floor-venv/bin/python <<'PY'+ import importlib++ # Import the SDK itself.+ import litellm # noqa: F401++ # Import every openai-namespace symbol the codebase actually uses+ # at runtime. If a floor is set lower than the version that+ # introduced any of these, the install will silently succeed and+ # then fail at runtime in customer code. This list mirrors the+ # openai imports under litellm/ — keep it in sync.+ import openai # noqa: F401+ from openai import ( # noqa: F401+ AsyncAzureOpenAI,+ AsyncOpenAI,+ AzureOpenAI,+ OpenAI,+ APIError,+ APITimeoutError,+ Omit,+ )+ from openai.types.responses import ( # noqa: F401+ ResponseFunctionToolCall,+ ResponseInputImageParam,+ ResponseOutputMessage,+ ResponseReasoningItem,+ )+ from openai.types.responses.response import ( # noqa: F401+ IncompleteDetails,+ Response,+ ResponseOutputItem,+ Tool,+ ToolChoice,+ )+ from openai.types.responses.response_output_item import ( # noqa: F401+ ResponseApplyPatchToolCall,+ )+ from openai.types.responses.response_text_config_param import ( # noqa: F401+ ResponseTextConfigParam,+ )+ from openai.types.responses.tool_param import ( # noqa: F401+ FunctionToolParam,+ )++ # Sanity-check the other direct deps load.+ for mod in (+ "pydantic",+ "httpx",+ "aiohttp",+ "tokenizers",+ "tiktoken",+ "click",+ "jinja2",+ "jsonschema",+ "importlib_metadata",+ "fastuuid",+ "dotenv",+ ):+ importlib.import_module(mod)++ print("All floor-version imports OK")+ PY++ - name: Report resolved versions+ if: always()+ run: |+ /tmp/floor-venv/bin/python -c "+ from importlib.metadata import version+ for pkg in ['litellm', 'openai', 'pydantic', 'httpx', 'aiohttp', 'tokenizers', 'tiktoken', 'click', 'jinja2', 'jsonschema', 'importlib-metadata', 'fastuuid', 'python-dotenv']:+ try:+ print(f'{pkg}: {version(pkg)}')+ except Exception as e:+ print(f'{pkg}: <not installed> ({e})')+ "diff --git a/pyproject.toml b/pyproject.tomlindex 48acf8d8712..61502993bd0 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -10,18 +10,21 @@ authors = [{ name = "BerriAI" },]dependencies = [- "fastuuid==0.14.0",- "httpx==0.28.1",- "openai==2.33.0",- "python-dotenv==1.2.2",- "tiktoken==0.12.0",- "importlib-metadata==8.5.0",- "tokenizers==0.23.1",- "click==8.1.8",- "jinja2==3.1.6",- "aiohttp==3.13.4",- "pydantic==2.12.5",- "jsonschema==4.23.0",+ # Ranges (not exact pins) so SDK consumers can coexist with their other+ # deps. Reproducibility for our Docker/CI comes from `uv.lock`. The+ # `dependency-floors` CI job validates the floors actually install.+ "fastuuid>=0.14.0,<1.0",+ "httpx>=0.28.0,<1.0",+ "openai>=2.20.0,<3.0.0",+ "python-dotenv>=1.0.0,<2.0",+ "tiktoken>=0.7.0,<1.0",+ "importlib-metadata>=8.0.0",+ "tokenizers>=0.20.0,<1.0",+ "click>=8.0.0,<9.0",+ "jinja2>=3.1.0,<4.0",+ "aiohttp>=3.10,<4.0",+ "pydantic>=2.5.0,<3.0.0",+ "jsonschema>=4.0.0,<5.0",][project.urls]diff --git a/uv.lock b/uv.lockindex dde75bc1383..d8cbead4a2f 100644--- a/uv.lock+++ b/uv.lock@@ -3261,7 +3261,7 @@ proxy-dev = [[package.metadata]requires-dist = [{ name = "a2a-sdk", marker = "extra == 'extra-proxy'", specifier = "==0.3.24" },- { name = "aiohttp", specifier = "==3.13.4" },+ { name = "aiohttp", specifier = ">=3.10,<4.0" },{ name = "anthropic", extras = ["vertex"], marker = "extra == 'proxy-runtime'", specifier = "==0.84.0" },{ name = "apscheduler", marker = "extra == 'proxy'", specifier = "==3.11.2" },{ name = "aurelio-sdk", marker = "python_full_version < '3.14' and extra == 'semantic-router'", specifier = "==0.0.19" },@@ -3273,14 +3273,14 @@ requires-dist = [{ name = "azure-storage-file-datalake", marker = "extra == 'proxy-runtime'", specifier = "==12.20.0" },{ name = "backoff", marker = "extra == 'proxy'", specifier = "==2.2.1" },{ name = "boto3", marker = "extra == 'proxy'", specifier = "==1.43.1" },- { name = "click", specifier = "==8.1.8" },+ { name = "click", specifier = ">=8.0.0,<9.0" },{ name = "cryptography", marker = "extra == 'proxy'", specifier = "==46.0.7" },{ name = "ddtrace", marker = "extra == 'proxy-runtime'", specifier = "==2.19.0" },{ name = "detect-secrets", marker = "extra == 'proxy-runtime'", specifier = "==1.5.0" },{ name = "diskcache", marker = "extra == 'caching'", specifier = "==5.6.3" },{ name = "fastapi", marker = "extra == 'proxy'", specifier = "==0.124.4" },{ name = "fastapi-sso", marker = "extra == 'proxy'", specifier = "==0.19.0" },- { name = "fastuuid", specifier = "==0.14.0" },+ { name = "fastuuid", specifier = ">=0.14.0,<1.0" },{ name = "google-cloud-aiplatform", marker = "extra == 'google'", specifier = "==1.133.0" },{ name = "google-cloud-aiplatform", marker = "extra == 'proxy-runtime'", specifier = "==1.133.0" },{ name = "google-cloud-iam", marker = "extra == 'extra-proxy'", specifier = "==2.19.1" },@@ -3289,10 +3289,10 @@ requires-dist = [{ name = "grpcio", marker = "extra == 'grpc'", specifier = "==1.78.0" },{ name = "grpcio", marker = "extra == 'proxy-runtime'", specifier = "==1.78.0" },{ name = "gunicorn", marker = "extra == 'proxy'", specifier = "==23.0.0" },- { name = "httpx", specifier = "==0.28.1" },- { name = "importlib-metadata", specifier = "==8.5.0" },- { name = "jinja2", specifier = "==3.1.6" },- { name = "jsonschema", specifier = "==4.23.0" },+ { name = "httpx", specifier = ">=0.28.0,<1.0" },+ { name = "importlib-metadata", specifier = ">=8.0.0" },+ { name = "jinja2", specifier = ">=3.1.0,<4.0" },+ { name = "jsonschema", specifier = ">=4.0.0,<5.0" },{ name = "langfuse", marker = "extra == 'proxy-runtime'", specifier = "==2.59.7" },{ name = "litellm-enterprise", marker = "extra == 'proxy'", editable = "enterprise" },{ name = "litellm-proxy-extras", marker = "extra == 'proxy'", editable = "litellm-proxy-extras" },@@ -3301,7 +3301,7 @@ requires-dist = [{ name = "mcp", marker = "extra == 'proxy'", specifier = "==1.26.0" },{ name = "mlflow", marker = "extra == 'mlflow'", specifier = "==3.11.1" },{ name = "numpydoc", marker = "extra == 'utils'", specifier = "==1.8.0" },- { name = "openai", specifier = "==2.33.0" },+ { name = "openai", specifier = ">=2.20.0,<3.0.0" },{ name = "opentelemetry-api", marker = "extra == 'proxy-runtime'", specifier = "==1.28.0" },{ name = "opentelemetry-exporter-otlp", marker = "extra == 'proxy-runtime'", specifier = "==1.28.0" },{ name = "opentelemetry-sdk", marker = "extra == 'proxy-runtime'", specifier = "==1.28.0" },@@ -3309,12 +3309,12 @@ requires-dist = [{ name = "polars", marker = "extra == 'proxy'", specifier = "==1.38.1" },{ name = "prisma", marker = "extra == 'extra-proxy'", specifier = "==0.11.0" },{ name = "prometheus-client", marker = "extra == 'proxy-runtime'", specifier = "==0.20.0" },- { name = "pydantic", specifier = "==2.12.5" },+ { name = "pydantic", specifier = ">=2.5.0,<3.0.0" },{ name = "pyjwt", marker = "extra == 'proxy'", specifier = "==2.12.0" },{ name = "pynacl", marker = "extra == 'proxy'", specifier = "==1.6.2" },{ name = "pypdf", marker = "python_full_version < '3.14' and extra == 'proxy-runtime'", specifier = "==6.10.2" },{ name = "pyroscope-io", marker = "sys_platform != 'win32' and extra == 'proxy'", specifier = "==0.8.16" },- { name = "python-dotenv", specifier = "==1.2.2" },+ { name = "python-dotenv", specifier = ">=1.0.0,<2.0" },{ name = "python-multipart", marker = "extra == 'proxy'", specifier = "==0.0.27" },{ name = "pyyaml", marker = "extra == 'proxy'", specifier = "==6.0.3" },{ name = "redisvl", marker = "python_full_version < '3.14' and extra == 'extra-proxy'", specifier = "==0.4.1" },@@ -3325,8 +3325,8 @@ requires-dist = [{ name = "semantic-router", marker = "python_full_version < '3.14' and extra == 'semantic-router'", specifier = "==0.1.12" },{ name = "sentry-sdk", marker = "extra == 'proxy-runtime'", specifier = "==2.21.0" },{ name = "soundfile", marker = "extra == 'proxy'", specifier = "==0.12.1" },- { name = "tiktoken", specifier = "==0.12.0" },- { name = "tokenizers", specifier = "==0.23.1" },+ { name = "tiktoken", specifier = ">=0.7.0,<1.0" },+ { name = "tokenizers", specifier = ">=0.20.0,<1.0" },{ name = "uvicorn", marker = "extra == 'proxy'", specifier = "==0.33.0" },{ name = "uvloop", marker = "sys_platform != 'win32' and extra == 'proxy'", specifier = "==0.21.0" },{ name = "websockets", marker = "extra == 'proxy'", specifier = "==15.0.1" },