Skip to content

fix(proxy): show committed spend in the remaining budget gauges - #49199

Merged
mateo-berri merged 17 commits into
BerriAI:mainfrom
zoveki:litellm_budget_gauges_live_spend
Nov 9, 2026
Merged

mateo-berri merged 17 commits into
BerriAI:mainfrom
zoveki:litellm_budget_gauges_live_spend

Conversation

@zoveki

@zoveki zoveki commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Handwritten 1-3 sentence description

The Prometheus remaining budget gauges read spend from rows auth caches, and since v1.93.1 nothing updates those rows after a charge. So for about a minute after a charge, a free request like GET /v1/responses/{id} sets the key, team, user and org gauges back to older values. The customer gauge also takes off each charge twice

This PR adds a second set of spend counters that only charges add to, so the gauges show charged spend and never the holds of requests in flight

Details

TLDR

Problem this solves:

  • Remaining budget gauges read stale spend for about 60 s
  • A $0 request sets them back to an older value
  • The customer gauge takes off each charge twice

How it solves it:

  • Charges also add to new counters, holds never do
  • The gauges read those counters, only with Prometheus on
Decisions
  1. Scope is the key, team, user, org and customer gauges, each read only when that entity has a max budget. The report names the key and team gauges, but one request moves all five from the same cached rows, so fixing two would leave one dashboard's series disagreeing. An entity without a max budget reports an infinite remaining budget whatever its spend, so it pays no read
  2. The route gate is "the route runs budget checks", not "the route is an LLM route", so /v1/models skips it and the budget-checked health routes get it
  3. The gauges read new spend:committed:* counters that only charges add to. They live in the spend counter store beside the counters they twin, so they share its Redis, its per-worker memory copy and its invalidation broadcast, and the store's key parser accepts them only for the key, team, user, org and customer lifetime counters. Rejected: a key prefix outside spend:*, which the store refuses. Rejected: the enforcement counters spend:*, since reservations add each in-flight request's maximum cost into them, so a gauge fell by the whole hold during a long request and the number stopped meaning charged spend. Rejected: moving holds out of spend:*, because that changes every reserve and release path. Rejected: reading spend from the DB, which adds a query per request and still lags by the spend write interval
  4. A gauge takes the largest of the stored spend, the committed value auth read, and the committed value read at emit minus this request's cost, then adds this request's cost. The read at emit keeps a long request from reporting spend as old as its start, and the subtraction is there because the charge can run before or after the gauge. The read gets half the gauge's timeout, so a slow Redis falls back to the stored spend in time and never fails a request. Rejected: the whole timeout, which let the gauge's timeout cancel the gauges first. The customer gauge uses the larger of committed spend plus this cost and the cached row, because that row can already hold this charge
  5. Committed counters exist only when a Prometheus logger is registered and only for the budgeted entities auth named, so other proxies, the master key and entities with no budget pay no extra read or write. They seed from the DB when absent, every spend reset or edit and every key, team, user, org or customer delete drops them, and window counters get no twin because the gauges do not read window spend, which also leaves an id containing :window: without one
  6. The x-litellm-key-spend header and the logging payload's spend fields are unchanged, and their staleness predates this PR. Chat rows keep the value auth read on an auth field left out of dumps and repr. Pass-through rows carry it as litellm_params["committed_budget_spend"], which CustomLoggers can read, but its repr and str show no values, so a logger that dumps the whole row (Athina, a Sentry breadcrumb, debug logs) gets only that key name
  7. Rejected: writing spend back into the key cache again, which is what fix(proxy): stop stale auth cache re-publish to Redis so key updates propagate across replicas #33565 removed to stop stale re-publishing across replicas
  8. Rejected: returning the values out of the budget checks, which changes several signatures for the same result
  9. Built on no open PR. fix(proxy): use current spend for virtual key soft budget alerts #48355 reads the enforcement counter, but only for the soft budget alert, so the two do not overlap
  10. The client in the report is a Prometheus scrape plus API requests, so curl and GET /metrics/ are that client and the proof uses them
  11. A failed request with a recovered cost also moves the committed counters, because fix(proxy): raise live budget counters for failure spend rows #47741 raises the live counters for it and the gauges would otherwise miss that cost
  12. A billed background response has no auth on its row, because the charge runs from the creator's stored attribution. Its charge moves only the committed counters that already exist, which costs one extra read per such charge with Prometheus on, since those exist only for budgeted entities. Its gauge adds its cost to the value it reads at emit, because counters flush after the callbacks. Rejected: seeding a cold counter here, which would create counters for entities with no budget. Rejected: storing auth with the attribution, which changes what the response store keeps for a gauge read
  13. Pass-through rows carry the committed spend auth read in a proxy-set litellm_params["committed_budget_spend"], so a pass-through charge moves the committed counters, and a value in the client's body never replaces it. Rejected: the auth copy chat rows carry, since PostHog and Generic API v1 dump pass-through metadata whole and would send the auth object to their vendor. Rejected: charging them from a lookup of the key, which reads the DB per request
  14. Each post-call increment returns a settlement that turns settled once its replies are back, whether the request's flush or the post-call deadline sent the batch. While the request's own committed charge is unsettled the gauge trusts the counter read at emit and adds the cost, and once it is settled the gauge takes the cost back out of that read. When it settles during the read, the gauge falls back to the size-match check auth-time spend allows. Rejected: one flag for "this request's post-call batch went out", which an unrelated post-call write could set first, so the gauge dropped its own unsent charge. Rejected: only the size-match guess, which took a same-size charge from another request for the own one and left the gauge a charge behind under overlap
  15. The store gives committed counters a TTL of twice the spend log queue's longest retry backoff plus the DB spend write interval plus its jitter, 90 s at the default 10 s interval, set once at startup and never shorter than the store's own TTL. That keeps a counter alive until the DB holds its charges, so its next seed never reads a total still missing them. Every charge moves a committed counter's expiry out to that TTL, on a Redis Cluster too, and the enforcement counters keep the store's TTL as on main. Rejected: the store's 60 s TTL alone, which a write interval of about 25 s or more outlasts. Rejected: no TTL, which keeps every budgeted entity's counter forever
  16. Concurrent charges on a cold committed counter read the DB once, under the reseed lock the enforcement counters already use
  17. /global/spend/reset reads key and team ids in keyset pages of 1000. Rejected: loading all ids at once
  18. A cold committed counter seeds after the charge went to the DB write queue, the same order the enforcement counters use on main, so a DB write inside that window can count one charge twice (see Caveats). Rejected: seeding before the queue, which reorders the charge path for both counter sets and adds a DB read to charges that later fail
  19. The failure path gives the org gauge the failed request's own response_cost, through the helper the success path uses, so a charged failure like a stream cut partway counts its cost while that charge is still queued, and the size-match fallback for a charge that settles during the read covers both paths. Rejected: keeping a cost of 0 on the failure path, which left a still-queued charge out of that worker's org gauge until its next request

User Flow

Before: for about a minute after each charge, every remaining budget gauge reads too high

  1. The admin creates an org, user, team and key with max_budget 4, 3, 2 and 1, and a customer with 5
  2. A charged POST https://litellm-domain/v1/responses with that key and the customer as user takes twice its cost off the customer gauge in GET https://litellm-domain/metrics/
  3. A free GET https://litellm-domain/v1/responses/{id} sets the key, team, user and org gauges back
  4. The next charged POST https://litellm-domain/v1/chat/completions (or /v1/messages) misses earlier charges
  5. A background POST https://litellm-domain/v1/responses billed by a later poll leaves every gauge a charge behind
  6. A 400 leaves the org gauge behind
  7. A broken stream's cost never reaches the gauges
  8. A free poll after a pass-through POST https://litellm-domain/openai/v1/chat/completions sets the gauges back too
  9. Ten overlapping charges leave the key gauge at one charge

After: every gauge shows the real remaining budget

  1. The same admin creates the same entities
  2. The same POST takes its cost off every gauge
  3. The same free poll keeps every gauge right
  4. The next charged request takes off every charge so far
  5. The same billed poll and 400 keep every gauge right
  6. The next charge after a broken stream includes its cost
  7. During a long request the gauges show only charged spend
  8. The same pass-through POST and free poll keep every gauge right
  9. After the same overlapping charges each worker's gauge shows nearly all of them

Affected release

