Skip to content

Commit ea6736e

Browse files
Merge branch 'main' into bedrock-s3-file-upload
2 parents 5d18d18 + 2900e0e commit ea6736e

File tree

702 files changed

+27983
-5790
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

702 files changed

+27983
-5790
lines changed

.circleci/config.yml

Lines changed: 400 additions & 698 deletions
Large diffs are not rendered by default.

.github/workflows/codspeed.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CodSpeed Benchmarks
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
# Allow CodSpeed to trigger backtest performance analysis
11+
# in order to generate initial data
12+
workflow_dispatch:
13+
14+
permissions:
15+
contents: read
16+
id-token: write
17+
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
20+
cancel-in-progress: true
21+
22+
jobs:
23+
benchmarks:
24+
runs-on: ubuntu-latest
25+
timeout-minutes: 15
26+
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- name: Set up Python
31+
uses: actions/setup-python@v5
32+
with:
33+
python-version: "3.12"
34+
35+
- name: Install dependencies
36+
run: |
37+
pip install -e "."
38+
pip install pytest pytest-codspeed==4.3.0
39+
40+
- name: Run benchmarks
41+
uses: CodSpeedHQ/action@v4
42+
with:
43+
mode: simulation
44+
run: pytest tests/benchmarks/ --codspeed

.github/workflows/ghcr_deploy.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,8 @@ jobs:
369369
release:
370370
name: "New LiteLLM Release"
371371
needs: [docker-hub-deploy, build-and-push-image, build-and-push-image-database]
372-
372+
permissions:
373+
contents: write
373374
runs-on: "ubuntu-latest"
374375

375376
steps:

.github/workflows/test-linting.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@ jobs:
2828
find . -type d -name "__pycache__" -exec rm -rf {} + || true
2929
find . -name "*.pyc" -delete || true
3030
31+
- name: Check poetry.lock is up to date
32+
run: |
33+
poetry check --lock || (echo "❌ poetry.lock is out of sync with pyproject.toml. Run 'poetry lock' locally and commit the result." && exit 1)
34+
3135
- name: Install dependencies
3236
run: |
33-
poetry lock
3437
poetry install --with dev
3538
3639
- name: Check Black formatting

CLAUDE.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@ LiteLLM is a unified interface for 100+ LLM providers with two main components:
140140
- **Check index coverage.** For new or modified queries, check `schema.prisma` for a supporting index. Prefer extending an existing index (e.g. `@@index([a])``@@index([a, b])`) over adding a new one, unless it's a `@@unique`. Only add indexes for large/frequent queries.
141141
- **Keep schema files in sync.** Apply schema changes to all `schema.prisma` copies (`schema.prisma`, `litellm/proxy/`, `litellm-proxy-extras/`, `litellm-js/spend-logs/` for SpendLogs) with a migration under `litellm-proxy-extras/litellm_proxy_extras/migrations/`.
142142

143+
### Setup Wizard (`litellm/setup_wizard.py`)
144+
- The wizard is implemented as a single `SetupWizard` class with `@staticmethod` methods — keep it that way. No module-level functions except `run_setup_wizard()` (the public entrypoint) and pure helpers (color, ANSI).
145+
- Use `litellm.utils.check_valid_key(model, api_key)` for credential validation — never roll a custom completion call.
146+
- Do not hardcode provider env-key names or model lists that already exist in the codebase. Add a `test_model` field to each provider entry to drive `check_valid_key`; set it to `None` for providers that can't be validated with a single API key (Azure, Bedrock, Ollama).
147+
143148
### Enterprise Features
144149
- Enterprise-specific code in `enterprise/` directory
145150
- Optional features enabled via environment variables
@@ -156,4 +161,4 @@ LiteLLM is a unified interface for 100+ LLM providers with two main components:
156161
**Fix options:**
157162
1. **Create a Prisma migration** (permanent) — run `prisma migrate dev --name <description>` in the worktree. The generated file will be picked up by `prisma migrate deploy` on next startup.
158163
2. **Apply manually for local dev**`psql -d litellm -c "ALTER TABLE ... ADD COLUMN IF NOT EXISTS ..."` after each proxy start. Fine for dev, not for production.
159-
3. **Update litellm-proxy-extras** — if the package is installed from PyPI, its migration directory must include the new file. Either update the package or run the migration manually until the next release ships it.
164+
3. **Update litellm-proxy-extras** — if the package is installed from PyPI, its migration directory must include the new file. Either update the package or run the migration manually until the next release ships it.

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ RUN pip wheel --no-cache-dir --wheel-dir=/wheels/ -r requirements.txt
3939
# ensure pyjwt is used, not jwt
4040
RUN pip uninstall jwt -y
4141
RUN pip uninstall PyJWT -y
42-
RUN pip install PyJWT==2.9.0 --no-cache-dir
42+
RUN pip install PyJWT==2.12.0 --no-cache-dir
4343

