Skip to content

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]

[Fix] Handle boto3/aioboto3 botocore conflict across CI and Docker builds

Yuneng Jiang821a634d25bf
diff --git a/.circleci/config.yml b/.circleci/config.yml
index d384e860528..739da356a7d 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -153,7 +153,7 @@ jobs:
python -m pip install -r .circleci/requirements.txt
pip install "pytest==7.3.1" "pytest-retry==1.6.3" "pytest-asyncio==0.21.1" "pytest-cov==5.0.0" \
"mypy==1.18.2" "google-generativeai==0.3.2" "google-cloud-aiplatform==1.133.0" pyarrow \
- "boto3==1.42.80" "aioboto3==15.5.0" langchain lunary==0.2.5 \
+ "boto3==1.42.80" langchain lunary==0.2.5 \
"azure-identity==1.25.3" "langfuse==2.59.7" "logfire==0.29.0" numpydoc \
traceloop-sdk==0.21.1 openai==1.100.1 prisma==0.11.0 \
"detect_secrets==1.5.0" "respx==0.22.0" fastapi \
@@ -162,6 +162,7 @@ jobs:
python-multipart prometheus-client==0.20.0 "pydantic==2.12.5" \
"diskcache==5.6.1" "Pillow==12.1.1" "jsonschema==4.23.0" \
"pytest-xdist==3.6.1" "pytest-timeout==2.2.0" "websockets==15.0.1"
+ pip install --no-deps "aioboto3==15.5.0" "aiobotocore==2.25.1"
pip install semantic_router --no-deps
pip install aurelio_sdk --no-deps
pip uninstall posthog -y
@@ -248,7 +249,7 @@ jobs:
python -m pip install -r .circleci/requirements.txt
pip install "pytest==7.3.1" "pytest-retry==1.6.3" "pytest-asyncio==0.21.1" "pytest-cov==5.0.0" \
"mypy==1.18.2" "google-generativeai==0.3.2" "google-cloud-aiplatform==1.133.0" pyarrow \
- "boto3==1.42.80" "aioboto3==15.5.0" langchain lunary==0.2.5 \
+ "boto3==1.42.80" langchain lunary==0.2.5 \
"azure-identity==1.25.3" "langfuse==2.59.7" "logfire==0.29.0" numpydoc \
traceloop-sdk==0.21.1 openai==1.100.1 prisma==0.11.0 \
"detect_secrets==1.5.0" "respx==0.22.0" fastapi \
@@ -257,6 +258,7 @@ jobs:
python-multipart prometheus-client==0.20.0 "pydantic==2.12.5" \
"diskcache==5.6.1" "Pillow==12.1.1" "jsonschema==4.23.0" \
"pytest-xdist==3.6.1" "pytest-timeout==2.2.0" "websockets==15.0.1"
+ pip install --no-deps "aioboto3==15.5.0" "aiobotocore==2.25.1"
pip install semantic_router --no-deps
pip install aurelio_sdk --no-deps
pip uninstall posthog -y
@@ -351,7 +353,7 @@ jobs:
pip install "google-cloud-aiplatform==1.133.0"
pip install pyarrow
pip install "boto3==1.42.80"
- pip install "aioboto3==15.5.0"
+ pip install --no-deps "aioboto3==15.5.0" "aiobotocore==2.25.1"
pip install langchain
pip install lunary==0.2.5
pip install "azure-identity==1.25.3"
@@ -1705,7 +1707,7 @@ jobs:
pip install "google-cloud-aiplatform==1.133.0"
pip install pyarrow
pip install "boto3==1.42.80"
- pip install "aioboto3==15.5.0"
+ pip install --no-deps "aioboto3==15.5.0" "aiobotocore==2.25.1"
pip install langchain
pip install "langfuse>=2.0.0"
pip install "logfire==0.29.0"
@@ -1849,7 +1851,7 @@ jobs:
pip install "google-cloud-aiplatform==1.133.0"
pip install pyarrow
pip install "boto3==1.42.80"
- pip install "aioboto3==15.5.0"
+ pip install --no-deps "aioboto3==15.5.0" "aiobotocore==2.25.1"
pip install langchain
pip install "langchain_mcp_adapters==0.0.5"
pip install "langfuse>=2.0.0"
@@ -1995,7 +1997,7 @@ jobs:
pip install "google-cloud-aiplatform==1.133.0"
pip install pyarrow
pip install "boto3==1.42.80"
- pip install "aioboto3==15.5.0"
+ pip install --no-deps "aioboto3==15.5.0" "aiobotocore==2.25.1"
pip install langchain
pip install "langfuse>=2.0.0"
pip install "logfire==0.29.0"
@@ -2169,7 +2171,7 @@ jobs:
pip install "pytest-asyncio==0.21.1"
pip install aiohttp
python -m pip install --upgrade pip
- grep -v '^aioboto3' requirements.txt | python -m pip install -r -
+ grep -v '^aioboto3' requirements.txt | python -m pip install -r /dev/stdin
pip install --no-deps "aioboto3==15.5.0" "aiobotocore==2.25.1"
- run:
name: Install dockerize
@@ -2282,7 +2284,7 @@ jobs:
pip install "pytest-asyncio==0.21.1"
pip install aiohttp
python -m pip install --upgrade pip
- grep -v '^aioboto3' requirements.txt | python -m pip install -r -
+ grep -v '^aioboto3' requirements.txt | python -m pip install -r /dev/stdin
pip install --no-deps "aioboto3==15.5.0" "aiobotocore==2.25.1"
pip install "pytest==7.3.1"
pip install "pytest-retry==1.6.3"
@@ -2421,7 +2423,7 @@ jobs:
pip install "pytest-asyncio==0.21.1"
pip install aiohttp
python -m pip install --upgrade pip
- grep -v '^aioboto3' requirements.txt | python -m pip install -r -
+ grep -v '^aioboto3' requirements.txt | python -m pip install -r /dev/stdin
pip install --no-deps "aioboto3==15.5.0" "aiobotocore==2.25.1"
pip install "pytest==7.3.1"
pip install "pytest-retry==1.6.3"
@@ -2663,7 +2665,7 @@ jobs:
pip install "langchain_openai==0.2.1"
pip install "langgraph==0.3.18"
pip install "fastuuid==0.13.5"
- grep -v '^aioboto3' requirements.txt | pip install -r -
+ grep -v '^aioboto3' requirements.txt | pip install -r /dev/stdin
pip install --no-deps "aioboto3==15.5.0" "aiobotocore==2.25.1"
- run:
name: Install dockerize
@@ -2829,7 +2831,7 @@ jobs:
pip install "boto3==1.42.80"
pip install "httpx==0.27.0"
pip install "claude-agent-sdk"
- grep -v '^aioboto3' requirements.txt | pip install -r -
+ grep -v '^aioboto3' requirements.txt | pip install -r /dev/stdin
pip install --no-deps "aioboto3==15.5.0" "aiobotocore==2.25.1"
- run:
name: Install dockerize
diff --git a/Dockerfile b/Dockerfile
index 07481f2b0e1..e6b3334a122 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -34,7 +34,10 @@ RUN ls -1 dist/*.whl | head -1
RUN pip install dist/*.whl
# install dependencies as wheels
-RUN pip wheel --no-cache-dir --wheel-dir=/wheels/ -r requirements.txt
+# aioboto3/aiobotocore have an unresolvable botocore conflict with boto3 1.42.x
+# Install them separately with --no-deps to bypass resolution
+RUN grep -v '^aioboto3' requirements.txt | pip wheel --no-cache-dir --wheel-dir=/wheels/ -r /dev/stdin \
+ && pip wheel --no-cache-dir --no-deps --wheel-dir=/wheels/ "aioboto3==15.5.0" "aiobotocore==2.25.1"
# ensure pyjwt is used, not jwt
RUN pip uninstall jwt -y
@@ -90,7 +93,9 @@ COPY --from=builder /app/dist/*.whl .
COPY --from=builder /wheels/ /wheels/
# Install the built wheel using pip; again using a wildcard if it's the only file
-RUN pip install *.whl /wheels/* --no-index --find-links=/wheels/ && rm -f *.whl && rm -rf /wheels
+# --no-deps: all wheels are pre-built in /wheels/, skip resolution to avoid
+# the boto3/aiobotocore botocore version conflict (no compatible aioboto3 exists yet)
+RUN pip install *.whl /wheels/* --no-index --find-links=/wheels/ --no-deps && rm -f *.whl && rm -rf /wheels
# Replace the nodejs-wheel-binaries bundled node with the system node (fixes CVE-2025-55130)
RUN NODEJS_WHEEL_NODE=$(find /usr/lib -path "*/nodejs_wheel/bin/node" 2>/dev/null) && \
diff --git a/docker/Dockerfile.alpine b/docker/Dockerfile.alpine
index 1eed9d067f1..256530a09fe 100644
--- a/docker/Dockerfile.alpine
+++ b/docker/Dockerfile.alpine
@@ -29,7 +29,10 @@ RUN ls -1 dist/*.whl | head -1
RUN pip install dist/*.whl
# install dependencies as wheels
-RUN pip wheel --no-cache-dir --wheel-dir=/wheels/ -r requirements.txt
+# aioboto3/aiobotocore have an unresolvable botocore conflict with boto3 1.42.x
+# Install them separately with --no-deps to bypass resolution
+RUN grep -v '^aioboto3' requirements.txt | pip wheel --no-cache-dir --wheel-dir=/wheels/ -r /dev/stdin \
+ && pip wheel --no-cache-dir --no-deps --wheel-dir=/wheels/ "aioboto3==15.5.0" "aiobotocore==2.25.1"
# Runtime stage
FROM $LITELLM_RUNTIME_IMAGE AS runtime
@@ -44,7 +47,9 @@ COPY --from=builder /app/dist/*.whl .
COPY --from=builder /wheels/ /wheels/
# Install the built wheel using pip; again using a wildcard if it's the only file
-RUN pip install *.whl /wheels/* --no-index --find-links=/wheels/ && rm -f *.whl && rm -rf /wheels
+# --no-deps: all wheels are pre-built in /wheels/, skip resolution to avoid
+# the boto3/aiobotocore botocore version conflict (no compatible aioboto3 exists yet)
+RUN pip install *.whl /wheels/* --no-index --find-links=/wheels/ --no-deps && rm -f *.whl && rm -rf /wheels
# Convert Windows line endings to Unix for entrypoint scripts
RUN sed -i 's/\r$//' docker/entrypoint.sh && chmod +x docker/entrypoint.sh
diff --git a/docker/Dockerfile.database b/docker/Dockerfile.database
index 0d3b225aac4..1ac9ea61c74 100644
--- a/docker/Dockerfile.database
+++ b/docker/Dockerfile.database
@@ -40,7 +40,10 @@ RUN ls -1 dist/*.whl | head -1
RUN pip install dist/*.whl
# install dependencies as wheels
-RUN pip wheel --no-cache-dir --wheel-dir=/wheels/ -r requirements.txt
+# aioboto3/aiobotocore have an unresolvable botocore conflict with boto3 1.42.x
+# Install them separately with --no-deps to bypass resolution
+RUN grep -v '^aioboto3' requirements.txt | pip wheel --no-cache-dir --wheel-dir=/wheels/ -r /dev/stdin \
+ && pip wheel --no-cache-dir --no-deps --wheel-dir=/wheels/ "aioboto3==15.5.0" "aiobotocore==2.25.1"
# Runtime stage
FROM $LITELLM_RUNTIME_IMAGE AS runtime
@@ -82,7 +85,9 @@ COPY --from=builder /app/dist/*.whl .
COPY --from=builder /wheels/ /wheels/
# Install the built wheel using pip; again using a wildcard if it's the only file
-RUN pip install *.whl /wheels/* --no-index --find-links=/wheels/ && rm -f *.whl && rm -rf /wheels
+# --no-deps: all wheels are pre-built in /wheels/, skip resolution to avoid
+# the boto3/aiobotocore botocore version conflict (no compatible aioboto3 exists yet)
+RUN pip install *.whl /wheels/* --no-index --find-links=/wheels/ --no-deps && rm -f *.whl && rm -rf /wheels
# SECURITY FIX: nodejs-wheel-binaries (pip package used by Prisma) bundles a complete
# npm with old vulnerable deps at /usr/lib/python3.*/site-packages/nodejs_wheel/.
diff --git a/docker/Dockerfile.dev b/docker/Dockerfile.dev
index 8baef56bbd3..846de3d9623 100644
--- a/docker/Dockerfile.dev
+++ b/docker/Dockerfile.dev
@@ -25,8 +25,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
COPY requirements.txt .
# Install Python dependencies with cache mount for faster rebuilds
+# aioboto3/aiobotocore have an unresolvable botocore conflict with boto3 1.42.x
+# Install them separately with --no-deps to bypass resolution
RUN --mount=type=cache,target=/root/.cache/pip \
- pip wheel --no-cache-dir --wheel-dir=/wheels/ -r requirements.txt
+ grep -v '^aioboto3' requirements.txt | pip wheel --no-cache-dir --wheel-dir=/wheels/ -r /dev/stdin \
+ && pip wheel --no-cache-dir --no-deps --wheel-dir=/wheels/ "aioboto3==15.5.0" "aiobotocore==2.25.1"
# Fix JWT dependency conflicts early
RUN pip uninstall jwt -y || true && \
@@ -109,7 +112,9 @@ COPY --from=builder /wheels/ /wheels/
COPY --from=builder /app/dist/*.whl .
# Install all dependencies in one step with no-cache for smaller image
-RUN pip install --no-cache-dir *.whl /wheels/* --no-index --find-links=/wheels/ && \
+# --no-deps: all wheels are pre-built in /wheels/, skip resolution to avoid
+# the boto3/aiobotocore botocore version conflict (no compatible aioboto3 exists yet)
+RUN pip install --no-cache-dir *.whl /wheels/* --no-index --find-links=/wheels/ --no-deps && \
rm -f *.whl && \
rm -rf /wheels
diff --git a/docker/Dockerfile.non_root b/docker/Dockerfile.non_root
index 18c7d2fee67..2c704e09690 100644
--- a/docker/Dockerfile.non_root
+++ b/docker/Dockerfile.non_root
@@ -31,7 +31,10 @@ RUN for i in 1 2 3; do \
# Cache Python dependencies
COPY requirements.txt .
-RUN pip wheel --no-cache-dir --wheel-dir=/wheels/ -r requirements.txt \
+# aioboto3/aiobotocore have an unresolvable botocore conflict with boto3 1.42.x
+# Install them separately with --no-deps to bypass resolution
+RUN grep -v '^aioboto3' requirements.txt | pip wheel --no-cache-dir --wheel-dir=/wheels/ -r /dev/stdin \
+ && pip wheel --no-cache-dir --no-deps --wheel-dir=/wheels/ "aioboto3==15.5.0" "aiobotocore==2.25.1" \
&& pip wheel --no-cache-dir --wheel-dir=/wheels/ "semantic_router==0.1.11" "aurelio-sdk==0.0.19" "PyJWT==2.12.0"
# Copy source after dependency layers
@@ -162,7 +165,8 @@ ENV PRISMA_BINARY_CACHE_DIR=/app/.cache/prisma-python/binaries \
XDG_CACHE_HOME=/app/.cache
# Install packages from wheels and optional extras without network
-RUN pip install --no-index --find-links=/wheels/ -r requirements.txt && \
+RUN grep -v '^aioboto3' requirements.txt | pip install --no-index --find-links=/wheels/ -r /dev/stdin && \
+ pip install --no-index --no-deps --find-links=/wheels/ "aioboto3==15.5.0" "aiobotocore==2.25.1" && \
pip install --no-index --find-links=/wheels/ /wheels/litellm-*-py3-none-any.whl && \
pip install --no-index --find-links=/wheels/ --no-deps semantic_router==0.1.11 && \
pip install --no-index --find-links=/wheels/ aurelio-sdk==0.0.19 && \
diff --git a/requirements.txt b/requirements.txt
index 7629b144b00..abac8966129 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -79,10 +79,12 @@ pypdf==6.9.2 # for PDF text extraction in RAG ingestion (CVE-2026-27888)
# Transitive deps pinned to prevent floating between builds
aiofiles==24.1.0 # transitive dep (langfuse)
+aioitertools==0.12.0 # transitive dep (aiobotocore)
colorlog==6.10.1 # transitive dep (ddtrace)
grpc-google-iam-v1==0.14.3 # transitive dep (google-cloud-iam)
hf-xet==1.4.2 # transitive dep (huggingface_hub)
requests-toolbelt==1.0.0 # transitive dep (langfuse)
+wrapt==1.17.2 # transitive dep (aiobotocore)
########################
# LITELLM ENTERPRISE DEPENDENCIES