Regression in v1.93.1

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests
  • The handful of test files covering my change pass locally, e.g. uv run pytest tests/unit/<your_test_file>.py -v. Leave the suites (make test-unit-*, make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more
  • My PR passes all required CI/CD checks (e.g., lint, schema.d.ts sync check, etc.)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • Every automated review on my PR's latest commit has finished, and I have addressed or replied to each of its findings before requesting a maintainer review

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

Screenshots / Proof of Fix

Last updated: 434d3b0. QA ran on 4876a74. Changes since QA: deletes, :window: ids, pass-through rows, the read timeout, cluster expiry and reset query names. Proof remains valid because none change a case's path on the QA rig's standalone Redis

Checks since QA

/live-pr-risk carries from 25598f0 to 434d3b0. That commit only moves the global reset's two page queries and counters into constants keyed by entity, so the Prisma span check can read the SQL. The SQL, counters and page order are unchanged. The reset tests at 999, 1000, 1001 and 2500 keys, the failed-drop test and the span check pass at 434d3b0

The Pass-through case passed again at 7b017b6 (log)

On a Redis Cluster, a charge at 25598f0 moves a nearly expired committed counter back out to its TTL and keeps both charges, while ca45a1c lost the charge (tip, ca45a1cab0, base)

With every Redis reply held 80 ms, each charge at 25598f0 still sets the key gauge with every earlier charge counted (tip, base)

Proxies A and B, 2 workers each, shared Postgres and Redis and called real OpenAI gpt-6.1-terra. This gist has logs and scripts

Case Before After
Free poll Older spend, key at 0 Real remaining
Next charge Misses charges Every charge
Customer Twice at steps 1 and 8 Real remaining
Long request Misses charges Charged spend only
Background response 1 to 2 charges behind Real remaining
400, org gauge A charge behind Real remaining
Broken stream Key 37 of 334 at step 4 Real remaining
Pass-through Key 1 to 2 charges behind Real remaining
10 overlapping charges Key 37 of 1480 Key 1369 to 1480
Spend each gauge implied after every step

The setup is the User Flow's. Requests 1, 4 and 8 send the customer as user, and request 10 is a long chat request on A while 10a and 10b run on B. Steps 12b and 14b are plain chat requests on A, placed around the billed response so the next charge shows whether it counted. Step 13 starts a background response on A and 13b.1 is the poll on B that bills it. Step 14 is a chat request OpenAI rejects with a 400, which reports only the org gauge. Each cell is the max budget minus the gauge, in millionths of a dollar, from the worker that served the request. When a request changed no series, the cell shows every worker's series, so "158 or 12245" means the two workers disagree. Bold marks a value off the real spend, which is the running sum of x-litellm-response-cost. The customer gauge is compared with the customer's own requests. Real spend differs between the legs because OpenAI billed different token counts

The older value in an "or" cell is a worker that served no request since then, and its series keeps its last value. On head the newer value is the real spend in every such cell

Before (83e2e5b)

Step Request Real spend Key Team User Org Customer real Customer
1 POST /v1/responses via A 42 42 42 42 42 42 84
2 GET /v1/responses/{id} via B 42 0 0 0 0 - -
3 GET /v1/responses/{id} via A 42 0 0 0 0 - -
4 POST /v1/chat/completions via B 84 42 42 42 42 84 84
5 POST /v1/messages via A 126 42 42 42 84 - -
6 GET /v1/responses/{id} via B 126 0 42 42 42 - -
7 GET /v1/responses/{id} via A 126 0 42 42 126 - -
8 POST /v1/responses via B 163 37 37 37 163 121 158
9 GET /v1/responses/{id} via A 163 0 or 42 42 42 42 or 126 - -
10a POST /v1/chat/completions via B 200 37 79 79 200 - -
10b GET /v1/responses/{id} via B 200 0 37 37 163 - -
10d GET /v1/responses/{id} via B 12978 200 200 200 200 - -
11 GET /v1/responses/{id} via B 12978 12978 12978 12978 12978 - -
12 GET /v1/responses/{id} via A 12978 12978 12978 12978 12978 - -
12b POST /v1/chat/completions via A 13015 13015 13015 13015 13015 - -
13 POST /v1/responses background via A 13015 12978 12978 12978 12978 - -
13b.1 GET /v1/responses/{id} billed via B 13057 13020 13020 13020 13020 - -
14 POST /v1/chat/completions, 400, via A 13057 - - - 13015 - -
14b POST /v1/chat/completions via A 13094 13015 13052 13052 13094 - -
15 GET /v1/responses/{id} via B 13094 13094 13094 13094 13094 - -

After (4876a74)

Step Request Real spend Key Team User Org Customer real Customer
1 POST /v1/responses via A 42 42 42 42 42 42 42
2 GET /v1/responses/{id} via B 42 42 42 42 42 - -
3 GET /v1/responses/{id} via A 42 42 42 42 42 - -
4 POST /v1/chat/completions via B 79 79 79 79 79 79 79
5 POST /v1/messages via A 121 121 121 121 121 - -
6 GET /v1/responses/{id} via B 121 121 121 121 121 - -
7 GET /v1/responses/{id} via A 121 42 or 121 42 or 121 42 or 121 42 or 121 - -
8 POST /v1/responses via B 158 158 158 158 158 116 116
9 GET /v1/responses/{id} via A 158 158 158 158 158 - -
10a POST /v1/chat/completions via B 195 195 195 195 195 - -
10b GET /v1/responses/{id} via B 195 195 195 195 195 - -
10d GET /v1/responses/{id} via B 12208 12208 12208 12208 12208 - -
11 GET /v1/responses/{id} via B 12208 195 or 12208 195 or 12208 195 or 12208 195 or 12208 - -
12 GET /v1/responses/{id} via A 12208 158 or 12208 158 or 12208 158 or 12208 158 or 12208 - -
12b POST /v1/chat/completions via A 12245 12245 12245 12245 12245 - -
13 POST /v1/responses background via A 12245 158 or 12245 158 or 12245 158 or 12245 158 or 12245 - -
13b.1 GET /v1/responses/{id} billed via B 12287 12287 12287 12287 12287 - -
14 POST /v1/chat/completions, 400, via A 12287 - - - 12287 - -
14b POST /v1/chat/completions via A 12324 12324 12324 12324 12324 - -
15 GET /v1/responses/{id} via B 12324 12324 12324 12324 12324 - -
Other cases, from extra-cases.sh and idle-charge-commands.sh in the gist
Case Before After
Key, user and org spend edited to 0, E1.6 Real remaining Real remaining
Global spend reset, E1.8 Team 0.000074 too low (see Caveats) Real remaining
Master key, E2 No key gauge No key gauge
Key with no budget, E3.1 +Inf, team right +Inf, team right
Key with no team, E3.2 Real remaining Real remaining
Global reset reads keys in pages on Postgres, E1.7 HTTP 200 HTTP 200
Spend commands on a warm charge, E4 23 36 (see Caveats)
Spend commands after 75 s idle, E7 28 37 (see Caveats)
No Redis, 2 workers, E5.2 Every gauge a charge behind Real remaining, one worker served both (see Caveats)
proxy_batch_write_at: 120, free poll after 75 s, E6.3 Poll right, other worker's key and org a charge behind Real remaining

In E1.8 the base request went to the worker that served E1.6, while the head request went to the worker that served nothing since E1.1, so the two legs did not start from the same state. The base worker had served E1.6 28 s earlier and the head worker last served E1.1 a minute earlier, so only the base worker likely still held a cached team row from before the reset, and both trees read that row the same way. The previous run hit this on head instead, for the same reason. In E5.2 the head proxy sent both charges to one worker, so this run did not reach the no-Redis gap between workers on head, which the previous run showed. In E6.3 the base poll read right, and the other worker's key and org gauges, set by the charged POST /v1/responses the script sends before the 75 s wait, are a charge behind. In the previous run all four of that worker's gauges were behind

Pass-through and overlapping charges, from passthrough-overlap.sh in the gist

Spend each gauge implied, in millionths of a dollar, on proxies A and B. The P rows start from 42 of real spend after 75 s idle, and the O rows are 10 chat requests at once, split across A and B. A range covers every worker. On base the P.3 free poll set the key and org gauges back to 42, where the previous run's P.3 read right, and no worker's key gauge reached 116. In the head P.4 and P.5 ranges the lower value is the worker that served P.2 and P.3, idle since then

Step Real spend Before key Before org After key After org
P.2 79 42 to 79 42 to 79 79 79
P.3 79 42 42 79 79
P.4 116 42 to 79 42 to 79 79 to 116 79 to 116
P.5 116 42 to 79 79 79 to 116 79 to 116
O.1 370 37 37 111 to 370 111 to 370
O.2 740 37 333 592 to 740 592 to 740
O.3 1110 37 777 888 to 1110 888 to 1110
O.4 1480 37 777 1369 to 1480 1369 to 1480
Broken stream, from broken-stream.sh in the gist

One proxy with 2 workers, where a relay cuts the HTTP response body after 40 stream events. Step 2 returns HTTP 200 with an error event, and GET /spend/logs shows status failure with spend 0.000223. On base step 3 ran on the second worker and reads right. In step 4 the worker that served step 1 shows key and team spend of one charge and user spend of two, and only its org gauge is right. This reads differently from the previous run, where the org gauge sat at its full budget of 4.0 in steps 3 and 4. On head steps 3 and 4 ran on different workers, and both read right

Before (83e2e5b), expected key 0.999666 at step 4

=== 4. another charge
$ curl -s -o "$BODY" -w "HTTP %{http_code}, x-litellm-response-cost %header{x-litellm-response-cost}\n" "$U/v1/chat/completions" -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d '{"model":"gpt-6.1-terra","messages":[{"role":"user","content":"Say hello in one word."}]}'
HTTP 200, x-litellm-response-cost 3.7000000000000005e-05
$ curl -s "$U/metrics/" -H "Authorization: Bearer $MK" | grep -E "^litellm_remaining_(api_key|team|user|org)_budget_metric\{" | grep -E "$TAG|$ORG" | sed -E "s/hashed_api_key=\"[^\"]*\",?//; s/^litellm_remaining_//; s/_budget_metric//; s/pid=\"([0-9]+)\"/pid \1/; s/,?(api_key_alias|team_alias|user|organization|organization_alias|team)=\"[^\"]*\"//g"
api_key{,pid 475967} 0.999963
api_key{,pid 475966} 0.999703
team{pid 475967} 1.999963
team{pid 475966} 1.999703
user{pid 475967} 2.999926
user{pid 475966} 2.999703
org{org_alias="budget-gauge-bQbr-break-org",org_id="da68863f-b724-4973-a6e0-a726ef0a1fed",pid 475967} 3.999666
org{org_alias="budget-gauge-bQbr-break-org",org_id="da68863f-b724-4973-a6e0-a726ef0a1fed",pid 475966} 3.999703
    expected from step 3's spend plus this charge: key 0.999666, team 1.999666, user 2.999666, org 3.999666

After (4876a74), expected key 0.999666 at step 4

=== 4. another charge
$ curl -s -o "$BODY" -w "HTTP %{http_code}, x-litellm-response-cost %header{x-litellm-response-cost}\n" "$U/v1/chat/completions" -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d '{"model":"gpt-6.1-terra","messages":[{"role":"user","content":"Say hello in one word."}]}'
HTTP 200, x-litellm-response-cost 3.7000000000000005e-05
$ curl -s "$U/metrics/" -H "Authorization: Bearer $MK" | grep -E "^litellm_remaining_(api_key|team|user|org)_budget_metric\{" | grep -E "$TAG|$ORG" | sed -E "s/hashed_api_key=\"[^\"]*\",?//; s/^litellm_remaining_//; s/_budget_metric//; s/pid=\"([0-9]+)\"/pid \1/; s/,?(api_key_alias|team_alias|user|organization|organization_alias|team)=\"[^\"]*\"//g"
api_key{,pid 475825} 0.999666
api_key{,pid 475826} 0.999703
team{pid 475825} 1.999666
team{pid 475826} 1.999703
user{pid 475825} 2.999666
user{pid 475826} 2.999703
org{org_alias="budget-gauge-hQbr-break-org",org_id="36e5d630-36c9-4e4e-a0f7-9c4cfe3f7f40",pid 475825} 3.999666
org{org_alias="budget-gauge-hQbr-break-org",org_id="36e5d630-36c9-4e4e-a0f7-9c4cfe3f7f40",pid 475826} 3.999703
    expected from step 3's spend plus this charge: key 0.999666, team 1.999666, user 2.999666, org 3.999666
Setup, config and script

With LITELLM_MASTER_KEY, LITELLM_LICENSE, OPENAI_API_KEY, DATABASE_URL, REDIS_HOST, REDIS_PORT and a per-proxy PROMETHEUS_MULTIPROC_DIR set in the env

model_list:
  - model_name: gpt-6.1-terra
    litellm_params:
      model: openai/gpt-6.1-terra
      api_key: os.environ/OPENAI_API_KEY
litellm_settings:
  callbacks: ["prometheus"]
  enable_end_user_cost_tracking_prometheus_only: true
general_settings:
  master_key: os.environ/LITELLM_MASTER_KEY
  database_url: os.environ/DATABASE_URL
  coordination_redis:
    host: os.environ/REDIS_HOST
    port: os.environ/REDIS_PORT
python litellm/proxy/proxy_cli.py --config config.yaml --port <A or B> --num_workers 2 --use_prisma_db_push
#!/usr/bin/env bash
set -u
T=$1
A=$INTEGRATION_PROXY_URL; B=$INTEGRATION_PEER_URL; MK=$INTEGRATION_MASTER_KEY
run() { printf '$ %s\n' "$1" >&2; eval "$1"; }
echo "=== tree: HEAD $(git rev-parse --short=10 HEAD), changes outside tests/: [$(git status --porcelain -- . ':!tests' | wc -l | tr -d ' ')]"
echo "=== topology: proxy A ${A##*:} and proxy B ${B##*:}, 2 uvicorn workers each, one shared Postgres and Redis"
calc() { awk "BEGIN{printf \"%.6f\", $1}"; }
U="budget-gauge-$T-user"; C="budget-gauge-$T-cust"
ORG=$(run 'curl -s "$A/organization/new" -H "Authorization: Bearer $MK" -H "Content-Type: application/json" -d "{\"organization_alias\":\"budget-gauge-$T-org\",\"max_budget\":4.0}" | jq -r .organization_id')
run 'curl -s "$A/user/new" -H "Authorization: Bearer $MK" -H "Content-Type: application/json" -d "{\"user_id\":\"$U\",\"max_budget\":3.0,\"auto_create_key\":false}" > /dev/null'
TEAM=$(run 'curl -s "$A/team/new" -H "Authorization: Bearer $MK" -H "Content-Type: application/json" -d "{\"team_alias\":\"budget-gauge-$T-team\",\"max_budget\":2.0,\"organization_id\":\"$ORG\",\"members_with_roles\":[{\"role\":\"user\",\"user_id\":\"$U\"}]}" | jq -r .team_id')
KEYJ=$(run 'curl -s "$A/key/generate" -H "Authorization: Bearer $MK" -H "Content-Type: application/json" -d "{\"key_alias\":\"budget-gauge-$T-key\",\"team_id\":\"$TEAM\",\"user_id\":\"$U\",\"organization_id\":\"$ORG\",\"max_budget\":1.0}"')
KEY=$(echo "$KEYJ" | jq -r .key)
run 'curl -s "$A/customer/new" -H "Authorization: Bearer $MK" -H "Content-Type: application/json" -d "{\"user_id\":\"$C\",\"max_budget\":5.0}" > /dev/null'
[ "$KEY" != null ] || { echo "key/generate failed: $(echo "$KEYJ" | head -c 300)"; exit 1; }
scrape() { run 'curl -s "$'"$1"'/metrics/" -H "Authorization: Bearer $MK" | grep -E "^litellm_remaining_(api_key|team|user|org|customer)_budget_metric\{" | grep -E "budget-gauge-$T|$ORG" | sed -E "s/hashed_api_key=\"[^\"]*\",?//; s/(^|[{,])team=\"[^\"]*\",?/\1/; s/org_id=\"[^\"]*\",?//; s/,\}/}/" | sort'; }
CUM=0; CUMC=0
BODY=$(mktemp)
KC='curl -s -o "$BODY" -w "HTTP %{http_code}, x-litellm-response-cost %header{x-litellm-response-cost}, x-litellm-key-spend %header{x-litellm-key-spend}\n"'
KH='-H "Authorization: Bearer $KEY" -H "Content-Type: application/json"'
step() {
  local n=$1 via=$2 cmd=$3
  local before after out code cost changed
  echo "=== step $n"
  before=$(scrape "$via")
  out=$(run "$cmd")
  echo "$out"
  code=${out#HTTP }; code=${code%%,*}
  cost=$(echo "$out" | sed -E 's/.*x-litellm-response-cost ([^,]*),.*/\1/'); cost=${cost:-0}
  CUM=$(calc "$CUM + $cost"); case "$cmd" in *'\"user\":\"$C\"'*) CUMC=$(calc "$CUMC + $cost");; esac
  echo "    at $(date -u +%T), spend so far $CUM (customer $CUMC), so key $(calc "1 - $CUM"), team $(calc "2 - $CUM"), user $(calc "3 - $CUM"), org $(calc "4 - $CUM"), customer $(calc "5 - $CUMC")"
  [ "$code" = 200 ] || echo "    body: $(head -c 400 "$BODY")"
  sleep 3
  after=$(scrape "$via")
  [ -n "$after" ] && echo "$after"
  changed=$(comm -13 <(echo "$before") <(echo "$after") | sed -E 's/^litellm_remaining_([a-z_]+)_budget_metric\{.*pid="([0-9]+)".*/\1 pid \2/' | paste -sd, - | sed 's/,/, /g')
  echo "    series this request changed: ${changed:-none}"
}
step 1 A "$KC"' "$A/v1/responses" '"$KH"' -d "{\"model\":\"gpt-6.1-terra\",\"input\":\"Say hi in one word.\",\"max_output_tokens\":64,\"user\":\"$C\"}"'
RID=$(jq -r .id "$BODY")
step 2 B "$KC"' "$B/v1/responses/$RID" '"$KH"
step 3 A "$KC"' "$A/v1/responses/$RID" '"$KH"
step 4 B "$KC"' "$B/v1/chat/completions" '"$KH"' -d "{\"model\":\"gpt-6.1-terra\",\"messages\":[{\"role\":\"user\",\"content\":\"Say bye in one word.\"}],\"max_completion_tokens\":64,\"user\":\"$C\"}"'
step 5 A "$KC"' "$A/v1/messages" '"$KH"' -d '\''{"model":"gpt-6.1-terra","max_tokens":64,"messages":[{"role":"user","content":"Say thanks in one word."}]}'\'
step 6 B "$KC"' "$B/v1/responses/$RID" '"$KH"
step 7 A "$KC"' "$A/v1/responses/$RID" '"$KH"
step 8 B "$KC"' "$B/v1/responses" '"$KH"' -d "{\"model\":\"gpt-6.1-terra\",\"input\":\"Say ok in one word.\",\"max_output_tokens\":64,\"user\":\"$C\"}"'
step 9 A "$KC"' "$A/v1/responses/$RID" '"$KH"
LH=$(mktemp); LB=$(mktemp)
echo "=== step 10"
run 'curl -s -D "$LH" -o "$LB" "$A/v1/chat/completions" '"$KH"' -d '\''{"model":"gpt-6.1-terra","messages":[{"role":"user","content":"Write a 1500 word story about a lighthouse keeper."}],"max_completion_tokens":4000}'\'' &'
LPID=$!
sleep 2
step 10a B "$KC"' "$B/v1/chat/completions" '"$KH"' -d '\''{"model":"gpt-6.1-terra","messages":[{"role":"user","content":"Say yes in one word."}],"max_completion_tokens":64}'\'
step 10b B "$KC"' "$B/v1/responses/$RID" '"$KH"
wait $LPID
LCOST=$(grep -i '^x-litellm-response-cost:' "$LH" | tr -d '\r' | awk '{print $2}')
CUM=$(calc "$CUM + ${LCOST:-0}")
echo "=== 10c. the long request finished at $(date -u +%T): HTTP $(head -1 "$LH" | awk '{print $2}'), x-litellm-response-cost ${LCOST:-<absent>}, spend so far $CUM"
step 10d B "$KC"' "$B/v1/responses/$RID" '"$KH"
echo "=== wait 70 s so every cached key entry expires"
sleep 70
echo "=== key/info spend $(run 'curl -s "$A/key/info?key=$KEY" -H "Authorization: Bearer $MK" -H "Content-Type: application/json" | jq -r .info.spend'), team/info spend $(run 'curl -s "$A/team/info?team_id=$TEAM" -H "Authorization: Bearer $MK" -H "Content-Type: application/json" | jq -r .team_info.spend'), user/info spend $(run 'curl -s "$A/user/info?user_id=$U" -H "Authorization: Bearer $MK" -H "Content-Type: application/json" | jq -r .user_info.spend'), customer/info spend $(run 'curl -s "$A/customer/info?end_user_id=$C" -H "Authorization: Bearer $MK" -H "Content-Type: application/json" | jq -r .spend'), sum of response costs $CUM"
step 11 B "$KC"' "$B/v1/responses/$RID" '"$KH"
step 12 A "$KC"' "$A/v1/responses/$RID" '"$KH"
step 12b A "$KC"' "$A/v1/chat/completions" '"$KH"' -d '\''{"model":"gpt-6.1-terra","messages":[{"role":"user","content":"Say yes in one word."}]}'\'
step 13 A "$KC"' "$A/v1/responses" '"$KH"' -d '\''{"model":"gpt-6.1-terra","input":"Say done in one word.","max_output_tokens":64,"background":true}'\'
BID=$(jq -r .id "$BODY")
for i in 1 2 3 4 5 6 7 8; do
  step "13b.$i" B "$KC"' "$B/v1/responses/$BID" '"$KH"
  st=$(jq -r .status "$BODY")
  echo "    status $st"
  [ "$st" = completed ] && break
done
step 14 A "$KC"' "$A/v1/chat/completions" '"$KH"' -d '\''{"model":"gpt-6.1-terra","messages":[{"role":"user","content":"Say no in one word."}],"max_completion_tokens":-5}'\'
step 14b A "$KC"' "$A/v1/chat/completions" '"$KH"' -d '\''{"model":"gpt-6.1-terra","messages":[{"role":"user","content":"Say yes in one word."}]}'\'
echo "=== wait 70 s so every cached key entry expires"
sleep 70
echo "=== key/info spend $(run 'curl -s "$A/key/info?key=$KEY" -H "Authorization: Bearer $MK" -H "Content-Type: application/json" | jq -r .info.spend'), team/info spend $(run 'curl -s "$A/team/info?team_id=$TEAM" -H "Authorization: Bearer $MK" -H "Content-Type: application/json" | jq -r .team_info.spend'), organization/info spend $(run 'curl -s "$A/organization/info?organization_id=$ORG" -H "Authorization: Bearer $MK" -H "Content-Type: application/json" | jq -r .spend'), header sum $CUM"
step 15 B "$KC"' "$B/v1/responses/$RID" '"$KH"

Before (83e2e5b)

Both steps should leave key 0.999958 and customer 4.999958

=== step 1
$ curl -s -o "$BODY" -w "HTTP %{http_code}, x-litellm-response-cost %header{x-litellm-response-cost}, x-litellm-key-spend %header{x-litellm-key-spend}\n" "$A/v1/responses" -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "{\"model\":\"gpt-6.1-terra\",\"input\":\"Say hi in one word.\",\"max_output_tokens\":64,\"user\":\"$C\"}"
HTTP 200, x-litellm-response-cost 4.2000000000000004e-05, x-litellm-key-spend 4.2000000000000004e-05
$ curl -s "$A/metrics/" -H "Authorization: Bearer $MK" | grep -E "^litellm_remaining_(api_key|team|user|org|customer)_budget_metric\{" | grep -E "budget-gauge-$T|$ORG" | sed -E "s/hashed_api_key=\"[^\"]*\",?//; s/(^|[{,])team=\"[^\"]*\",?/\1/; s/org_id=\"[^\"]*\",?//; s/,\}/}/" | sort
litellm_remaining_api_key_budget_metric{api_key_alias="budget-gauge-bQma-key",pid="237815"} 0.999958
litellm_remaining_customer_budget_metric{end_user="budget-gauge-bQma-cust",pid="237815"} 4.999916
litellm_remaining_org_budget_metric{org_alias="budget-gauge-bQma-org",pid="237815"} 3.999958
litellm_remaining_team_budget_metric{pid="237815",team_alias="budget-gauge-bQma-team"} 1.999958
litellm_remaining_user_budget_metric{pid="237815",user="budget-gauge-bQma-user"} 2.999958
=== step 2
$ curl -s -o "$BODY" -w "HTTP %{http_code}, x-litellm-response-cost %header{x-litellm-response-cost}, x-litellm-key-spend %header{x-litellm-key-spend}\n" "$B/v1/responses/$RID" -H "Authorization: Bearer $KEY" -H "Content-Type: application/json"
HTTP 200, x-litellm-response-cost 0.0, x-litellm-key-spend 0.0
$ curl -s "$B/metrics/" -H "Authorization: Bearer $MK" | grep -E "^litellm_remaining_(api_key|team|user|org|customer)_budget_metric\{" | grep -E "budget-gauge-$T|$ORG" | sed -E "s/hashed_api_key=\"[^\"]*\",?//; s/(^|[{,])team=\"[^\"]*\",?/\1/; s/org_id=\"[^\"]*\",?//; s/,\}/}/" | sort
litellm_remaining_api_key_budget_metric{api_key_alias="budget-gauge-bQma-key",pid="237824"} 1.0
litellm_remaining_org_budget_metric{org_alias="budget-gauge-bQma-org",pid="237824"} 4.0
litellm_remaining_team_budget_metric{pid="237824",team_alias="budget-gauge-bQma-team"} 2.0
litellm_remaining_user_budget_metric{pid="237824",user="budget-gauge-bQma-user"} 3.0
Step 14, a 400 leaves the org gauge a charge behind
=== step 14
$ curl -s "$A/metrics/" -H "Authorization: Bearer $MK" | grep -E "^litellm_remaining_(api_key|team|user|org|customer)_budget_metric\{" | grep -E "budget-gauge-$T|$ORG" | sed -E "s/hashed_api_key=\"[^\"]*\",?//; s/(^|[{,])team=\"[^\"]*\",?/\1/; s/org_id=\"[^\"]*\",?//; s/,\}/}/" | sort
$ curl -s -o "$BODY" -w "HTTP %{http_code}, x-litellm-response-cost %header{x-litellm-response-cost}, x-litellm-key-spend %header{x-litellm-key-spend}\n" "$A/v1/chat/completions" -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d '{"model":"gpt-6.1-terra","messages":[{"role":"user","content":"Say no in one word."}],"max_completion_tokens":-5}'
HTTP 400, x-litellm-response-cost 0, x-litellm-key-spend 0.012978
    at 05:39:15, spend so far 0.013057 (customer 0.000121), so key 0.986943, team 1.986943, user 2.986943, org 3.986943, customer 4.999879
    body: {"error":{"message":"litellm.BadRequestError: OpenAIException - Invalid 'max_completion_tokens': integer below minimum value. Expected a value >= 1, but got -5 instead.\n\nLiteLLM: model group 'gpt-6.1-terra' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":"max_completion_tokens","code":"400"}}
$ curl -s "$A/metrics/" -H "Authorization: Bearer $MK" | grep -E "^litellm_remaining_(api_key|team|user|org|customer)_budget_metric\{" | grep -E "budget-gauge-$T|$ORG" | sed -E "s/hashed_api_key=\"[^\"]*\",?//; s/(^|[{,])team=\"[^\"]*\",?/\1/; s/org_id=\"[^\"]*\",?//; s/,\}/}/" | sort
litellm_remaining_api_key_budget_metric{api_key_alias="budget-gauge-bQma-key",pid="237814"} 0.986985
litellm_remaining_api_key_budget_metric{api_key_alias="budget-gauge-bQma-key",pid="237815"} 0.987022
litellm_remaining_customer_budget_metric{end_user="budget-gauge-bQma-cust",pid="237815"} 4.999916
litellm_remaining_org_budget_metric{org_alias="budget-gauge-bQma-org",pid="237814"} 3.986985
litellm_remaining_org_budget_metric{org_alias="budget-gauge-bQma-org",pid="237815"} 3.986985
litellm_remaining_team_budget_metric{pid="237814",team_alias="budget-gauge-bQma-team"} 1.986985
litellm_remaining_team_budget_metric{pid="237815",team_alias="budget-gauge-bQma-team"} 1.987022
litellm_remaining_user_budget_metric{pid="237814",user="budget-gauge-bQma-user"} 2.986985
litellm_remaining_user_budget_metric{pid="237815",user="budget-gauge-bQma-user"} 2.987022
    series this request changed: org pid 237815

After (4876a74)

Every gauge is right

=== step 1
$ curl -s -o "$BODY" -w "HTTP %{http_code}, x-litellm-response-cost %header{x-litellm-response-cost}, x-litellm-key-spend %header{x-litellm-key-spend}\n" "$A/v1/responses" -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d "{\"model\":\"gpt-6.1-terra\",\"input\":\"Say hi in one word.\",\"max_output_tokens\":64,\"user\":\"$C\"}"
HTTP 200, x-litellm-response-cost 4.2000000000000004e-05, x-litellm-key-spend 4.2000000000000004e-05
$ curl -s "$A/metrics/" -H "Authorization: Bearer $MK" | grep -E "^litellm_remaining_(api_key|team|user|org|customer)_budget_metric\{" | grep -E "budget-gauge-$T|$ORG" | sed -E "s/hashed_api_key=\"[^\"]*\",?//; s/(^|[{,])team=\"[^\"]*\",?/\1/; s/org_id=\"[^\"]*\",?//; s/,\}/}/" | sort
litellm_remaining_api_key_budget_metric{api_key_alias="budget-gauge-hQma-key",pid="419031"} 0.999958
litellm_remaining_customer_budget_metric{end_user="budget-gauge-hQma-cust",pid="419031"} 4.999958
litellm_remaining_org_budget_metric{org_alias="budget-gauge-hQma-org",pid="419031"} 3.999958
litellm_remaining_team_budget_metric{pid="419031",team_alias="budget-gauge-hQma-team"} 1.999958
litellm_remaining_user_budget_metric{pid="419031",user="budget-gauge-hQma-user"} 2.999958
=== step 2
$ curl -s -o "$BODY" -w "HTTP %{http_code}, x-litellm-response-cost %header{x-litellm-response-cost}, x-litellm-key-spend %header{x-litellm-key-spend}\n" "$B/v1/responses/$RID" -H "Authorization: Bearer $KEY" -H "Content-Type: application/json"
HTTP 200, x-litellm-response-cost 0.0, x-litellm-key-spend 0.0
$ curl -s "$B/metrics/" -H "Authorization: Bearer $MK" | grep -E "^litellm_remaining_(api_key|team|user|org|customer)_budget_metric\{" | grep -E "budget-gauge-$T|$ORG" | sed -E "s/hashed_api_key=\"[^\"]*\",?//; s/(^|[{,])team=\"[^\"]*\",?/\1/; s/org_id=\"[^\"]*\",?//; s/,\}/}/" | sort
litellm_remaining_api_key_budget_metric{api_key_alias="budget-gauge-hQma-key",pid="419039"} 0.999958
litellm_remaining_org_budget_metric{org_alias="budget-gauge-hQma-org",pid="419039"} 3.999958
litellm_remaining_team_budget_metric{pid="419039",team_alias="budget-gauge-hQma-team"} 1.999958
litellm_remaining_user_budget_metric{pid="419039",user="budget-gauge-hQma-user"} 2.999958
Step 14, the same failed request keeps the org gauge at the real remaining budget
=== step 14
$ curl -s "$A/metrics/" -H "Authorization: Bearer $MK" | grep -E "^litellm_remaining_(api_key|team|user|org|customer)_budget_metric\{" | grep -E "budget-gauge-$T|$ORG" | sed -E "s/hashed_api_key=\"[^\"]*\",?//; s/(^|[{,])team=\"[^\"]*\",?/\1/; s/org_id=\"[^\"]*\",?//; s/,\}/}/" | sort
$ curl -s -o "$BODY" -w "HTTP %{http_code}, x-litellm-response-cost %header{x-litellm-response-cost}, x-litellm-key-spend %header{x-litellm-key-spend}\n" "$A/v1/chat/completions" -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d '{"model":"gpt-6.1-terra","messages":[{"role":"user","content":"Say no in one word."}],"max_completion_tokens":-5}'
HTTP 400, x-litellm-response-cost 0, x-litellm-key-spend 0.012245
    at 05:39:09, spend so far 0.012287 (customer 0.000116), so key 0.987713, team 1.987713, user 2.987713, org 3.987713, customer 4.999884
    body: {"error":{"message":"litellm.BadRequestError: OpenAIException - Invalid 'max_completion_tokens': integer below minimum value. Expected a value >= 1, but got -5 instead.\n\nLiteLLM: model group 'gpt-6.1-terra' failed with the error above. No fallback was attempted.","type":"invalid_request_error","param":"max_completion_tokens","code":"400"}}
$ curl -s "$A/metrics/" -H "Authorization: Bearer $MK" | grep -E "^litellm_remaining_(api_key|team|user|org|customer)_budget_metric\{" | grep -E "budget-gauge-$T|$ORG" | sed -E "s/hashed_api_key=\"[^\"]*\",?//; s/(^|[{,])team=\"[^\"]*\",?/\1/; s/org_id=\"[^\"]*\",?//; s/,\}/}/" | sort
litellm_remaining_api_key_budget_metric{api_key_alias="budget-gauge-hQma-key",pid="419030"} 0.999842
litellm_remaining_api_key_budget_metric{api_key_alias="budget-gauge-hQma-key",pid="419031"} 0.987755
litellm_remaining_customer_budget_metric{end_user="budget-gauge-hQma-cust",pid="419031"} 4.999958
litellm_remaining_org_budget_metric{org_alias="budget-gauge-hQma-org",pid="419030"} 3.987713
litellm_remaining_org_budget_metric{org_alias="budget-gauge-hQma-org",pid="419031"} 3.987755
litellm_remaining_team_budget_metric{pid="419030",team_alias="budget-gauge-hQma-team"} 1.999842
litellm_remaining_team_budget_metric{pid="419031",team_alias="budget-gauge-hQma-team"} 1.987755
litellm_remaining_user_budget_metric{pid="419030",user="budget-gauge-hQma-user"} 2.999842
litellm_remaining_user_budget_metric{pid="419031",user="budget-gauge-hQma-user"} 2.987755
    series this request changed: org pid 419030
What surprised the run
  • Base customer gauge took two charges twice, fixed here
  • x-litellm-key-spend stays stale on free requests, untouched here
  • Idle workers keep older gauge values, untouched here
  • /team/update with spend 0 keeps team spend, untouched here

Type

🐛 Bug Fix

Caveats (if any)

Round 4 raised a High and five Mediums. 6046f1b fixed four with tests and live proof, and two stay Low. Later commits fix /live-pr-risk and bot findings, with tests

Low

14 low caveats
  • After overlapping charges, a worker's gauge can trail later charges until its next request (1369 to 1480 of 1480 at O.4, base key 37)
  • Without Redis a gauge misses other workers' charges, as on base. This run's head E5.2 stayed on one worker, so it did not show this
  • With the external spend collector, or a pod with no Prometheus logger during a rolling upgrade, charges do not move the counters
  • Routes skipping budget checks with no org snapshot do not charge the org counter
  • A warm charge makes 36 spend commands, up from 23, and a charge after 75 s idle makes 37, up from 28
  • Without committed spend, the customer gauge uses cached spend plus cost
  • prometheus_initialize_budget_metrics sets gauges from DB rows until the next request
  • After /global/spend/reset, the team gauge can read old spend until its cached team row expires. Base and head share the cause. This run hit it on base, and the previous run hit it on head (E1.8)
  • A billed background charge moves only warm counters, and can overstate spend by its cost if counters flush first
  • A failed counter drop after a spend edit can outlive its TTL under steady traffic
  • A DB spend write inside a cold charge's seed window can count that charge twice, as the enforcement counters do on main
  • Ids containing :window: get no committed counter, since the store reads them as window counters, so their gauges read as on base
  • Deletes drop committed counters best effort, so with Redis down an entity recreated with the same id can show the old spend until the counter's TTL runs out
  • Pass-through rows carry a new committed_budget_spend key in litellm_params that CustomLoggers can read. The key is additive, so no logger that worked on base breaks, and since ca45a1c whole-row dumps such as Athina's show it empty

Final Attestation

  • The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR
Bugbot summary

[!NOTE]
Medium Risk
Changes budget-metric correctness paths across auth, Redis post-call pipelines, and Prometheus; mistakes could skew enforcement-adjacent gauges or spend accounting, though failures are largely bounded with timeouts and fallbacks.

Overview
Fixes Prometheus remaining budget gauges showing stale spend (including $0 polls resetting gauges and customer double-counting) by introducing spend:committed:* twin counters that record only settled charges, not in-flight budget holds.

Auth reads and carries CommittedBudgetSpend at admission (when Prometheus is enabled); post-call increments update both enforcement and committed counters. PostCallSettlement exposes whether each request’s committed charge has landed in Redis, and RequestRedisBatches tracks settlements so gauge emission can avoid double-counting the current request’s cost. The Rust spend-counter store adds SpendCounter::Committed, longer committed TTL (refreshed on charge), and increment_many_post_call now returns settlement instead of a boolean.

PrometheusLogger merges stored metadata spend with live committed reads (with timeout fallback). Spend resets, entity deletes, and direct spend edits drop committed twins. Management flows (/global/spend/reset, key/user/org/team/customer delete) are wired accordingly.

Reviewed by Cursor Bugbot for commit 434d3b0. Bugbot is set up for automated code reviews on this repo. Configure here.

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@greptile-apps

greptile-apps Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The latest changes appear safe to merge, with no new blocking issue found.

Summary

Adds committed spend counters so Prometheus remaining-budget gauges count charges without counting budget holds. The latest change groups reset queries and counter builders by entity without changing their behavior.

No new actionable issues were found. Previous threads are unnumbered, so none require numbered classifications.

mateo-berri accepted temporary gauge lag during overlapping charges because enforcement is unaffected and the next update catches up. Greptile withdrew the collector finding after mateo-berri explained that its stale-spend limit already existed. Greptile also accepted the cold-seed double-count race as a narrow, documented caveat after mateo-berri explained the existing enforcement order.

  • Charges update separate counters that Prometheus uses for remaining-budget gauges.
  • Remaining-budget gauges use charged spend for budgeted keys, teams, users, organizations, and customers.
  • Spend changes and entity deletion clear the matching committed counters.

Reviews (9) · Last reviewed commit: "fix(proxy): key the global reset's commi..." · Reviewed by Greptile

…et gauges too

The remaining budget gauges for users, orgs and customers read the same cached rows as the key and
team gauges, so they read high for about a minute after a charge. Auth now carries the live counter
for each budgeted entity in one snapshot that only the gauges read, floored at the spend auth loaded.
The x-litellm-key-spend header and logging spend fields keep their current values.
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

Comment thread litellm/integrations/prometheus.py Resolved
Comment thread litellm/integrations/prometheus.py Resolved
Reads twin counters that take only charged cost, so a worst-case budget hold
never shows as spent and a request that finishes last cannot set a gauge back.
The twins exist only while the Prometheus logger is registered, and every path
that resets a spend counter drops them. Failed requests now set the org gauge
from the carried org row and committed spend, not the cached org row.
@mateo-berri mateo-berri changed the title fix(proxy): show live key and team spend in the remaining budget gauges fix(proxy): show committed spend in the remaining budget gauges Oct 30, 2026
…drop it on spend resets

Auth now reads committed spend through the admission MGET and names the counters a charge
may move, so the master key and unbudgeted entities get no twin. Organization spend edits
and the global spend reset drop their twins, and a long request no longer reads as charged.
… on the row

A billed background response is charged from its creator's stored attribution, after the request's auth is gone. Its charge moved the live counters but not the committed ones, so every gauge read one charge behind. It now moves the committed counters that already exist, and its own gauge adds its cost to them.
# Conflicts:
#	litellm/proxy/hooks/proxy_track_cost_callback.py
#	tests/unit/proxy/spend_tracking/test_spend_management_endpoints.py
@codspeed

codspeed Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

1 warning

⚠️ 1 benchmark is dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 43 untouched benchmarks


Comparing zoveki:litellm_budget_gauges_live_spend (434d3b0) with main (eae60c0)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (d10de27) during the generation of this report, so eae60c0 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

Comment thread litellm/integrations/prometheus.py Resolved
@codecov

codecov Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.39940% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
litellm/integrations/prometheus.py 97.36% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

Comment thread litellm/proxy/proxy_server.py Resolved
…ping charges and slow DB spend writes

Pass-through rows carry the auth object, so a cold committed counter gets seeded there too. The gauges read a
charge still waiting in the post-call pipeline as not counted, whatever other charges reached the counter. Committed
counters outlive two DB spend writes. Cold seeds read the DB once per worker, and the global spend reset reads keys
and teams in bounded pages.
@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread litellm/integrations/prometheus.py Resolved
@CLAassistant

CLAassistant commented Nov 5, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Port the committed spend counters onto main's Rust-backed SpendCounterStore as
spend:committed:<scope>:<id> keys, track each request's own committed charge
with a post-call settlement instead of a shared flush flag, and set the
committed TTL once on the store from the ledger backoff and write interval
A stream cut mid-response still charges for what it delivered, and that charge is usually still queued when the failure logs. The failure path passed a cost of 0, so the org gauge left that charge out until the worker's next request
@veria-ai

veria-ai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Reviews

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread litellm/integrations/prometheus.py Resolved
…user twins on every user delete

Pass-through rows now carry only the committed spend in litellm_params, so loggers that dump the row's metadata never get the auth object. Every user delete path, SCIM and bulk delete included, drops the deleted users' committed spend twins
…ass-through rows

CommittedBudgetSpend fields are repr=False, so Athina's payload, Sentry breadcrumbs and debug logs that str() a pass-through row's litellm_params show no spend values
@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

… refresh committed twin TTLs on cluster

The success-path committed read now gets half the per-request budget, so a slow Redis falls back to stored spend before the outer timeout cancels the gauges. Post-call charges refresh a committed twin's TTL on Redis Cluster too, so a twin never expires while its charges are still on their way to the DB. Also applies cargo fmt to the PR's Rust files
@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@mateo-berri

Copy link
Copy Markdown
Contributor

bugbot run

@mateo-berri

Copy link
Copy Markdown
Contributor

@greptileai

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 434d3b0. Configure here.

@mateo-berri mateo-berri left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mateo-berri
mateo-berri merged commit abe3b11 into BerriAI:main Nov 9, 2026
219 of 221 checks passed
mateo-berri added a commit that referenced this pull request Nov 10, 2026
Resolves the conflicts with #49199. Each spend counter write keeps the PR's caller TTL, and a committed twin
keeps main's committed TTL floor on top of it. The organization spend update and the global spend reset drop
the committed twins before the PR's Redis-down 500 is raised.
rogerrum pushed a commit to rogerrum/k8s-gitops that referenced this pull request Nov 26, 2026
…11.0 ) (#3856)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [ghcr.io/berriai/litellm](https://images.chainguard.dev/directory/image/wolfi-base/overview) ([source](https://github.com/BerriAI/litellm)) | minor | `1.110.3` → `1.111.0` |

---

> ⚠️ **Warning**
>
> Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/3566) for more information.

