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] Finish uv migration for redis_caching, e2e_ui, and fix prisma/black in CI

Yuneng Jiangbb7ac7c4cad2
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 6606edc0c8f..428468919ee 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -157,7 +157,7 @@ jobs:
- restore_cache:
keys:
- - v1-dependencies-{{ checksum "uv.lock" }}
+ - v2-dependencies-{{ checksum "uv.lock" }}-{{ checksum ".circleci/config.yml" }}
- run:
name: Install Dependencies
command: |
@@ -177,7 +177,7 @@ jobs:
- save_cache:
paths:
- ./.venv
- key: v1-dependencies-{{ checksum "uv.lock" }}
+ key: v2-dependencies-{{ checksum "uv.lock" }}-{{ checksum ".circleci/config.yml" }}
- run:
name: Run prisma ./docker/entrypoint.sh
command: |
@@ -247,7 +247,7 @@ jobs:
- restore_cache:
keys:
- - v1-dependencies-{{ checksum "uv.lock" }}
+ - v2-dependencies-{{ checksum "uv.lock" }}-{{ checksum ".circleci/config.yml" }}
- run:
name: Install Dependencies
command: |
@@ -267,7 +267,7 @@ jobs:
- save_cache:
paths:
- ./.venv
- key: v1-dependencies-{{ checksum "uv.lock" }}
+ key: v2-dependencies-{{ checksum "uv.lock" }}-{{ checksum ".circleci/config.yml" }}
- run:
name: Run prisma ./docker/entrypoint.sh
command: |
@@ -338,7 +338,7 @@ jobs:
- restore_cache:
keys:
- - v1-dependencies-{{ checksum "uv.lock" }}
+ - v2-dependencies-{{ checksum "uv.lock" }}-{{ checksum ".circleci/config.yml" }}
- run:
name: Install Dependencies
command: |
@@ -358,7 +358,7 @@ jobs:
- save_cache:
paths:
- ./.venv
- key: v1-dependencies-{{ checksum "uv.lock" }}
+ key: v2-dependencies-{{ checksum "uv.lock" }}-{{ checksum ".circleci/config.yml" }}
- run:
name: Run prisma ./docker/entrypoint.sh
command: |
@@ -407,7 +407,7 @@ jobs:
- save_cache:
paths:
- ./.venv
- key: v1-dependencies-{{ checksum "uv.lock" }}
+ key: v2-dependencies-{{ checksum "uv.lock" }}-{{ checksum ".circleci/config.yml" }}
- run:
name: Run prisma ./docker/entrypoint.sh
command: |
@@ -1031,7 +1031,7 @@ jobs:
- run:
name: Run proxy tests part 1 (high-volume directories)
command: |
- uv run --no-sync prisma generate
+ uv run --no-sync python -m prisma generate
export PYTHONUNBUFFERED=1
uv run --no-sync python -m pytest tests/test_litellm/proxy/guardrails tests/test_litellm/proxy/management_endpoints tests/test_litellm/proxy/_experimental tests/test_litellm/proxy/client tests/test_litellm/proxy/auth --junitxml=test-results/junit-proxy-part1.xml --durations=10 -n 4 --maxfail=5 --timeout=60 -vv --log-cli-level=WARNING -r A
no_output_timeout: 15m
@@ -1050,7 +1050,7 @@ jobs:
- run:
name: Run proxy tests part 2 (all other tests)
command: |
- uv run --no-sync prisma generate
+ uv run --no-sync python -m prisma generate
export PYTHONUNBUFFERED=1
uv run --no-sync python -m pytest tests/test_litellm/proxy --ignore=tests/test_litellm/proxy/guardrails --ignore=tests/test_litellm/proxy/management_endpoints --ignore=tests/test_litellm/proxy/_experimental --ignore=tests/test_litellm/proxy/client --ignore=tests/test_litellm/proxy/auth --junitxml=test-results/junit-proxy-part2.xml --durations=10 -n 4 --maxfail=5 --timeout=120 -vv --log-cli-level=WARNING -r A
no_output_timeout: 15m
@@ -1089,7 +1089,7 @@ jobs:
command: |
pwd
ls
- uv run --no-sync prisma generate
+ uv run --no-sync python -m prisma generate
uv run --no-sync python -m pytest -v tests/enterprise -x --junitxml=test-results/junit-enterprise.xml --durations=10 -n 4
no_output_timeout: 15m
# Store test results
@@ -1386,24 +1386,28 @@ jobs:
steps:
- checkout
- setup_google_dns
+ - restore_cache:
+ keys:
+ - v2-dependencies-{{ checksum "uv.lock" }}-{{ checksum ".circleci/config.yml" }}
- run:
name: Install Dependencies
command: |
- python -m pip install --upgrade 'pip==26.0.1' 'uv==0.10.9'
- uv pip install --system -r requirements.txt
- pip install "pytest==7.3.1"
- pip install "pytest-retry==1.6.3"
- pip install "pytest-cov==5.0.0"
- pip install "pytest-asyncio==0.21.1"
- pip install "pytest-xdist==3.6.1"
- pip install "pytest-rerunfailures==14.0"
+ curl -LsSf -o /tmp/uv-install.sh https://astral.sh/uv/0.10.9/install.sh
+ echo "7fc46e39cb97290b57169c0c813a17970585ac519139f19006453c99b5f2f45f /tmp/uv-install.sh" | sha256sum -c -
+ env UV_NO_MODIFY_PATH=1 sh /tmp/uv-install.sh
+ rm -f /tmp/uv-install.sh
+ echo 'export PATH="$HOME/.local/bin:$PATH"' >> "$BASH_ENV"
+ export PATH="$HOME/.local/bin:$PATH"
+ uv sync --frozen --all-groups --all-extras --python "$(which python)"
+ - save_cache:
+ paths:
+ - ./.venv
+ key: v2-dependencies-{{ checksum "uv.lock" }}-{{ checksum ".circleci/config.yml" }}
# Run pytest and generate JUnit XML report
- run:
name: Run tests
command: |
- pwd
- ls
- python -m pytest -vv \
+ uv run --no-sync python -m pytest -vv \
tests/local_testing/test_dual_cache.py \
tests/local_testing/test_redis_batch_optimizations.py \
tests/local_testing/test_router_utils.py \
@@ -3137,19 +3141,22 @@ jobs:
- setup_google_dns
- restore_cache:
keys:
- - ui-e2e-py-deps-v1-{{ checksum "requirements.txt" }}
+ - ui-e2e-py-deps-v2-{{ checksum "uv.lock" }}-{{ checksum ".circleci/config.yml" }}
- run:
name: Install Python dependencies
command: |
- python -m pip install --upgrade 'pip==26.0.1' 'uv==0.10.9'
- uv pip install --system -r requirements.txt
- pip install "prisma==0.11.0"
- prisma generate --schema litellm/proxy/schema.prisma
+ curl -LsSf -o /tmp/uv-install.sh https://astral.sh/uv/0.10.9/install.sh
+ echo "7fc46e39cb97290b57169c0c813a17970585ac519139f19006453c99b5f2f45f /tmp/uv-install.sh" | sha256sum -c -
+ env UV_NO_MODIFY_PATH=1 sh /tmp/uv-install.sh
+ rm -f /tmp/uv-install.sh
+ echo 'export PATH="$HOME/.local/bin:$PATH"' >> "$BASH_ENV"
+ export PATH="$HOME/.local/bin:$PATH"
+ uv sync --frozen --all-groups --all-extras --python "$(which python)"
+ uv run --no-sync python -m prisma generate --schema litellm/proxy/schema.prisma
- save_cache:
- key: ui-e2e-py-deps-v1-{{ checksum "requirements.txt" }}
+ key: ui-e2e-py-deps-v2-{{ checksum "uv.lock" }}-{{ checksum ".circleci/config.yml" }}
paths:
- - ~/.local/lib
- - ~/.local/bin
+ - ./.venv
- restore_cache:
keys:
- ui-e2e-node-deps-v1-{{ checksum "ui/litellm-dashboard/package-lock.json" }}
@@ -3178,7 +3185,7 @@ jobs:
command: dockerize -wait tcp://localhost:5432 -timeout 30s
- run:
name: Push Prisma schema
- command: prisma db push --schema litellm/proxy/schema.prisma --accept-data-loss
+ command: uv run --no-sync python -m prisma db push --schema litellm/proxy/schema.prisma --accept-data-loss
- run:
name: Seed database
command: |
@@ -3186,7 +3193,7 @@ jobs:
-f ui/litellm-dashboard/e2e_tests/fixtures/seed.sql
- run:
name: Start mock LLM server
- command: python ui/litellm-dashboard/e2e_tests/fixtures/mock_llm_server/server.py
+ command: uv run --no-sync python ui/litellm-dashboard/e2e_tests/fixtures/mock_llm_server/server.py
background: true
- run:
name: Start LiteLLM proxy
@@ -3197,7 +3204,7 @@ jobs:
SERVER_ROOT_PATH: ""
PROXY_LOGOUT_URL: ""
command: |
- python -m litellm.proxy.proxy_cli \
+ uv run --no-sync python -m litellm.proxy.proxy_cli \
--config ui/litellm-dashboard/e2e_tests/fixtures/config.yml \
--port 4000
background: true