Skip to content
Merged
Show file tree
Hide file tree
Changes from 99 commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
b93030f
fix(vertex_ai): surface real error/status on vertex batch create inst…
devin-ai-integration[bot] Jul 29, 2026
18d9c7a
fix(bedrock): pass SSE-KMS key through to the batch input-file S3 upload
devin-ai-integration[bot] Jul 29, 2026
0b809cf
fix(anthropic adapter): stop indexing choices[0] on choiceless stream…
devin-ai-integration[bot] Jul 31, 2026
c5c5a27
fix(files): enforce require_managed_files on file retrieve, content a…
devin-ai-integration[bot] Aug 2, 2026
a7250f4
fix(bedrock): normalize /v1/completions and /v1/responses batch records
milan-berri Aug 3, 2026
6def61e
fix(bedrock): keep /v1/responses batch metadata through the chat bridge
milan-berri Aug 3, 2026
7d00f9d
fix(managed_files): return unified output file ids from GET /batches
mateo-berri Aug 6, 2026
7c2b709
Merge branch 'litellm_internal_staging' into litellm_bedrock_batch_no…
mateo-berri Aug 6, 2026
2b58053
Merge remote-tracking branch 'origin/litellm_internal_staging' into l…
mateo-berri Aug 6, 2026
2cc65a9
merge: litellm_internal_staging into litellm_bedrock_batch_sse_kms
mateo-berri Aug 6, 2026
5904124
fix(managed_files): cap batch list page size at 100 and bulk-resolve …
mateo-berri Aug 6, 2026
845680e
test(proxy): unit test batch file id mapping helpers directly
mateo-berri Aug 6, 2026
02d6084
Merge remote-tracking branch 'origin/litellm_internal_staging' into l…
mateo-berri Aug 7, 2026
4068b4a
chore: merge litellm_internal_staging into devin_ai_fix_lit5034_empty…
devin-ai-integration[bot] Aug 7, 2026
10e2395
Merge remote-tracking branch 'origin/litellm_internal_staging' into l…
mateo-berri Aug 7, 2026
6b2ac7c
refactor(bedrock): freeze the SSE-KMS header and key-source collections
mateo-berri Aug 7, 2026
8466ed0
fix(websearch_interception): bill and rate limit intercepted searches…
devin-ai-integration[bot] Aug 3, 2026
a2806d4
test(router): drop the duplicate s3_encryption_key_id credential test
mateo-berri Aug 7, 2026
d59a492
fix(azure_sentinel): respect AZURE_AUTHORITY_HOST for the Entra token…
yucheng-berri Aug 7, 2026
e46721a
Merge pull request #35148 from BerriAI/litellm_bedrock_batch_sse_kms
mateo-berri Aug 7, 2026
166a97e
fix(anthropic adapter): type _handle_choiceless_chunk param as ModelR…
mateo-berri Aug 7, 2026
281e52a
Merge pull request #35314 from BerriAI/devin_ai_fix_lit5034_empty_cho…
mateo-berri Aug 7, 2026
9f8f9cd
Merge remote-tracking branch 'origin/litellm_internal_staging' into l…
mateo-berri Aug 7, 2026
8ad75e5
test(bedrock): cover the batch record classifier fallbacks and pin me…
mateo-berri Aug 7, 2026
c736a22
style(bedrock): mark the batch normalizer locals Final for the tighte…
mateo-berri Aug 7, 2026
4b7adab
Merge pull request #35675 from BerriAI/litellm_bedrock_batch_non_chat…
mateo-berri Aug 7, 2026
a0e3599
test: rename openai files common utils test to a unique basename
mateo-berri Aug 7, 2026
e1717c5
fix(proxy): return the real status code when a credential update is r…
yucheng-berri Aug 7, 2026
d332acc
fix(proxy): improve Headroom 404 compression error diagnostics (#35952)
aayush598 Aug 7, 2026
83ab6e0
fix(proxy): invalidate cached project object on project update and de…
ryan-crabbe-berri Aug 7, 2026
527dc0a
feat(proxy): add apply_user_budget_to_team_keys opt-in (#36102)
ryan-crabbe-berri Aug 7, 2026
c9292d3
fix(proxy): stop alerting on health probes that lose the planned engi…
yassin-berriai Aug 7, 2026
6ba744b
test(docker): gate the componentized gateway and backend images on an…
yassin-berriai Aug 7, 2026
ae1d1cb
fix(http): stop pooled clients persisting cookies on the aiohttp jar …
yassin-berriai Aug 7, 2026
330a092
fix(router): bound fallback-walk work and error-log volume (#36148)
yassin-berriai Aug 7, 2026
d30e933
ci: wire credential_endpoints tests into the proxy endpoints job (#36…
cursor[bot] Aug 7, 2026
0cd58a0
docs(keys): document /key/info fields and clarify budget_reset_at is …
ryan-crabbe-berri Aug 7, 2026
bd289c1
fix(azure_sentinel): add AZURE_SENTINEL_AUTHORITY_HOST as a Sentinel …
yucheng-berri Aug 7, 2026
bf2def7
docs(pr-template): add a User Flow section with authoring instruction…
mateo-berri Aug 7, 2026
493eb90
chore(ui): regenerate schema.d.ts for the /key/info docstring update
mateo-berri Aug 7, 2026
eb3c8c1
fix(proxy): derive config agent ids from agent_name so grants survive…
ryan-crabbe-berri Aug 7, 2026
10e69e5
Merge pull request #36210 from BerriAI/devin/1786129992-schema-sync
mateo-berri Aug 7, 2026
1f61c43
build(deps): bump gitpython to 3.1.58, defer pypdf advisory
mateo-berri Aug 7, 2026
ecd5ad4
ci: always run the UI API types sync check so it can be required
mateo-berri Aug 7, 2026
90f8e1f
build(deps): bump gitpython to 3.1.58, defer pypdf advisory (#36212)
mateo-berri Aug 7, 2026
bc71564
build(deps): defer the second pypdf advisory until the 6.15.0 bump
mateo-berri Aug 7, 2026
78addb2
fix(proxy): deny agent access when key and team grants resolve to not…
ryan-crabbe-berri Aug 7, 2026
16d650c
test(proxy): compare empty agent list to the tuple get_agent_list ret…
mateo-berri Aug 7, 2026
4306c4a
ci: detect relevant changes from git instead of the paginated files API
mateo-berri Aug 7, 2026
1a54e47
Merge pull request #36218 from BerriAI/litellm_osv_defer_pypdf_tounicode
devin-ai-integration[bot] Aug 7, 2026
860e375
fix(a2a): align agent list annotation and test with the tuple return …
mateo-berri Aug 7, 2026
2f70f4e
build(deps): bump nanoid to 3.3.17 in the dashboard lockfile
mateo-berri Aug 7, 2026
cb211b5
Merge pull request #36217 from BerriAI/litellm_fix_agent_list_tuple_a…
devin-ai-integration[bot] Aug 7, 2026
fd0248c
Merge pull request #36213 from BerriAI/litellm_required_ui_api_types_…
mateo-berri Aug 7, 2026
db94280
Merge pull request #36227 from BerriAI/litellm_bump_nanoid_3_3_17
mateo-berri Aug 7, 2026
8db2fba
feat(ui): show user email or alias in usage data export (#36232)
ryan-crabbe-berri Aug 7, 2026
3238ce8
feat(auto-router): track turns per complexity tier (LIT-5302) (#36209)
tin-berri Aug 8, 2026
e50a420
fix(websearch): restore snippet text in native web_search_tool_result…
tin-berri Aug 8, 2026
1a45bf9
fix(proxy): resolve entity access groups in the model listing endpoin…
devin-ai-integration[bot] Aug 8, 2026
2a9aac7
fix(ui): let access groups be a team's only model source, with hover …
ryan-crabbe-berri Aug 8, 2026
1bafdb3
Merge pull request #36049 from BerriAI/litellm_list_batches_resolves_…
mateo-berri Aug 8, 2026
ecb0ea2
Merge pull request #36225 from BerriAI/litellm_fix_stale_agent_list_a…
mateo-berri Aug 8, 2026
96a8b7f
chore(ui): regenerate dashboard api types for tier_turns
mateo-berri Aug 8, 2026
a2bb97f
fix(websearch_interception): satisfy type discipline gate for search …
devin-ai-integration[bot] Aug 8, 2026
0791dd9
test(proxy): assert the copy _add_team_member_budget_table returns
mateo-berri Aug 8, 2026
0a606cb
fix(otel): name the RPC system and upstream on MCP tool-call spans (#…
yucheng-berri Aug 8, 2026
09a98f5
test(e2e): settle control-plane writes across every replica, not just…
yuneng-berri Aug 8, 2026
d4dc2c3
fix(guardrails): chunk oversized Bedrock ApplyGuardrail requests inst…
yucheng-berri Aug 8, 2026
5d2b695
Merge pull request #36247 from BerriAI/litellm_/e2e-propagation-barrier
yuneng-berri Aug 8, 2026
f05d468
fix(responses): forward allowed_openai_params through the chat comple…
devin-ai-integration[bot] Aug 8, 2026
f32d89f
Merge pull request #36244 from BerriAI/litellm_fix_stale_team_budget_…
mateo-berri Aug 8, 2026
b6e3ff6
Merge pull request #36243 from BerriAI/litellm_regen_schema_tier_turns
mateo-berri Aug 8, 2026
4de7a74
refactor(types): declare mirrored pricing fields on ModelInfo
mateo-berri Aug 7, 2026
24ac999
fix(types): drop Final on SPECIAL_MODEL_INFO_PARAMS for star-import r…
mateo-berri Aug 7, 2026
f668c10
chore(ui): regenerate dashboard api types for ModelInfo pricing fields
mateo-berri Aug 7, 2026
ede84ee
ci: give the remaining pull_request workflows a concurrency group
mateo-berri Aug 8, 2026
d0758a2
Merge pull request #36215 from BerriAI/litellm_declare_model_info_pri…
mateo-berri Aug 8, 2026
557d14c
fix(lint): make strict-gate noqas survive base ruff and flag stale ones
mateo-berri Aug 8, 2026
c3536c2
fix(lint): cover every base-owned ruff rule in the strict gate's exte…
mateo-berri Aug 8, 2026
dee667e
Merge pull request #36257 from BerriAI/litellm_ruff_external_split
mateo-berri Aug 8, 2026
21df36e
Merge remote-tracking branch 'origin/litellm_internal_staging' into l…
devin-ai-integration[bot] Aug 8, 2026
7bffbbd
refactor(vertex_ai): drop unreachable post-path status checks in batc…
mateo-berri Aug 8, 2026
f304b7b
refactor(lint): graduate the 35 zero-violation strict rules into ruff…
mateo-berri Aug 8, 2026
5cd027c
fix(lint): let the ratchet guard recognise a graduated rule
mateo-berri Aug 8, 2026
10209a8
Merge branch 'litellm_internal_staging' into devin_ai_require_managed…
mateo-berri Aug 8, 2026
c28cbb8
Merge pull request #35141 from BerriAI/litellm_vertex_batch_create_er…
mateo-berri Aug 8, 2026
e24a914
Merge pull request #36252 from BerriAI/litellm_ci_concurrency_guards
mateo-berri Aug 8, 2026
5f7a663
fix(proxy): enforce require_managed_files on every raw provider id route
mateo-berri Aug 8, 2026
b01eacd
ci: run the new fine-tuning and vector store file test dirs
mateo-berri Aug 8, 2026
8c0556a
fix(proxy): authenticate managed ids before routing
mateo-berri Aug 8, 2026
f038be2
build(lint): rename make pre-commit to make check with a working-tree…
mateo-berri Aug 8, 2026
20eb7bb
chore(typing): clear 1.4k basedpyright Any errors across 21 hotspot f…
mateo-berri Aug 8, 2026
8fdb1c1
Merge pull request #36161 from BerriAI/litellm_ruff_external_strict_r…
mateo-berri Aug 8, 2026
1d0cba7
Merge pull request #35551 from BerriAI/devin_ai_require_managed_files…
mateo-berri Aug 8, 2026
4d9defd
Merge pull request #36282 from BerriAI/litellm_decrease_anys_fable3
mateo-berri Aug 8, 2026
fb7861f
build(lint): count deleted files toward check triggers
mateo-berri Aug 8, 2026
09323fc
chore(ci): sync main into internal staging
yuneng-berri Aug 8, 2026
f6df762
test: roll back live router replay membership between tests (#36278)
mateo-berri Aug 8, 2026
b0fd3e1
Merge pull request #36288 from BerriAI/litellm_sync_main_into_interna…
yuneng-berri Aug 8, 2026
24888d5
Merge remote-tracking branch 'origin/litellm_internal_staging' into d…
mateo-berri Aug 8, 2026
8b16ee1
Merge pull request #36277 from BerriAI/litellm_make_check_fallback
mateo-berri Aug 8, 2026
0d7f7c6
test: repair stale CircleCI contracts
yuneng-berri Aug 8, 2026
cfd64d4
fix(ui): show team BYOK models in team fallback settings (#36241)
devin-ai-integration[bot] Aug 8, 2026
4150248
chore: remove pre-commit rule
mateo-berri Aug 8, 2026
12aeb53
fix(otel): mark v2 server spans as failed for pre-call errors (#34546)
devin-ai-integration[bot] Aug 8, 2026
7b89b3a
Merge pull request #35708 from BerriAI/devin_ai_lit_5033_websearch_in…
shivamrawat1 Aug 8, 2026
334e6da
Merge pull request #36295 from BerriAI/litellm_remove_pre_commit_rule
mateo-berri Aug 8, 2026
1a40a67
fix: stabilize generated user role ordering
yuneng-berri Aug 8, 2026
ff5f813
docs: clarify guideline priority ordering in CLAUDE.md
mateo-berri Aug 8, 2026
554f065
Merge pull request #36296 from BerriAI/litellm_claude_md_descending_i…
mateo-berri Aug 8, 2026
e35ee4e
feat(router): independent, default-on deployment affinity for the aut…
tin-berri Aug 8, 2026
97a59c8
Merge pull request #36293 from BerriAI/litellm_fix_circleci_88641_out…
yuneng-berri Aug 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .github/ci-coverage-allowlist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,6 @@ test_paths:
- tests/litellm-proxy-extras/test_litellm_proxy_extras_utils.py

dockerfiles:
- reason: >-
The componentized images the microservices chart deploys are built by no job; wiring both into
the scan workflow costs a full image build each and is deferred to a change that prices the
whole set
paths:
- backend/Dockerfile
- gateway/Dockerfile
- reason: >-
The dashboard container is a static Next.js export served by nginx, and the dashboard build
and lint workflows already exercise that output, so building the image adds no signal about it
Expand Down
27 changes: 27 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,33 @@ How it solves it:
- <blah>
- ...

## User Flow

<!-- Two ordered lists, Before and After, walking the same end user through the same task, written strictly from that user's seat
Read the linked issue, ticket, or customer thread first so the flow reflects the real application and the routes its users actually hit; don't invent a generic scenario
Lead each list with one plain sentence saying where the flow fails (Before) or succeeds (After), then number the steps
Every step is something the user does or observes: the HTTP method and full URL they hit, what they sent, and what visibly came back (status code, error text, the shape of an ID). UI steps name the page URL and what is on screen
No LiteLLM internals: never name functions, files, DB tables, config classes, hooks, callbacks, or code paths. "The upload hands back an ID that looks like OpenAI's own `file-abc123` instead of the scrambled one the gateway returned" is right, "no managed-file row was registered" is wrong
Keep the two lists step-for-step identical until they diverge, so the changed step is obvious
If the bug had a security or authorization consequence, end each list with what another user could or could no longer do
Regenerate this section whenever new commits change the PR's behavior, so it never describes an older revision

Example:

Before: a developer whose app streams chat completions gets no token counts back, so their cost dashboard reads zero

1. They send POST https://litellm-domain/v1/chat/completions with `"stream": true` and no `stream_options`
2. The last SSE chunk arrives with `"usage": null`, so their app records 0 prompt and 0 completion tokens
3. They open https://litellm-domain/ui/?page=logs and see the request logged at $0 spend

After: the same request comes back with real token counts, so the dashboard shows real spend

1. The proxy admin sets `always_include_stream_usage: true` and restarts the proxy
2. The developer sends the same POST https://litellm-domain/v1/chat/completions with `"stream": true` and no `stream_options`
3. The last SSE chunk now carries a `usage` object with real prompt and completion token counts
4. https://litellm-domain/ui/?page=logs shows that request at non-zero spend
-->

## Relevant issues

<!-- e.g., "Fixes #000" -->
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/check-schema-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
check-sync:
name: Verify schema.prisma copies match root
Expand Down
44 changes: 36 additions & 8 deletions .github/workflows/check-ui-api-types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ name: Check UI API Types Sync

on:
pull_request:
paths:
- "litellm/proxy/**"
- "litellm/types/**"
- "ui/litellm-dashboard/src/lib/http/schema.d.ts"
- "ui/litellm-dashboard/scripts/gen-api-types.mjs"
- "ui/litellm-dashboard/package.json"
- "ui/litellm-dashboard/package-lock.json"
- ".github/workflows/check-ui-api-types.yml"
branches:
- main
- litellm_internal_staging
- litellm_oss_staging
- "litellm_**"

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
check-sync:
name: Verify schema.d.ts matches the proxy OpenAPI spec
Expand All @@ -24,18 +25,39 @@ jobs:
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
with:
persist-credentials: false
fetch-depth: 2

- name: Detect changes that can affect the generated types
id: changes
run: |
set -euo pipefail
if ! base="$(git rev-parse --verify --quiet HEAD^2 >/dev/null && git rev-parse HEAD^1)"; then
echo "Not a pull request merge commit, running the full check."
echo "relevant=true" >> "$GITHUB_OUTPUT"
exit 0
fi
files="$(git diff --name-only "$base" HEAD)"
if grep -Eq '^(litellm/(proxy|types)/|ui/litellm-dashboard/(src/lib/http/schema\.d\.ts|scripts/gen-api-types\.mjs|package(-lock)?\.json)$|\.github/workflows/check-ui-api-types\.yml$)' <<< "$files"; then
echo "relevant=true" >> "$GITHUB_OUTPUT"
else
echo "No proxy, types or generator changes in this pull request, nothing to verify."
echo "relevant=false" >> "$GITHUB_OUTPUT"
fi

- name: Set up Python
if: steps.changes.outputs.relevant == 'true'
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.12"

- name: Set up uv
if: steps.changes.outputs.relevant == 'true'
uses: ./.github/actions/setup-uv-with-retries
with:
version: "0.10.9"

- name: Cache uv dependencies
if: steps.changes.outputs.relevant == 'true'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
Expand All @@ -46,31 +68,37 @@ jobs:
${{ runner.os }}-uv-

- name: Install backend dependencies
if: steps.changes.outputs.relevant == 'true'
run: .github/scripts/uv_sync_with_retries.sh --frozen --group ci --group proxy-dev --extra google --extra proxy --extra semantic-router

- name: Generate Prisma client
if: steps.changes.outputs.relevant == 'true'
env:
PRISMA_BINARY_CACHE_DIR: ${{ runner.temp }}/prisma-cache
run: uv run --no-sync prisma generate --schema litellm/proxy/schema.prisma

- name: Set up Node.js
if: steps.changes.outputs.relevant == 'true'
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version-file: ui/litellm-dashboard/.nvmrc
cache: "npm"
cache-dependency-path: ui/litellm-dashboard/package-lock.json

- name: Install dashboard dependencies
if: steps.changes.outputs.relevant == 'true'
working-directory: ui/litellm-dashboard
run: npm ci

- name: Regenerate types from the live spec
if: steps.changes.outputs.relevant == 'true'
working-directory: ui/litellm-dashboard
env:
LITELLM_PYTHON: "uv run --no-sync python"
run: npm run gen:api

- name: Fail if types are stale
if: steps.changes.outputs.relevant == 'true'
run: |
if ! git diff --exit-code -- ui/litellm-dashboard/src/lib/http/schema.d.ts; then
echo "::error file=ui/litellm-dashboard/src/lib/http/schema.d.ts::Generated API types are out of sync with the proxy OpenAPI spec."
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ on:
permissions:
pull-requests: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
lint-pr-title:
name: Validate PR title
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/guard-fork-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ on:

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
guard:
name: Block fork dependency changes
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/helm_unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
unit-test:
runs-on: ubuntu-latest
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/image-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ on:
- docker/Dockerfile.non_root
- migrations/Dockerfile
- migrations/run.py
- gateway/Dockerfile
- gateway/main.py
- backend/Dockerfile
- backend/main.py
- docker/component_entrypoint.sh
- litellm-proxy-extras/**
- tests/proxy_migration_tests/**
- uv.lock
Expand Down Expand Up @@ -147,3 +152,63 @@ jobs:
run: |
python -m pip install "pytest==9.0.3"
python -m pytest tests/proxy_migration_tests/test_offline_image_migration.py -v

gateway-image:
name: gateway-image
runs-on: ubuntu-latest
if: >-
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name == github.repository
timeout-minutes: 30
permissions:
contents: read
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
with:
persist-credentials: false

- name: Build gateway image
run: docker build -f gateway/Dockerfile -t litellm-gateway-scan:${{ github.sha }} .

- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.12"

- name: Verify the gateway serves offline as a non-root uid
env:
LITELLM_IMAGE: litellm-gateway-scan:${{ github.sha }}
LITELLM_COMPONENT_PORT: "4000"
run: |
python -m pip install "pytest==9.0.3"
python -m pytest tests/proxy_migration_tests/test_component_image_serves_offline.py -v

backend-image:
name: backend-image
runs-on: ubuntu-latest
if: >-
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name == github.repository
timeout-minutes: 30
permissions:
contents: read
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
with:
persist-credentials: false

- name: Build backend image
run: docker build -f backend/Dockerfile -t litellm-backend-scan:${{ github.sha }} .

- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.12"

- name: Verify the backend serves offline as a non-root uid
env:
LITELLM_IMAGE: litellm-backend-scan:${{ github.sha }}
LITELLM_COMPONENT_PORT: "4001"
run: |
python -m pip install "pytest==9.0.3"
python -m pytest tests/proxy_migration_tests/test_component_image_serves_offline.py -v
4 changes: 4 additions & 0 deletions .github/workflows/test-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
lint:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-litellm-ui-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
- litellm_oss_staging
- "litellm_**"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
build-ui:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-litellm-ui-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
- litellm_oss_staging
- "litellm_**"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
frontend-lint:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-mcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
test:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-model-map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
validate-model-prices-json:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test-unit-proxy-endpoints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,15 @@ jobs:
tests/test_litellm/proxy/google_endpoints
tests/test_litellm/proxy/openai_files_endpoint
tests/test_litellm/proxy/batches_endpoints
tests/test_litellm/proxy/fine_tuning_endpoints
tests/test_litellm/proxy/vector_store_files_endpoints
tests/test_litellm/proxy/video_endpoints
tests/test_litellm/proxy/response_api_endpoints
tests/test_litellm/proxy/image_endpoints
tests/test_litellm/proxy/vector_store_endpoints
tests/test_litellm/proxy/agent_endpoints
tests/test_litellm/proxy/a2a
tests/test_litellm/proxy/credential_endpoints
tests/test_litellm/proxy/discovery_endpoints
tests/test_litellm/proxy/health_endpoints
tests/test_litellm/proxy/shutdown
Expand Down
4 changes: 3 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ Python max line length is 120, not 88

When you fix violations gated by `ruff-strict-budget.json`, `type-discipline-budget.json`, or `basedpyright-code-budget.json`, run `make lint-budget-update` and commit the lowered limits so the ceilings ratchet down instead of leaving stale headroom. It measures the working tree, so it must contain exactly the fixes you're committing

`make pre-commit` saves its complete output to a log file in .git (overwriting previous pre-commit logs) and prints that path as its first and last output lines. To inspect a run, read or grep that log instead of re-running the multi-minute checks just to see a different slice
Run `make check` (formerly `make pre-commit`, which still works as an alias) before every commit, merge commits included. It runs the CI-gating lint scoped to your staged files, so stage everything you intend to commit first; it warns about changed files you left unstaged and names the checks that were skipped because of them. With nothing staged it instead checks the working tree's diff against the merge base with origin/litellm_internal_staging, which is how you predict the CI lint on an already-committed branch, e.g. right after a merge commit. Deleted files count toward which checks run (a deletion alone can turn CI red) in both modes

`make check` saves its complete output to a log file in .git (overwriting previous logs) and prints that path as its first and last output lines. To inspect a run, read or grep that log instead of re-running the multi-minute checks just to see a different slice

If you're trying to create a new function that relies on untyped stuff, instead of adding more Any's and pushing `reportAny` / `reportExplicitAny` closer to their basedpyright ceilings, just validate it in the caller with Pydantic (a model or `TypeAdapter` that returns the typed thing or raises will do) and then pass the now typed variable in

Expand Down
18 changes: 13 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
lint-basedpyright lint-e2e-basedpyright lint-basedpyright-budget-update lint-type-discipline lint-type-discipline-budget-update \
lint-ruff-budget lint-ruff-budget-update lint-budget-update lint-gate \
install-dev install-proxy-dev install-test-deps install-hooks \
install-helm-unittest check-circular-imports check-import-safety pre-commit \
install-helm-unittest check-circular-imports check-import-safety check pre-commit \
lint-install lint-fetch-base bootstrap

# Default target
Expand All @@ -22,7 +22,8 @@ help:
@echo " make install-test-deps - Install the full local test environment"
@echo " make install-helm-unittest - Install helm unittest plugin"
@echo " make install-hooks - Install git hooks (Conventional Commits + Branches)"
@echo " make pre-commit - Run CI-equivalent lint on staged files (run before committing)"
@echo " make check - Run CI-equivalent lint on staged files, or on the diff vs the base branch when nothing is staged"
@echo " make pre-commit - Legacy alias for make check"
@echo " make format - Apply ruff format code formatting"
@echo " make format-check - Check ruff format code formatting (matches CI)"
@echo " make lint - Run all linting (Ruff, basedpyright, format check, circular imports, import safety)"
Expand Down Expand Up @@ -236,13 +237,20 @@ lint-checks: lint-format-check-changed lint-ruff lint-gate lint-type-discipline
# Faster linting for local development (only checks changed code)
lint-dev: lint-format-changed check-circular-imports check-import-safety

# Run the gating CI checks against your staged files right before committing. Mirrors
# Run the gating CI checks against your changes. Scopes to staged files when anything
# is staged (warning about changed files left unstaged); with nothing staged it falls
# back to the working tree's diff against the merge base with the base branch, so a
# fresh merge commit or an unstaged working tree still gets checked. Mirrors
# test-linting.yml (Python), test-litellm-ui-build.yml's frontend-lint (dashboard), and
# check-ui-api-types.yml (API-type drift), skipping any whose files you didn't stage.
# check-ui-api-types.yml (API-type drift), skipping any whose files aren't in scope.
# Not auto-installed as a git hook so it never slows an unrelated human commit.
pre-commit: bootstrap
check: bootstrap
./scripts/pre_commit_lint.sh

pre-commit:
@echo "make pre-commit is a legacy alias; use make check" >&2
@$(MAKE) check

# Testing targets
test: install-test-deps
$(UV_RUN) pytest tests/
Expand Down
Loading
Loading