---

### Release Notes

<details>
<summary>BerriAI/litellm (ghcr.io/berriai/litellm)</summary>

### [`v1.111.0`](https://github.com/BerriAI/litellm/releases/tag/v1.111.0)

[Compare Source](https://github.com/BerriAI/litellm/compare/v1.110.4...v1.111.0)

#### Verify Docker Image Signature

```bash
cosign verify \
  --certificate-identity https://github.com/BerriAI/project-releaser/.github/workflows/release.yml@refs/heads/main \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  ghcr.io/berriai/litellm:v1.111.0
```

#### What's Changed

- test(integration): follow cached prepared statements in the held statement relay by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50651](https://github.com/BerriAI/litellm/pull/50651)
- feat(proxy): add OpenSearch index pass-through with per-key read/write grants by [@&#8203;quietjules](https://github.com/quietjules) in [#&#8203;50573](https://github.com/BerriAI/litellm/pull/50573)
- test(e2e): repin the Together reasoning replay backend to MiniMax-M3.1-Flash by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;50601](https://github.com/BerriAI/litellm/pull/50601)
- fix(proxy): build plugin session claims from FIPS provider services in fips_mode by [@&#8203;yucheng-berri](https://github.com/yucheng-berri) in [#&#8203;50544](https://github.com/BerriAI/litellm/pull/50544)
- feat(anthropic): add claude-fable-5-2 and its Claude Platform on AWS mirror by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50715](https://github.com/BerriAI/litellm/pull/50715)
- feat(cost-map): rolling registry update (Anthropic and Bedrock Fable 5.2, Azure realtime cache, Vertex, Friendli) by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50707](https://github.com/BerriAI/litellm/pull/50707)
- fix(proxy): show committed spend in the remaining budget gauges by [@&#8203;zoveki](https://github.com/zoveki) in [#&#8203;49199](https://github.com/BerriAI/litellm/pull/49199)
- feat(azure): add azure_ai/claude-fable-5-2 and claude-fable-5-2-fast from the Foundry Claude page by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50723](https://github.com/BerriAI/litellm/pull/50723)
- build(ui): fail lint on hardcoded English in dashboard JSX by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;50593](https://github.com/BerriAI/litellm/pull/50593)
- fix(prompt_templates): keep moved private helpers importable from common_utils by [@&#8203;zoveki](https://github.com/zoveki) in [#&#8203;50721](https://github.com/BerriAI/litellm/pull/50721)
- perf(router): look up host step answers by id instead of scanning every candidate by [@&#8203;narmstrong-berri](https://github.com/narmstrong-berri) in [#&#8203;50704](https://github.com/BerriAI/litellm/pull/50704)
- feat(cost-map): add Claude Fable 5.2 on Vertex AI and repoint claude-fable-latest by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;50713](https://github.com/BerriAI/litellm/pull/50713)
- test(integration): cover claude-fable-5-2 capability flags and prompt-cache pricing on the scripted Anthropic upstream by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;50722](https://github.com/BerriAI/litellm/pull/50722)
- fix(cost)!: bill transcriptions by the seconds the provider reports by [@&#8203;ryan-crabbe-berri](https://github.com/ryan-crabbe-berri) in [#&#8203;50727](https://github.com/BerriAI/litellm/pull/50727)
- fix(logging): bill a refused response the router falls back from by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;50735](https://github.com/BerriAI/litellm/pull/50735)
- fix(audio): measure duration for PathLike multipart tuple contents by [@&#8203;raunakpandey1](https://github.com/raunakpandey1) in [#&#8203;49806](https://github.com/BerriAI/litellm/pull/49806)
- feat(auth): grant access groups through principal attribute rules by [@&#8203;krrish-berri-2](https://github.com/krrish-berri-2) in [#&#8203;50455](https://github.com/BerriAI/litellm/pull/50455)
- fix(minimax): forward reasoning_effort instead of dropping it by [@&#8203;jeevan1098](https://github.com/jeevan1098) in [#&#8203;49583](https://github.com/BerriAI/litellm/pull/49583)
- fix(ollama_chat): give each streamed tool call its own index by [@&#8203;tedswinyar](https://github.com/tedswinyar) in [#&#8203;49183](https://github.com/BerriAI/litellm/pull/49183)
- fix(redis): accept a bare service account email for GCP Memorystore IAM by [@&#8203;yujonglee-berri](https://github.com/yujonglee-berri) in [#&#8203;50676](https://github.com/BerriAI/litellm/pull/50676)
- fix(rust): install the rustls crypto provider at the Python host boundary by [@&#8203;yujonglee-berri](https://github.com/yujonglee-berri) in [#&#8203;50502](https://github.com/BerriAI/litellm/pull/50502)
- feat(cost-map): add GovCloud regional rows for Bedrock Claude Fable 5.2 and Mythos 5.2 by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50746](https://github.com/BerriAI/litellm/pull/50746)
- fix(bedrock): answer 400, not 500, for malformed count-tokens requests by [@&#8203;paveln83](https://github.com/paveln83) in [#&#8203;50708](https://github.com/BerriAI/litellm/pull/50708)
- feat(router): let deployments declare a shared encrypted content boundary by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;50750](https://github.com/BerriAI/litellm/pull/50750)
- test(integration): cover claude-fable-5-2 capability flags and prompt-cache pricing on Vertex AI and Bedrock Converse by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;50742](https://github.com/BerriAI/litellm/pull/50742)
- fix(proxy): fail-closed budget enforcement returns 403 naming /team/member_add for a team user with no membership row by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;50603](https://github.com/BerriAI/litellm/pull/50603)
- fix(complexity_router): keep Claude Code subagent and side-request traffic off other agents' tier pins by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;50741](https://github.com/BerriAI/litellm/pull/50741)
- test(audio): bill reported transcription seconds for measurable uploads by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50767](https://github.com/BerriAI/litellm/pull/50767)
- chore(cost-map): add openai gpt-6-cyber long context prices from the pricing page by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50770](https://github.com/BerriAI/litellm/pull/50770)
- feat(proxy): let a key's logging entry reference a proxy credential by [@&#8203;jesus-berri](https://github.com/jesus-berri) in [#&#8203;50572](https://github.com/BerriAI/litellm/pull/50572)
- fix(messages): let proxy /v1/messages requests run on the rust path by [@&#8203;narmstrong-berri](https://github.com/narmstrong-berri) in [#&#8203;50335](https://github.com/BerriAI/litellm/pull/50335)
- fix(messages): log native messages success once, after the proxy releases it by [@&#8203;narmstrong-berri](https://github.com/narmstrong-berri) in [#&#8203;50420](https://github.com/BerriAI/litellm/pull/50420)
- fix(messages): log native messages request fields like python by [@&#8203;narmstrong-berri](https://github.com/narmstrong-berri) in [#&#8203;50421](https://github.com/BerriAI/litellm/pull/50421)
- fix(messages): pass non-message bodies through and refuse non-string headers as bad requests by [@&#8203;narmstrong-berri](https://github.com/narmstrong-berri) in [#&#8203;50422](https://github.com/BerriAI/litellm/pull/50422)
- fix(rust): run native async calls through python's async wrapper steps by [@&#8203;narmstrong-berri](https://github.com/narmstrong-berri) in [#&#8203;50423](https://github.com/BerriAI/litellm/pull/50423)
- fix(messages): raise native messages failures as python's errors by [@&#8203;narmstrong-berri](https://github.com/narmstrong-berri) in [#&#8203;50424](https://github.com/BerriAI/litellm/pull/50424)
- fix(messages): bill a native stream the client abandoned like python by [@&#8203;narmstrong-berri](https://github.com/narmstrong-berri) in [#&#8203;50425](https://github.com/BerriAI/litellm/pull/50425)
- fix(messages): write the native unary cache entry after the router stamps it like python by [@&#8203;narmstrong-berri](https://github.com/narmstrong-berri) in [#&#8203;50426](https://github.com/BerriAI/litellm/pull/50426)
- test(integration): assert response ids stay scoped to their minting key by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50703](https://github.com/BerriAI/litellm/pull/50703)
- chore(cost-map): add github_copilot/claude-fable-5.2 from the Copilot models-and-pricing table by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50775](https://github.com/BerriAI/litellm/pull/50775)
- test(integration): assert team model visibility follows caller scope by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50772](https://github.com/BerriAI/litellm/pull/50772)
- fix(cost-map): price wandb DeepSeek-V4.1-Flash-1017 from the CoreWeave Forge listing by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50776](https://github.com/BerriAI/litellm/pull/50776)
- fix(proxy): write SpendLogs failure rows for config-defined pass-through endpoints by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;41831](https://github.com/BerriAI/litellm/pull/41831)
- test(integration): repair tests that merged changes left stale by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;50782](https://github.com/BerriAI/litellm/pull/50782)
- fix(router): merge default metadata under the request's instead of replacing it by [@&#8203;paveln83](https://github.com/paveln83) in [#&#8203;50700](https://github.com/BerriAI/litellm/pull/50700)
- fix(anthropic-messages): apply additional_drop_params before the unsupported param checks by [@&#8203;tavren27](https://github.com/tavren27) in [#&#8203;50753](https://github.com/BerriAI/litellm/pull/50753)
- fix(router): honor request fallbacks in the mid-stream continuation check by [@&#8203;narmstrong-berri](https://github.com/narmstrong-berri) in [#&#8203;50260](https://github.com/BerriAI/litellm/pull/50260)
- fix(router): let a retry leave a pinned deployment after a retryable failure by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;50769](https://github.com/BerriAI/litellm/pull/50769)
- test(integration): drop the empty-string n case from the Gemini long decode test by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;50796](https://github.com/BerriAI/litellm/pull/50796)
- feat(rust): add litellm-s3 crate, AwsCredentialsProvider and cost map fetch by [@&#8203;yujonglee-berri](https://github.com/yujonglee-berri) in [#&#8203;50547](https://github.com/BerriAI/litellm/pull/50547)
- refactor(model-cost): move the cost map inputs, fetch and register_model overlay into Rust by [@&#8203;yujonglee-berri](https://github.com/yujonglee-berri) in [#&#8203;50501](https://github.com/BerriAI/litellm/pull/50501)
- fix(prometheus): record litellm_overhead_latency_metric for streams, stamp plus the proxy's first-chunk work by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;49920](https://github.com/BerriAI/litellm/pull/49920)
- fix(accounting): keep delivering spend when another worker's maintenance lock is orphaned by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;50774](https://github.com/BerriAI/litellm/pull/50774)
- fix(sso): read the SSO client secret before the refresh-token DB check by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;50773](https://github.com/BerriAI/litellm/pull/50773)
- test(integration): expect the 400 for a content-less leading system on Mantle count_tokens after [#&#8203;50708](https://github.com/BerriAI/litellm/issues/50708) by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50820](https://github.com/BerriAI/litellm/pull/50820)
- fix(proxy): serve Codex its own Bedrock catalog entries for Bedrock deployments by [@&#8203;ryan-crabbe-berri](https://github.com/ryan-crabbe-berri) in [#&#8203;50743](https://github.com/BerriAI/litellm/pull/50743)
- feat(usage): split customer spend by the key's current team by [@&#8203;kenneth-berri](https://github.com/kenneth-berri) in [#&#8203;50764](https://github.com/BerriAI/litellm/pull/50764)
- fix(proxy): list images in the Codex catalog only for models known to read them by [@&#8203;ryan-crabbe-berri](https://github.com/ryan-crabbe-berri) in [#&#8203;50738](https://github.com/BerriAI/litellm/pull/50738)
- fix(hosted_vllm): omit empty tools list from chat requests by [@&#8203;krrish-berri-2](https://github.com/krrish-berri-2) in [#&#8203;50812](https://github.com/BerriAI/litellm/pull/50812)
- feat(proxy): log keys and teams still on the deprecated empty models defaults at boot by [@&#8203;paveln83](https://github.com/paveln83) in [#&#8203;50720](https://github.com/BerriAI/litellm/pull/50720)
- fix(router): count a Responses WebSocket turn's tokens before the next turn is admitted by [@&#8203;norkelbyte](https://github.com/norkelbyte) in [#&#8203;50730](https://github.com/BerriAI/litellm/pull/50730)
- chore(cost-map): add the openai gpt-image-2 shutdown date from the deprecations page by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50829](https://github.com/BerriAI/litellm/pull/50829)
- chore(cost-map): add together_ai/elorian-labs/glimpse-1.0 from the Together models API by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50830](https://github.com/BerriAI/litellm/pull/50830)
- fix(proxy)!: return managed file ids from rag ingest and use team credentials on vector store file routes by [@&#8203;tavren27](https://github.com/tavren27) in [#&#8203;50459](https://github.com/BerriAI/litellm/pull/50459)
- test(decisions): ignore Ollama model-info calls in the decoy check by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;50827](https://github.com/BerriAI/litellm/pull/50827)
- fix(complexity_router): hold the default model for a user_turn ask whose classifier failed by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;50793](https://github.com/BerriAI/litellm/pull/50793)
- test: update the spend tests that still expected the pre-ledger accounting queues by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;50814](https://github.com/BerriAI/litellm/pull/50814)
- feat(budgets): add per-model tpm and rpm limit maps to budgets and customers by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;50797](https://github.com/BerriAI/litellm/pull/50797)
- fix(ui): keep the credential action menu open when the models page re-renders by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50845](https://github.com/BerriAI/litellm/pull/50845)
- fix(transcription): stop billing a FLAC with no sample count as 576 trillion seconds by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;50842](https://github.com/BerriAI/litellm/pull/50842)
- fix: make scheduled key, user, and team spend resets idempotent by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;50298](https://github.com/BerriAI/litellm/pull/50298)
- feat(cost-map): add meta/muse-ember-1.0 with long-context rates from the Meta pricing page by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;50847](https://github.com/BerriAI/litellm/pull/50847)
- test(accounting): assert spend is delivered under another leader's maintenance lock by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50843](https://github.com/BerriAI/litellm/pull/50843)
- fix(proxy): send the whole Codex model catalog to Codex 0.166.0-alpha.1 and newer by [@&#8203;ryan-crabbe-berri](https://github.com/ryan-crabbe-berri) in [#&#8203;50736](https://github.com/BerriAI/litellm/pull/50736)
- fix(proxy): let the OS assign Prisma engine ports by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50850](https://github.com/BerriAI/litellm/pull/50850)
- fix(ui): keep the request log model cell to one model by [@&#8203;Bytechoreographer](https://github.com/Bytechoreographer) in [#&#8203;49619](https://github.com/BerriAI/litellm/pull/49619)
- test(integration): empty the shared client cache before the tier pin batch test by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;50854](https://github.com/BerriAI/litellm/pull/50854)
- feat(cost-map): rolling registry update (claude-mythos-5-2, Azure Mythos 5.2, Friendli GLM-5.1 date, GovCloud Fable 5.2 token counting) by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50777](https://github.com/BerriAI/litellm/pull/50777)
- fix(proxy): bill an OpenAI pass-through background response once across repeated reads by [@&#8203;tavren27](https://github.com/tavren27) in [#&#8203;50841](https://github.com/BerriAI/litellm/pull/50841)
- feat(cost-map): add gemini/gemini-4-carbon from the Gemini API pricing page by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50931](https://github.com/BerriAI/litellm/pull/50931)
- fix(redis): free each request's Redis batch scope once the request ends by [@&#8203;emerzon](https://github.com/emerzon) in [#&#8203;50751](https://github.com/BerriAI/litellm/pull/50751)
- fix(openai): download PDF URLs off the event loop and transform async chat messages once by [@&#8203;norkelbyte](https://github.com/norkelbyte) in [#&#8203;49176](https://github.com/BerriAI/litellm/pull/49176)
- feat(cost-map): add vertex_ai/gemini-4-carbon and gemini-4-carbon-cyber-permissive from the Vertex pricing page by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50942](https://github.com/BerriAI/litellm/pull/50942)
- refactor: clean up fresh tech debt in stream cost flag, masked httpx error and encrypted reasoning helpers by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;50617](https://github.com/BerriAI/litellm/pull/50617)
- fix(proxy): open the Logs drawer by request_id without scanning for litellm_call_id by [@&#8203;tavren27](https://github.com/tavren27) in [#&#8203;50789](https://github.com/BerriAI/litellm/pull/50789)
- fix(cost-map): give the Gemini 4 Carbon rows the shared Gemini 3 search free tier by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;50951](https://github.com/BerriAI/litellm/pull/50951)
- perf(streaming): reuse the upstream choice for plain litellm HTTP-handler stream chunks by [@&#8203;quietjules](https://github.com/quietjules) in [#&#8203;50786](https://github.com/BerriAI/litellm/pull/50786)
- fix(responses): replay Claude tool search on follow-up turns by [@&#8203;zoveki](https://github.com/zoveki) in [#&#8203;50821](https://github.com/BerriAI/litellm/pull/50821)
- feat(rate-limit): enforce per-customer per-model tpm and rpm limits in the v3 limiter by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;50857](https://github.com/BerriAI/litellm/pull/50857)
- test(cost): sync vertex 3.1 pro price fields and bedrock converse usage shapes by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50956](https://github.com/BerriAI/litellm/pull/50956)
- fix(decisions): keep box questions on a deployment when a same-model sibling turns them off by [@&#8203;tavren27](https://github.com/tavren27) in [#&#8203;50724](https://github.com/BerriAI/litellm/pull/50724)
- feat: add claude mythos 5.2 to vertex ai cost map by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;50940](https://github.com/BerriAI/litellm/pull/50940)
- fix(router): hold the registry lock across router-core writes and mirror reads by [@&#8203;narmstrong-berri](https://github.com/narmstrong-berri) in [#&#8203;50933](https://github.com/BerriAI/litellm/pull/50933)
- test(budgets): expect per-model tpm and rpm limits in budget info by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50967](https://github.com/BerriAI/litellm/pull/50967)
- feat(ui): customer portal (beta) surfacing the existing customer endpoints and customer usage by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;50807](https://github.com/BerriAI/litellm/pull/50807)
- feat(customers): reject unknown fields on /customer/new and /customer/update instead of dropping them by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;50965](https://github.com/BerriAI/litellm/pull/50965)
- fix(proxy): send a prompt-only call_endpoint token count to every provider count API by [@&#8203;paveln83](https://github.com/paveln83) in [#&#8203;50783](https://github.com/BerriAI/litellm/pull/50783)
- test(integration): cap the OAuth metadata lookup in the mixed capabilities subscription case by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;50867](https://github.com/BerriAI/litellm/pull/50867)
- fix(mcp): accept comma-separated vendor scope grants on the connect check by [@&#8203;shrey-berri](https://github.com/shrey-berri) in [#&#8203;50717](https://github.com/BerriAI/litellm/pull/50717)
- fix(cost-map): give the Gemini 4 Argon rows the shared Gemini 3 search free tier by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;50959](https://github.com/BerriAI/litellm/pull/50959)
- test(http2): drain client traffic after sending GOAWAY by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50972](https://github.com/BerriAI/litellm/pull/50972)
- fix(responses): keep unset-effort gpt-5.4/5.5 tool calls on chat completions by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50968](https://github.com/BerriAI/litellm/pull/50968)
- fix(cost-map): mark the azure_ai Claude rows that bill web search as supporting it by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;50960](https://github.com/BerriAI/litellm/pull/50960)
- test(integration): recognize the model list's lock in the held write helper by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;50974](https://github.com/BerriAI/litellm/pull/50974)
- test(anthropic): scope structured output captures to inference routes by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50983](https://github.com/BerriAI/litellm/pull/50983)
- feat(proxy): let teams use their own allowed S3 buckets for batch files by [@&#8203;mrinal-berri](https://github.com/mrinal-berri) in [#&#8203;50571](https://github.com/BerriAI/litellm/pull/50571)
- fix(router): let an explicit routing tag outrank the encrypted content pin by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;50975](https://github.com/BerriAI/litellm/pull/50975)
- feat(cost): bill batch cached image input tokens for OpenAI image models by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;50997](https://github.com/BerriAI/litellm/pull/50997)
- fix: audit registry metadata for Together, Mistral, Fireworks, Azure AI and Copilot by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51003](https://github.com/BerriAI/litellm/pull/51003)
- fix(cost-map): sync together_ai together/Tev1-4B-experimental input price with /v1/models by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51013](https://github.com/BerriAI/litellm/pull/51013)
- chore(cost-map): add github_copilot/gemini-4-carbon from the Copilot changelog launch post by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51012](https://github.com/BerriAI/litellm/pull/51012)
- fix(proxy)!: reject client-supplied Vertex location and project unless the admin opts in by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;47028](https://github.com/BerriAI/litellm/pull/47028)
- fix(router): sync responses() applies the Router's num_retries and fallbacks by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;51011](https://github.com/BerriAI/litellm/pull/51011)
- feat(spend): report guardrail spend separately in daily activity by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;51010](https://github.com/BerriAI/litellm/pull/51010)
- fix(tool_choice): accept the Responses API's flat allowed_tools layout on chat completions by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;50467](https://github.com/BerriAI/litellm/pull/50467)
- test(integration): keep owned test peers off ephemeral ports by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51019](https://github.com/BerriAI/litellm/pull/51019)
- fix(bedrock): forward x-pass- headers on the /bedrock/model pass-through routes by [@&#8203;norkelbyte](https://github.com/norkelbyte) in [#&#8203;50728](https://github.com/BerriAI/litellm/pull/50728)
- fix(proxy): send the streamed Responses fallback metadata as a typed Responses event by [@&#8203;paveln83](https://github.com/paveln83) in [#&#8203;50804](https://github.com/BerriAI/litellm/pull/50804)
- fix(proxy): recheck missing users when resolving session grants by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51030](https://github.com/BerriAI/litellm/pull/51030)
- feat(cli): connect a per-user GitHub Copilot credential from the command line by [@&#8203;ryan-crabbe-berri](https://github.com/ryan-crabbe-berri) in [#&#8203;50863](https://github.com/BerriAI/litellm/pull/50863)
- fix(responses): keep the namespace == name shape for deferred top-level tools by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;50602](https://github.com/BerriAI/litellm/pull/50602)
- chore(cost-map): add fal_ai image and video rows priced from the fal.ai model pages (first fal-ai sync) by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51035](https://github.com/BerriAI/litellm/pull/51035)
- fix(vertex_ai): bill gemini image edits by token usage by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51038](https://github.com/BerriAI/litellm/pull/51038)
- feat(search): add Microsoft Web IQ provider by [@&#8203;giladk1221](https://github.com/giladk1221) in [#&#8203;50883](https://github.com/BerriAI/litellm/pull/50883)
- fix(otel): serialize pydantic Message objects in langfuse_otel, weave_otel and langtrace by [@&#8203;taxfree-python](https://github.com/taxfree-python) in [#&#8203;46845](https://github.com/BerriAI/litellm/pull/46845)
- perf(spend): narrow user and team spend log reads to the owner's api_keys so the (api_key, startTime) index is used by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;51026](https://github.com/BerriAI/litellm/pull/51026)
- fix(mcp): challenge a single-server listing whose credential the upstream rejected by [@&#8203;shrey-berri](https://github.com/shrey-berri) in [#&#8203;50389](https://github.com/BerriAI/litellm/pull/50389)
- fix(ci): install tzdata so zoneinfo tests pass on runners without legacy tz aliases by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;51057](https://github.com/BerriAI/litellm/pull/51057)
- fix(guardrails/rubrik): moderate text-completion prompts and forward rac_agent_id by [@&#8203;seph-barker](https://github.com/seph-barker) in [#&#8203;49912](https://github.com/BerriAI/litellm/pull/49912)
- fix(model-prices): use current Hy4 promotional rates by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;51072](https://github.com/BerriAI/litellm/pull/51072)
- fix(proxy): allow management_routes keys to call PATCH /model/{model_id}/update by [@&#8203;nurlanmnn](https://github.com/nurlanmnn) in [#&#8203;50979](https://github.com/BerriAI/litellm/pull/50979)
- fix(proxy): drop the beta label from the /v1/messages swagger tags by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;51046](https://github.com/BerriAI/litellm/pull/51046)
- fix(router): re-check and reserve per-model rate limits on fallback targets by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;50994](https://github.com/BerriAI/litellm/pull/50994)
- chore(cost-map): add 61 fal_ai image and video rows priced from the fal.ai model pages (second fal-ai sync) by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51077](https://github.com/BerriAI/litellm/pull/51077)
- feat(auto_router): report a session's whole spend and name why savings stay unestimated by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;51066](https://github.com/BerriAI/litellm/pull/51066)
- chore(pricing): sync replicate model prices from replicate.com model pages by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51067](https://github.com/BerriAI/litellm/pull/51067)
- chore(databricks): add claude-fable-5-2, date glm-5-2 retirement and fix llama-3-1-8b context from the supported-models page by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51076](https://github.com/BerriAI/litellm/pull/51076)
- refactor(rust_bridge): route every Rust-to-Python call through host modules by [@&#8203;yujonglee-berri](https://github.com/yujonglee-berri) in [#&#8203;50822](https://github.com/BerriAI/litellm/pull/50822)
- fix(spend): write a background response's settling read in-process when the spend collector is on by [@&#8203;tavren27](https://github.com/tavren27) in [#&#8203;50957](https://github.com/BerriAI/litellm/pull/50957)
- fix(proxy): judge the zero-cost budget waiver by the model a key or team alias serves by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;51058](https://github.com/BerriAI/litellm/pull/51058)
- feat(docker)!: one shipped image, one entrypoint beside the Dockerfile, one compose file by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;43332](https://github.com/BerriAI/litellm/pull/43332)
- feat(anthropic): forward message threads on native /v1/messages by [@&#8203;paveln83](https://github.com/paveln83) in [#&#8203;50976](https://github.com/BerriAI/litellm/pull/50976)
- fix(router): send managed batch uploads to batch deployments when a chat deployment has a lower order by [@&#8203;mika-lt](https://github.com/mika-lt) in [#&#8203;50971](https://github.com/BerriAI/litellm/pull/50971)
- fix(rate-limit): settle a fallback's tokens on the model group that served it by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;51082](https://github.com/BerriAI/litellm/pull/51082)
- fix(proxy): keep the upgrade notice off the request path and count area-labelled release notes by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;51027](https://github.com/BerriAI/litellm/pull/51027)
- fix(vertex_ai): bill gemini image text, thinking and priority tokens at their own rates by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51017](https://github.com/BerriAI/litellm/pull/51017)
- test(spend): expect token billing for Vertex image edits with usage by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51109](https://github.com/BerriAI/litellm/pull/51109)
- fix(reasoning): log the GPT-5 reasoning_effort drop warning only when the provider gets no effort by [@&#8203;paveln83](https://github.com/paveln83) in [#&#8203;50995](https://github.com/BerriAI/litellm/pull/50995)
- test(mcp): read the comma grant through real credential storage by [@&#8203;shrey-berri](https://github.com/shrey-berri) in [#&#8203;51065](https://github.com/BerriAI/litellm/pull/51065)
- fix(proxy): keep a request's cache opt-in when its key has cache metadata by [@&#8203;quietjules](https://github.com/quietjules) in [#&#8203;50999](https://github.com/BerriAI/litellm/pull/50999)
- feat(replicate): add google/gemini-4-carbon from the Replicate model page by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51125](https://github.com/BerriAI/litellm/pull/51125)
- fix(mcp)!: forward the LiteLLM key when the admin configures it by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;50604](https://github.com/BerriAI/litellm/pull/50604)
- feat(azure): add azure_ai/mistral-large-4-latest from the Azure Models API, priced from Mistral's model page by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51047](https://github.com/BerriAI/litellm/pull/51047)
- ci(image-scan): build Rust with a fast ci cargo profile instead of fat-LTO release by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;51075](https://github.com/BerriAI/litellm/pull/51075)
- test(unit): deflake db metrics spans and drain timeout tests, split proxy-infra shard by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;51078](https://github.com/BerriAI/litellm/pull/51078)
- chore(cost-map): add 3 fal_ai rows priced from the fal pricing API and model page (third fal-ai sync) by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51126](https://github.com/BerriAI/litellm/pull/51126)
- fix(bedrock): govcloud eol dates from the lifecycle table, gpt-5.6 cyber govcloud mantle row and daybreak blue input limit by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51095](https://github.com/BerriAI/litellm/pull/51095)
- feat(helm): single chart with monolith mode and shared image, remove litellm-helm by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;43330](https://github.com/BerriAI/litellm/pull/43330)
- feat(terraform): run every AWS and GCP workload from the one litellm image by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;43358](https://github.com/BerriAI/litellm/pull/43358)
- fix(spend): keep empty-key rows in owner-scoped spend log reads by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;51127](https://github.com/BerriAI/litellm/pull/51127)
- fix(proxy): list callable ids for partial aliases over a catch-all deployment by [@&#8203;quietjules](https://github.com/quietjules) in [#&#8203;50963](https://github.com/BerriAI/litellm/pull/50963)
- test(providers): preserve unspecified Gemini image output modality by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51149](https://github.com/BerriAI/litellm/pull/51149)
- test(spend): expect token billing for Vertex image edits by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51148](https://github.com/BerriAI/litellm/pull/51148)
- fix(gemini): batch and flex tier fields the -latest alias rows were missing by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51150](https://github.com/BerriAI/litellm/pull/51150)
- fix(spend): keep free response reads and cancels off the creation spend row by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51110](https://github.com/BerriAI/litellm/pull/51110)
- fix(proxy): add tzdata to the proxy extra so a legacy TZ doesn't stop startup by [@&#8203;satwik-bankapur](https://github.com/satwik-bankapur) in [#&#8203;49914](https://github.com/BerriAI/litellm/pull/49914)
- fix(tls)!: exclude RSA key exchange and ChaCha20 from the outbound cipher list in FIPS mode by [@&#8203;yucheng-berri](https://github.com/yucheng-berri) in [#&#8203;50671](https://github.com/BerriAI/litellm/pull/50671)
- fix(vertex): drop floor-only retirement dates, veo 3.1 successor and gemini token limits from the Vertex model pages by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51180](https://github.com/BerriAI/litellm/pull/51180)
- docs(security): updated mailinglist and vdp in security.md by [@&#8203;ojensen-berri](https://github.com/ojensen-berri) in [#&#8203;51199](https://github.com/BerriAI/litellm/pull/51199)
- chore(cost-map): rolling registry PR, fal_ai rows, databricks gemini-4-carbon, deepinfra and bedrock tier prices by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51193](https://github.com/BerriAI/litellm/pull/51193)
- fix(router): preserve held tiers for OpenCode subagent results by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;51176](https://github.com/BerriAI/litellm/pull/51176)
- refactor: clean up fresh tech debt in rubrik, passthrough headers and plugin mode comments by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;51163](https://github.com/BerriAI/litellm/pull/51163)
- test(security): expect the async release check on offline mode by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51213](https://github.com/BerriAI/litellm/pull/51213)
- fix(management): keep classifier deployments serving during reloads by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51111](https://github.com/BerriAI/litellm/pull/51111)
- chore(cost-map): add 24 runwayml models and correct seedance2 and eleven_multilingual_v2 rates by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51216](https://github.com/BerriAI/litellm/pull/51216)
- fix(azure): use supported API versions for Responses requests by [@&#8203;kenneth-berri](https://github.com/kenneth-berri) in [#&#8203;51116](https://github.com/BerriAI/litellm/pull/51116)
- feat(proxy): count a rate-limit fallback in x-litellm-attempted-fallbacks and name it in x-litellm-fallback-reason by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;51138](https://github.com/BerriAI/litellm/pull/51138)
- refactor(proxy): let the gunicorn server take a private listener by [@&#8203;yujonglee-berri](https://github.com/yujonglee-berri) in [#&#8203;50871](https://github.com/BerriAI/litellm/pull/50871)
- feat(proxy): supervise the opt-in Rust forwarding server by [@&#8203;yujonglee-berri](https://github.com/yujonglee-berri) in [#&#8203;49606](https://github.com/BerriAI/litellm/pull/49606)
- fix(streaming): report zero cost for explicitly free calls by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51093](https://github.com/BerriAI/litellm/pull/51093)
- feat(gemini): file-backed batch jobs on /v1/batches with output download and spend tracking by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;51032](https://github.com/BerriAI/litellm/pull/51032)
- fix(router): map Gemini stream-opening errors by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;51218](https://github.com/BerriAI/litellm/pull/51218)
- fix(auth): enforce model access on Google and image URL routes by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;51226](https://github.com/BerriAI/litellm/pull/51226)
- test(integration): fix the baseline accounting and series cap flakes by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;51096](https://github.com/BerriAI/litellm/pull/51096)
- fix(proxy): let /team/delete transactions wait for a pooled connection by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;51099](https://github.com/BerriAI/litellm/pull/51099)
- fix(completion)!: answer 400 for a chat message without a role by [@&#8203;zoveki](https://github.com/zoveki) in [#&#8203;51124](https://github.com/BerriAI/litellm/pull/51124)
- fix(proxy): stream the guardrail block response when the block comes after an SSE keepalive ping by [@&#8203;paveln83](https://github.com/paveln83) in [#&#8203;51114](https://github.com/BerriAI/litellm/pull/51114)
- feat(otel): let a team or key OTel v2 destination add its own request metadata keys by [@&#8203;mrinal-berri](https://github.com/mrinal-berri) in [#&#8203;50813](https://github.com/BerriAI/litellm/pull/50813)
- refactor(typing): clear 1141 basedpyright Any errors across 182 files by [@&#8203;quietjules](https://github.com/quietjules) in [#&#8203;50711](https://github.com/BerriAI/litellm/pull/50711)
- fix(proxy): reset a deleted customer's admission spend counter so a re-created one is not refused by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;51224](https://github.com/BerriAI/litellm/pull/51224)
- fix(proxy): answer x-litellm-call-id on every token count response by [@&#8203;tavren27](https://github.com/tavren27) in [#&#8203;51037](https://github.com/BerriAI/litellm/pull/51037)
- feat(rate-limit): name the limit that rejected a request in a rate_limited_by header on the 429 by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;51228](https://github.com/BerriAI/litellm/pull/51228)
- refactor(ui): remove the deprecated Learning Resources sidebar link by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;51251](https://github.com/BerriAI/litellm/pull/51251)
- feat(helm): add scheme and tlsConfig to the gateway ServiceMonitor by [@&#8203;mrinal-berri](https://github.com/mrinal-berri) in [#&#8203;50759](https://github.com/BerriAI/litellm/pull/50759)
- fix(proxy): name the deployment in stream error alerts on chat, completions, responses and messages by [@&#8203;quietjules](https://github.com/quietjules) in [#&#8203;51034](https://github.com/BerriAI/litellm/pull/51034)
- refactor(ui): remove the deprecated API Reference page by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;51246](https://github.com/BerriAI/litellm/pull/51246)
- test(e2e): remove the secret manager suite by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;51241](https://github.com/BerriAI/litellm/pull/51241)
- fix(bedrock): forward the compact-2026-09-04 compaction param on Invoke /v1/messages by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;51223](https://github.com/BerriAI/litellm/pull/51223)
- fix(fallback): preserve concurrent writes and serve saved configuration by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;51245](https://github.com/BerriAI/litellm/pull/51245)
- chore: remove dead files from the repo root by [@&#8203;yassin-berriai](https://github.com/yassin-berriai) in [#&#8203;50936](https://github.com/BerriAI/litellm/pull/50936)
- chore: remove cookbook and preserve live assets by [@&#8203;yassin-berriai](https://github.com/yassin-berriai) in [#&#8203;50944](https://github.com/BerriAI/litellm/pull/50944)
- ci: remove CircleCI by [@&#8203;yassin-berriai](https://github.com/yassin-berriai) in [#&#8203;50950](https://github.com/BerriAI/litellm/pull/50950)
- security(proxy): stop request body fields from conflicting with admin-set deployment fields by [@&#8203;shrey-berri](https://github.com/shrey-berri) in [#&#8203;51254](https://github.com/BerriAI/litellm/pull/51254)
- test(proxy): make the cancelled supervisor test deterministic by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;51258](https://github.com/BerriAI/litellm/pull/51258)
- fix(responses): keep reasoning item IDs consistent across streaming events by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;51243](https://github.com/BerriAI/litellm/pull/51243)
- feat(guardrails): write guardrail changes to the audit log by [@&#8203;mrinal-berri](https://github.com/mrinal-berri) in [#&#8203;51118](https://github.com/BerriAI/litellm/pull/51118)
- fix(llms-types): let the compact-2026-09-04 beta through on bedrock to match the headers config by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;51272](https://github.com/BerriAI/litellm/pull/51272)
- feat(messages): serve anthropic messages on rust only by [@&#8203;narmstrong-berri](https://github.com/narmstrong-berri) in [#&#8203;51119](https://github.com/BerriAI/litellm/pull/51119)
- fix(health): log Test Connection spend with the mode's call type and model id by [@&#8203;kenneth-berri](https://github.com/kenneth-berri) in [#&#8203;50987](https://github.com/BerriAI/litellm/pull/50987)
- feat(bedrock): search knowledge bases by image and return image hits by [@&#8203;zoveki](https://github.com/zoveki) in [#&#8203;51063](https://github.com/BerriAI/litellm/pull/51063)
- fix(fips): hash MCP advisory-lock keys with SHA-256 in fips_mode and compute the OCI body digest as a security hash by [@&#8203;yucheng-berri](https://github.com/yucheng-berri) in [#&#8203;51165](https://github.com/BerriAI/litellm/pull/51165)
- test(proxy): await background spend counters before asserting by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;51249](https://github.com/BerriAI/litellm/pull/51249)
- chore(databricks): price claude-fable-5-2 from the proprietary pricing page by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51232](https://github.com/BerriAI/litellm/pull/51232)
- feat(azure_ai): support gpt-image edits on Azure AI Foundry by [@&#8203;Bytechoreographer](https://github.com/Bytechoreographer) in [#&#8203;49650](https://github.com/BerriAI/litellm/pull/49650)
- fix(proxy): keep a cost settings update from being undone by an in-flight config reload by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51273](https://github.com/BerriAI/litellm/pull/51273)
- chore(cost-map): source the fireworks deepseek v4 flash deprecation and name its replacement by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51285](https://github.com/BerriAI/litellm/pull/51285)
- test(guardrails): expect the content_filter finish on a blocked chat stream by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51281](https://github.com/BerriAI/litellm/pull/51281)
- fix(llms-types): drop the duplicate compact-2026-09-04 arm that fails rust-lint on main by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;51280](https://github.com/BerriAI/litellm/pull/51280)
- perf(router): list a group's deployments once per registry change on the acompletion path by [@&#8203;narmstrong-berri](https://github.com/narmstrong-berri) in [#&#8203;50749](https://github.com/BerriAI/litellm/pull/50749)
- feat(guardrails): add the CollieAi guardrail integration by [@&#8203;collieai-dev](https://github.com/collieai-dev) in [#&#8203;49224](https://github.com/BerriAI/litellm/pull/49224)
- fix(anthropic_messages): bound the detached pump so it cannot outlive its stream by [@&#8203;nuernber](https://github.com/nuernber) in [#&#8203;51268](https://github.com/BerriAI/litellm/pull/51268)
- fix(auth): allow video retrieval after budget exhaustion by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;51227](https://github.com/BerriAI/litellm/pull/51227)
- fix(proxy): bill anthropic pass-through calls at the deployment's custom price by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;51267](https://github.com/BerriAI/litellm/pull/51267)
- ci(unit): split proxy-infra-root in two, isolate the child-python tests, make its file exclusions take effect by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;51316](https://github.com/BerriAI/litellm/pull/51316)
- fix(gemini): attribute /gemini batchGenerateContent batches to the calling key by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;51279](https://github.com/BerriAI/litellm/pull/51279)
- ci(unit): deselect test_unit_test_proxy_hooks from the q-z shard it matches, pin the dead proxy-infra-root codecov flag by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;51324](https://github.com/BerriAI/litellm/pull/51324)
- test(integration): remove the openapi docs gate detached worktree test that cannot run offline by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;51300](https://github.com/BerriAI/litellm/pull/51300)
- feat(gemini): add gemini-decision-1, the Decisions API model priced at $0.10 per 1M input tokens by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51215](https://github.com/BerriAI/litellm/pull/51215)
- feat(proxy): run spend log cleanup from a DB-backed scheduled job table by [@&#8203;jesus-berri](https://github.com/jesus-berri) in [#&#8203;50131](https://github.com/BerriAI/litellm/pull/50131)
- feat(ui): add Activity tabs to resource details by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;50630](https://github.com/BerriAI/litellm/pull/50630)
- feat(alerts): add persisted alerts and status APIs by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;50658](https://github.com/BerriAI/litellm/pull/50658)
- feat(alerts): detect daily changes in recorded usage by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;50666](https://github.com/BerriAI/litellm/pull/50666)
- feat(ui): show performance alerts in the Alerts page by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;51104](https://github.com/BerriAI/litellm/pull/51104)
- feat(alerts): enable monitoring by default with a five-alert free allowance by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;51123](https://github.com/BerriAI/litellm/pull/51123)
- feat(skills): add admin-only version restore by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;51309](https://github.com/BerriAI/litellm/pull/51309)
- chore: move config and docs off the repo root by [@&#8203;yassin-berriai](https://github.com/yassin-berriai) in [#&#8203;50966](https://github.com/BerriAI/litellm/pull/50966)
- feat(gemini): support gemini-decision-1 on /v1/decisions and /v1/systemone by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;51220](https://github.com/BerriAI/litellm/pull/51220)
- fix(proxy): reject unknown guardrail names on key, user, team and project writes by [@&#8203;mrinal-berri](https://github.com/mrinal-berri) in [#&#8203;51080](https://github.com/BerriAI/litellm/pull/51080)
- fix(cost-map): drop the duplicate gemini/gemini-decision-1 entry that fails the root unit job on main by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;51341](https://github.com/BerriAI/litellm/pull/51341)
- test(providers): expect Rust routing for quiet Messages streams by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51346](https://github.com/BerriAI/litellm/pull/51346)
- test(observability): include CollieAi in guardrail scope settings by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51345](https://github.com/BerriAI/litellm/pull/51345)
- ci(integration): install the Rust gateway and fail forwarded_proxy when Rust is not in front by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;51307](https://github.com/BerriAI/litellm/pull/51307)
- chore: move deployment sources under litellm/deploy by [@&#8203;yassin-berriai](https://github.com/yassin-berriai) in [#&#8203;50981](https://github.com/BerriAI/litellm/pull/50981)
- chore: move ui and vscode-extension under litellm and delete docs by [@&#8203;yassin-berriai](https://github.com/yassin-berriai) in [#&#8203;50992](https://github.com/BerriAI/litellm/pull/50992)
- chore: move workspace packages under litellm by [@&#8203;yassin-berriai](https://github.com/yassin-berriai) in [#&#8203;51000](https://github.com/BerriAI/litellm/pull/51000)
- chore: move scripts and runtime sources under litellm by [@&#8203;yassin-berriai](https://github.com/yassin-berriai) in [#&#8203;51006](https://github.com/BerriAI/litellm/pull/51006)
- ci: fail when the repo root grows past 15 entries by [@&#8203;yassin-berriai](https://github.com/yassin-berriai) in [#&#8203;51007](https://github.com/BerriAI/litellm/pull/51007)
- fix(alerts): stop detecting traffic drops by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;51338](https://github.com/BerriAI/litellm/pull/51338)
- feat(rate-limit): team_model_limit_borrows_idle_capacity_from_other_teams lets a team's model TPM and RPM limits borrow idle capacity in the dynamic rate limiter by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;51328](https://github.com/BerriAI/litellm/pull/51328)
- fix(fal_ai): give MiniMax H3 Max video endpoints their own resolution profile by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;51348](https://github.com/BerriAI/litellm/pull/51348)
- fix(anthropic): close strict JSON schemas on the Messages to Responses bridge by [@&#8203;kenneth-berri](https://github.com/kenneth-berri) in [#&#8203;51337](https://github.com/BerriAI/litellm/pull/51337)
- test(providers): expect Rust routing for idle Messages streams by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51364](https://github.com/BerriAI/litellm/pull/51364)
- feat(rate-limit): team_model_limit_max_borrow_multiple caps how far a team borrows idle model capacity by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;51359](https://github.com/BerriAI/litellm/pull/51359)
- fix(gemini): add batch and priority image output token prices to gemini/gemini-2.5-flash-image by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51368](https://github.com/BerriAI/litellm/pull/51368)
- ci: stop PR runs from thrashing the Actions cache and stop smoke compiling from source by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;51343](https://github.com/BerriAI/litellm/pull/51343)
- feat(dynamic_rate_limiter_v3): steer flexible teams to a permitted alternate when their preferred model is saturated by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;51350](https://github.com/BerriAI/litellm/pull/51350)
- feat(dynamic_rate_limiter_v3): priority_class_share_splits_equally_among_active_teams splits a priority class share among the teams active on a model by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;51366](https://github.com/BerriAI/litellm/pull/51366)
- fix(rate-limit): hold router fallbacks, nested calls, WebSocket turns and oversized prompts to a borrowing team's model share by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;51367](https://github.com/BerriAI/litellm/pull/51367)
- feat(model-catalog): read output_cost_per_billable_unit in the rust registry check by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;51365](https://github.com/BerriAI/litellm/pull/51365)
- chore(cost-map): rolling registry audit 2026-11-12, xAI retired image rates, Kling 4, GMI rows and -latest aliases by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51395](https://github.com/BerriAI/litellm/pull/51395)
- feat(skills): let authors edit and withdraw pending submissions by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;51312](https://github.com/BerriAI/litellm/pull/51312)
- chore(cost-map): add 7 fal_ai rows for seedream 5.5, flux virtual try-on, patina material and vidu templates (fifth fal-ai sync) by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51407](https://github.com/BerriAI/litellm/pull/51407)
- feat(replicate): add video generation, image generation and text to speech through the predictions API by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;51360](https://github.com/BerriAI/litellm/pull/51360)
- feat(mcp): cache upstream tool lists with an admin-set lifetime by [@&#8203;shrey-berri](https://github.com/shrey-berri) in [#&#8203;51160](https://github.com/BerriAI/litellm/pull/51160)
- fix(auth): enforce customer budget rpm/tpm limits under JWT auth by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;51405](https://github.com/BerriAI/litellm/pull/51405)
- feat(fal_ai): add Nano Banana 2.1, bill it from fal billable units, fix google/ routing by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51410](https://github.com/BerriAI/litellm/pull/51410)
- fix(messages): name the deployment on a rust stream's transport error by [@&#8203;narmstrong-berri](https://github.com/narmstrong-berri) in [#&#8203;51358](https://github.com/BerriAI/litellm/pull/51358)
- fix(token-counter): count Anthropic server tool history by [@&#8203;kenneth-berri](https://github.com/kenneth-berri) in [#&#8203;51334](https://github.com/BerriAI/litellm/pull/51334)
- feat(ui): add daily model usage to customer pages by [@&#8203;ishaan-j-berri](https://github.com/ishaan-j-berri) in [#&#8203;51419](https://github.com/BerriAI/litellm/pull/51419)
- feat(proxy): publish opted-in pass-through endpoints on the Model Hub by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;43905](https://github.com/BerriAI/litellm/pull/43905)
- feat(gemini): add gemini/gemini-4-hydrogen from the Gemini API pricing page by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51423](https://github.com/BerriAI/litellm/pull/51423)
- refactor(ui): remove standalone Model Leaderboard by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;51426](https://github.com/BerriAI/litellm/pull/51426)
- feat(alerts): add management controls and opt-in daily summaries by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;51418](https://github.com/BerriAI/litellm/pull/51418)
- fix(skills): honor dashboard user and team grants by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;51416](https://github.com/BerriAI/litellm/pull/51416)
- fix(proxy): fetch blog posts without blocking the event loop by [@&#8203;yassin-berriai](https://github.com/yassin-berriai) in [#&#8203;51369](https://github.com/BerriAI/litellm/pull/51369)
- feat(vertex_ai): add vertex_ai/gemini-4-hydrogen from the Vertex pricing page by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51432](https://github.com/BerriAI/litellm/pull/51432)
- test(providers): expect rust for anthropic messages after rust-only cutover by [@&#8203;narmstrong-berri](https://github.com/narmstrong-berri) in [#&#8203;51351](https://github.com/BerriAI/litellm/pull/51351)
- fix(spend-logs): mask token-shaped secrets in stored request and resp… by [@&#8203;krrish-berri-2](https://github.com/krrish-berri-2) in [#&#8203;48968](https://github.com/BerriAI/litellm/pull/48968)
- fix(otel): report the provider model in experimental GenAI traces by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;51430](https://github.com/BerriAI/litellm/pull/51430)
- fix(azure): strip GPT-5 routing marker from Responses deployments by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;51438](https://github.com/BerriAI/litellm/pull/51438)
- fix(messages): keep signed empty thinking blocks on rust by [@&#8203;narmstrong-berri](https://github.com/narmstrong-berri) in [#&#8203;51349](https://github.com/BerriAI/litellm/pull/51349)
- fix(messages): hand rust only the anthropic metadata user_id by [@&#8203;narmstrong-berri](https://github.com/narmstrong-berri) in [#&#8203;51355](https://github.com/BerriAI/litellm/pull/51355)
- fix(anthropic_messages): preserve first-round web search spend logs by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;51441](https://github.com/BerriAI/litellm/pull/51441)
- fix(token-counting): count mid-conversation tool changes by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;51447](https://github.com/BerriAI/litellm/pull/51447)
- test(integration): point database tests at the moved litellm/proxy-extras package by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51453](https://github.com/BerriAI/litellm/pull/51453)
- fix(otel): distinguish missing usage from prompt estimates on chat failures by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;51443](https://github.com/BerriAI/litellm/pull/51443)
- fix(model_prices): add Azure DeepSeek V4.1 Flash 1017 and two Perplexity Agent API rows by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51444](https://github.com/BerriAI/litellm/pull/51444)
- test(messages): expect rust to drop a null thinking signature on retry by [@&#8203;narmstrong-berri](https://github.com/narmstrong-berri) in [#&#8203;51461](https://github.com/BerriAI/litellm/pull/51461)
- fix(proxy): refuse blocked and over-limit keys before reading the request body by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;51428](https://github.com/BerriAI/litellm/pull/51428)
- fix(ui): serve navigation payloads under the ui prefix by [@&#8203;mrinal-berri](https://github.com/mrinal-berri) in [#&#8203;50758](https://github.com/BerriAI/litellm/pull/50758)
- feat(model-catalog): read output_cost_per_video in the rust registry check by [@&#8203;kenneth-berri](https://github.com/kenneth-berri) in [#&#8203;51433](https://github.com/BerriAI/litellm/pull/51433)
- feat(access-groups): grant vector stores through access groups by [@&#8203;shrey-berri](https://github.com/shrey-berri) in [#&#8203;50290](https://github.com/BerriAI/litellm/pull/50290)
- fix(openai): point gpt-image-1-mini, gpt-image-1.5 and chatgpt-image-latest at gpt-image-2.6-sunburst as successor by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;51475](https://github.com/BerriAI/litellm/pull/51475)
- fix(ui): remove the Chargebacks page from Customer Portal by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;51474](https://github.com/BerriAI/litellm/pull/51474)
- feat(proxy): customer org, team and member hierarchy with budget templates by [@&#8203;ishaan-j-berri](https://github.com/ishaan-j-berri) in [#&#8203;51459](https://github.com/BerriAI/litellm/pull/51459)
- feat(fal_ai): bill flat per-video fal.ai models with output_cost_per_video by [@&#8203;kenneth-berri](https://github.com/kenneth-berri) in [#&#8203;51225](https://github.com/BerriAI/litellm/pull/51225)
- feat(cost-map): load LITELLM_MODEL_COST_MAP_URL from gs\:// with Google application default credentials by [@&#8203;jesus-berri](https://github.com/jesus-berri) in [#&#8203;51108](https://github.com/BerriAI/litellm/pull/51108)
- feat(dynamic_rate_limiter_v3): prometheus share, borrowed and throttle metrics per team and model by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;51417](https://github.com/BerriAI/litellm/pull/51417)
- fix(dynamic_rate_limiter_v3): a borrower gets its full share back once the model saturates by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;51415](https://github.com/BerriAI/litellm/pull/51415)
- fix(fal_ai): bill Luma Ray v3.2 videos at fal's 540p default resolution by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;51477](https://github.com/BerriAI/litellm/pull/51477)
- feat(ui): set per-threshold budget alert recipients on virtual keys by [@&#8203;jesus-berri](https://github.com/jesus-berri) in [#&#8203;51061](https://github.com/BerriAI/litellm/pull/51061)
- fix(embeddings): unwrap extra_body for providers with their own embedding handlers by [@&#8203;kenneth-berri](https://github.com/kenneth-berri) in [#&#8203;51335](https://github.com/BerriAI/litellm/pull/51335)
- fix(bedrock): send max_tokens and priority in Cohere embedding requests by [@&#8203;kenneth-berri](https://github.com/kenneth-berri) in [#&#8203;51435](https://github.com/BerriAI/litellm/pull/51435)
- chore: bump litellm-enterprise 0.1.83 -> 0.1.84, litellm-proxy-extras 0.4.114 -> 0.4.115, litellm 1.110.0 -> 1.111.0 by [@&#8203;yucheng-berri](https://github.com/yucheng-berri) in [#&#8203;51486](https://github.com/BerriAI/litellm/pull/51486)
- chore(cost-map): point the fireworks deepseek v4 flash successor at deepseek-v4p1-flash by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;51478](https://github.com/BerriAI/litellm/pull/51478)
- fix(cost): preserve Bedrock cross-region pricing for Messages by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;51479](https:/…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants