Skip to content

Commit 12a1d08

Browse files
Merge branch 'main' into litellm_dev_09_11_2025_p1
2 parents a11f50d + c4022ad commit 12a1d08

File tree

1,290 files changed

+138470
-65492
lines changed

Some content is hidden

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

1,290 files changed

+138470
-65492
lines changed

.circleci/config.yml

Lines changed: 151 additions & 35 deletions
Large diffs are not rendered by default.

.devcontainer/devcontainer.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@
1111
// },
1212

1313
// Features to add to the dev container. More info: https://containers.dev/features.
14-
// "features": {},
14+
"features": {
15+
"ghcr.io/devcontainers/features/node:1": {
16+
"version": "lts"
17+
},
18+
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
19+
},
1520

1621
// Configure tool-specific properties.
1722
"customizations": {
@@ -30,7 +35,7 @@
3035

3136
// Use 'forwardPorts' to make a list of ports inside the container available locally.
3237
"forwardPorts": [4000],
33-
38+
3439
"containerEnv": {
3540
"LITELLM_LOG": "DEBUG"
3641
},
@@ -48,5 +53,5 @@
4853
// "remoteUser": "litellm",
4954

5055
// Use 'postCreateCommand' to run commands after the container is created.
51-
"postCreateCommand": "pipx install poetry && poetry install -E extra_proxy -E proxy"
56+
"postCreateCommand": "bash ./.devcontainer/post-create.sh"
5257
}

.devcontainer/post-create.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
echo "[post-create] Installing poetry via pip"
5+
python -m pip install --upgrade pip
6+
python -m pip install poetry
7+
8+
echo "[post-create] Installing Python dependencies (poetry)"
9+
poetry install --with dev --extras proxy
10+
11+
echo "[post-create] Generating Prisma client"
12+
poetry run prisma generate
13+
14+
echo "[post-create] Installing npm dependencies"
15+
cd ui/litellm-dashboard && npm install --no-audit --no-fund
16+
17+
echo "[post-create] Done"

.github/workflows/test-linting.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ jobs:
1111

1212
steps:
1313
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
clean: true
1417

1518
- name: Set up Python
1619
uses: actions/setup-python@v4
@@ -20,6 +23,11 @@ jobs:
2023
- name: Install Poetry
2124
uses: snok/install-poetry@v1
2225

26+
- name: Clean Python cache
27+
run: |
28+
find . -type d -name "__pycache__" -exec rm -rf {} + || true
29+
find . -name "*.pyc" -delete || true
30+
2331
- name: Install dependencies
2432
run: |
2533
poetry install --with dev
@@ -31,6 +39,15 @@ jobs:
3139
poetry run black .
3240
cd ..
3341
42+
- name: Debug - Check file state
43+
run: |
44+
echo "Current branch:"
45+
git branch --show-current
46+
echo "Last 3 commits:"
47+
git log --oneline -3
48+
echo "File content around line 43:"
49+
head -50 litellm/litellm_core_utils/custom_logger_registry.py | tail -10
50+
3451
- name: Run Ruff linting
3552
run: |
3653
cd litellm
@@ -44,7 +61,7 @@ jobs:
4461
- name: Run MyPy type checking
4562
run: |
4663
cd litellm
47-
poetry run mypy . --ignore-missing-imports
64+
poetry run mypy .
4865
cd ..
4966
5067
- name: Check for circular imports

.github/workflows/test-litellm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ jobs:
4040
cd ..
4141
- name: Run tests
4242
run: |
43-
poetry run pytest tests/test_litellm -x -vv -n 4
43+
poetry run pytest tests/test_litellm --tb=short -vv --maxfail=10 -n 4

.github/workflows/test-mcp.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: LiteLLM MCP Tests (folder - tests/mcp_tests)
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
timeout-minutes: 25
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Thank You Message
16+
run: |
17+
echo "### 🙏 Thank you for contributing to LiteLLM!" >> $GITHUB_STEP_SUMMARY
18+
echo "Your PR is being tested now. We appreciate your help in making LiteLLM better!" >> $GITHUB_STEP_SUMMARY
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: '3.12'
24+
25+
- name: Install Poetry
26+
uses: snok/install-poetry@v1
27+
28+
- name: Install dependencies
29+
run: |
30+
poetry install --with dev,proxy-dev --extras "proxy semantic-router"
31+
poetry run pip install "pytest==7.3.1"
32+
poetry run pip install "pytest-retry==1.6.3"
33+
poetry run pip install "pytest-cov==5.0.0"
34+
poetry run pip install "pytest-asyncio==0.21.1"
35+
poetry run pip install "respx==0.22.0"
36+
poetry run pip install "pydantic==2.10.2"
37+
poetry run pip install "mcp==1.10.1"
38+
poetry run pip install pytest-xdist
39+
40+
- name: Setup litellm-enterprise as local package
41+
run: |
42+
cd enterprise
43+
python -m pip install -e .
44+
cd ..
45+
46+
- name: Run MCP tests
47+
run: |
48+
poetry run pytest tests/mcp_tests -x -vv -n 4 --cov=litellm --cov-report=xml --durations=5

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,5 @@ test.py
9595
litellm_config.yaml
9696
.cursor
9797
.vscode/launch.json
98-
litellm/proxy/to_delete_loadtest_work/*
98+
litellm/proxy/to_delete_loadtest_work/*
99+
update_model_cost_map.py

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ USER root
1515
RUN apk add --no-cache gcc python3-dev openssl openssl-dev
1616

1717

18-
RUN pip install --upgrade pip && \
18+
RUN pip install --upgrade pip>=24.3.1 && \
1919
pip install build
2020

2121
# Copy the current directory contents into the container at /app
@@ -41,9 +41,6 @@ RUN pip uninstall jwt -y
4141
RUN pip uninstall PyJWT -y
4242
RUN pip install PyJWT==2.9.0 --no-cache-dir
4343

44-
# Build Admin UI
45-
RUN chmod +x docker/build_admin_ui.sh && ./docker/build_admin_ui.sh
46-
4744
# Runtime stage
4845
FROM $LITELLM_RUNTIME_IMAGE AS runtime
4946

@@ -53,6 +50,9 @@ USER root
5350
# Install runtime dependencies
5451
RUN apk add --no-cache openssl tzdata
5552

53+
# Upgrade pip to fix CVE-2025-8869
54+
RUN pip install --upgrade pip>=24.3.1
55+
5656
WORKDIR /app
5757
# Copy the current directory contents into the container at /app
5858
COPY . .

MCP_SSL_CHANGES_SUMMARY.md

Whitespace-only changes.

README.md

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ LiteLLM manages:
3737
- Retry/fallback logic across multiple deployments (e.g. Azure/OpenAI) - [Router](https://docs.litellm.ai/docs/routing)
3838
- Set Budgets & Rate limits per project, api key, model [LiteLLM Proxy Server (LLM Gateway)](https://docs.litellm.ai/docs/simple_proxy)
3939

40-
[**Jump to LiteLLM Proxy (LLM Gateway) Docs**](https://github.com/BerriAI/litellm?tab=readme-ov-file#openai-proxy---docs) <br>
40+
[**Jump to LiteLLM Proxy (LLM Gateway) Docs**](https://github.com/BerriAI/litellm?tab=readme-ov-file#litellm-proxy-server-llm-gateway---docs) <br>
4141
[**Jump to Supported LLM Providers**](https://github.com/BerriAI/litellm?tab=readme-ov-file#supported-providers-docs)
4242

4343
🚨 **Stable Release:** Use docker images with the `-stable` tag. These have undergone 12 hour load tests, before being published. [More information about the release cycle here](https://docs.litellm.ai/docs/proxy/release_cycle)
@@ -273,7 +273,7 @@ echo 'LITELLM_SALT_KEY="sk-1234"' >> .env
273273
source .env
274274

275275
# Start
276-
docker-compose up
276+
docker compose up
277277
```
278278

279279

@@ -316,6 +316,7 @@ curl 'http://0.0.0.0:4000/key/generate' \
316316
| [google AI Studio - gemini](https://docs.litellm.ai/docs/providers/gemini) ||||| | |
317317
| [mistral ai api](https://docs.litellm.ai/docs/providers/mistral) |||||| |
318318
| [cloudflare AI Workers](https://docs.litellm.ai/docs/providers/cloudflare_workers) ||||| | |
319+
| [CompactifAI](https://docs.litellm.ai/docs/providers/compactifai) ||||| | |
319320
| [cohere](https://docs.litellm.ai/docs/providers/cohere) |||||| |
320321
| [anthropic](https://docs.litellm.ai/docs/providers/anthropic) ||||| | |
321322
| [empower](https://docs.litellm.ai/docs/providers/empower) |||||
@@ -345,16 +346,25 @@ curl 'http://0.0.0.0:4000/key/generate' \
345346
| [Featherless AI](https://docs.litellm.ai/docs/providers/featherless_ai) ||||| | |
346347
| [Nebius AI Studio](https://docs.litellm.ai/docs/providers/nebius) |||||| |
347348
| [Heroku](https://docs.litellm.ai/docs/providers/heroku) ||| | | | |
349+
| [OVHCloud AI Endpoints](https://docs.litellm.ai/docs/providers/ovhcloud) ||| | | | |
348350

349351
[**Read the Docs**](https://docs.litellm.ai/docs/)
350352

351-
## Contributing
352-
353-
Interested in contributing? Contributions to LiteLLM Python SDK, Proxy Server, and LLM integrations are both accepted and highly encouraged!
353+
## Run in Developer mode
354+
### Services
355+
1. Setup .env file in root
356+
2. Run dependant services `docker-compose up db prometheus`
354357

355-
**Quick start:** `git clone``make install-dev``make format``make lint``make test-unit`
358+
### Backend
359+
1. (In root) create virtual environment `python -m venv .venv`
360+
2. Activate virtual environment `source .venv/bin/activate`
361+
3. Install dependencies `pip install -e ".[all]"`
362+
4. Start proxy backend `python litellm/proxy_cli.py`
356363

357-
See our comprehensive [Contributing Guide (CONTRIBUTING.md)](CONTRIBUTING.md) for detailed instructions.
364+
### Frontend
365+
1. Navigate to `ui/litellm-dashboard`
366+
2. Install dependencies `npm install`
367+
3. Run `npm run dev` to start the dashboard
358368

359369
# Enterprise
360370
For companies that need better security, user management and professional support
@@ -432,18 +442,3 @@ All these checks must pass before your PR can be merged.
432442
</a>
433443

434444

435-
## Run in Developer mode
436-
### Services
437-
1. Setup .env file in root
438-
2. Run dependant services `docker-compose up db prometheus`
439-
440-
### Backend
441-
1. (In root) create virtual environment `python -m venv .venv`
442-
2. Activate virtual environment `source .venv/bin/activate`
443-
3. Install dependencies `pip install -e ".[all]"`
444-
4. Start proxy backend `python3 /path/to/litellm/proxy_cli.py`
445-
446-
### Frontend
447-
1. Navigate to `ui/litellm-dashboard`
448-
2. Install dependencies `npm install`
449-
3. Run `npm run dev` to start the dashboard

0 commit comments

Comments
 (0)