4444
# Runtime stage
4545
FROM $LITELLM_RUNTIME_IMAGE AS runtime

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
<a href="https://www.litellm.ai/support">
2929
<img src="https://img.shields.io/static/v1?label=Chat%20on&message=Slack&color=black&logo=Slack&style=flat-square" alt="Slack">
3030
</a>
31+
<a href="https://codspeed.io/BerriAI/litellm?utm_source=badge">
32+
<img src="https://img.shields.io/endpoint?url=https://codspeed.io/badge.json" alt="CodSpeed"/>
33+
</a>
3134
</h4>
3235

3336
<img width="2688" height="1600" alt="Group 7154 (1)" src="https://github.com/user-attachments/assets/c5ee0412-6fb5-4fb6-ab5b-bafae4209ca6" />

ci_cd/security_scans.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ echo "Starting security scans for LiteLLM..."
1111
install_trivy() {
1212
echo "Installing Trivy and required tools..."
1313
sudo apt-get update
14-
sudo apt-get install -y wget apt-transport-https gnupg lsb-release jq curl
14+
sudo apt-get install -y wget apt-transport-https gnupg lsb-release jq curl bsdmainutils
1515
wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | sudo apt-key add -
1616
echo "deb https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main" | sudo tee -a /etc/apt/sources.list.d/trivy.list
1717
sudo apt-get update
@@ -163,6 +163,9 @@ run_grype_scans() {
163163
"CVE-2026-25639" # axios - full fix requires 1.x major version bump; pinned to >=0.30.2 to clear other axios CVEs, upgrade to 1.x in follow-up
164164
"CVE-2026-2297" # Python 3.13 SourcelessFileLoader audit hook bypass - no fix available in base image
165165
"GHSA-qffp-2rhf-9h96" # tar hardlink path traversal - from nodejs_wheel bundled npm, not used in application runtime code
166+
"CVE-2026-2673" # OpenSSL 3.6.1 TLS 1.3 key exchange group negotiation issue - no fix available yet
167+
"CVE-2026-3644" # Python 3.13 vulnerability - no fix available in base image
168+
"CVE-2026-4224" # Python 3.13 Expat parser stack overflow in ElementDeclHandler - no fix available in base image
166169
)
167170

168171
# Build JSON array of allowlisted CVE IDs for jq

docker/Dockerfile.database

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ RUN sed -i 's/\r$//' docker/install_auto_router.sh && chmod +x docker/install_au
112112
# ensure pyjwt is used, not jwt
113113
RUN pip uninstall jwt -y
114114
RUN pip uninstall PyJWT -y
115-
RUN pip install PyJWT==2.9.0 --no-cache-dir
115+
RUN pip install PyJWT==2.12.0 --no-cache-dir
116116

117117
# Build Admin UI (runtime stage)
118118
# Convert Windows line endings to Unix and make executable

docker/Dockerfile.dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \
3131
# Fix JWT dependency conflicts early
3232
RUN pip uninstall jwt -y || true && \
3333
pip uninstall PyJWT -y || true && \
34-
pip install PyJWT==2.9.0 --no-cache-dir
34+
pip install PyJWT==2.12.0 --no-cache-dir
3535

3636
# Copy only necessary files for build
3737
COPY pyproject.toml README.md schema.prisma poetry.lock ./

0 commit comments

Comments
 (0)