Skip to content

fix(vector-stores): keep proxy context out of provider vector store metadata - #47021

Merged
yuneng-berri merged 12 commits into
mainfrom
litellm_vector-store-metadata-fix
Oct 17, 2026
Merged

yuneng-berri merged 12 commits into
mainfrom
litellm_vector-store-metadata-fix

Conversation

@yuneng-berri

@yuneng-berri yuneng-berri commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

  • Vector stores created through the proxy fill all 16 OpenAI metadata slots
  • Every later metadata update on those stores fails with HTTP 400
  • The proxy also overwrites caller keys like endpoint with its own values

How it solves it:

  • Proxy vector store create and update send the provider exactly the caller's metadata
  • The proxy keeps its own context in metadata as before, so logs, tags and limits are untouched
  • Router-only SDK calls drop the deployment keys the Router adds, direct SDK calls are unchanged
  • New opt-in script removes LiteLLM's keys from stores created before this

User Flow

Before: a developer using a team key cannot add metadata to a vector store they created through the proxy

  1. They send POST https://litellm-domain/v1/vector_stores with {"name":"x","model":"gpt-5","metadata":{"team":"llmproxy"}}
  2. The store comes back with 13 to 16 metadata keys they never sent (key hash, team id, endpoint, deployment, trace id)
  3. They send POST https://litellm-domain/v1/vector_stores/vs_... with a few more metadata keys
  4. They get HTTP 400 Metadata can have at most 16 properties

After: the store holds only what the developer sent, so updates succeed

  1. They send POST https://litellm-domain/v1/vector_stores with {"name":"x","model":"gpt-5","metadata":{"team":"llmproxy"}}
  2. The store comes back with "metadata": {"team": "llmproxy"}
  3. They send POST https://litellm-domain/v1/vector_stores/vs_... with a few more metadata keys
  4. They get HTTP 200 and can keep adding keys up to OpenAI's 16
  5. For stores created before upgrading, an admin runs python db_scripts/strip_vector_store_internal_metadata.py, then reruns it with --apply

Linear ticket

Resolves LIT-9371

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

Local proxy with its own Postgres, real OpenAI. The team key belongs to a team with a 30d budget and carries key metadata {"tags":["admin-tag"],"spend_logs_metadata":{"cost_center":"admin"}}. $AGENT_VS is an agent created with "rpm_limit": 1. Each side boots on a fresh database, and "stored at OpenAI" is the store read straight from https://api.openai.com/v1/vector_stores/$VS

model_list:
  - model_name: gpt-5
    litellm_params:
      model: openai/gpt-5
      api_key: os.environ/OPENAI_API_KEY
general_settings:
  master_key: os.environ/LITELLM_MASTER_KEY

Every proxy request below sends -H "Authorization: Bearer $TEAM_KEY" -H "Content-Type: application/json", and $HDRS is -H "x-litellm-trace-id: trace-from-header" -H "x-litellm-session-id: session-from-header"

Before (aa32e4c)

Create with caller metadata

  1. curl -s -X POST localhost:4511/v1/vector_stores $HDRS -d '{"name":"p1","model":"gpt-5","metadata":{"team":"llmproxy"}}'
    stored at OpenAI: {"n":15,"metadata":{"team":"llmproxy","trace_id":"trace-from-header","session_id":"trace-from-header","user_api_key_hash":"0321...","user_api_key_team_id":"a36f...","user_api_key_team_alias":"proof-team","user_api_key_request_route":"/v1/vector_stores","user_api_key":"0321...","litellm_api_version":"1.107.0","user_api_key_team_budget_reset_at":"2026-11-01T00:00:00Z","endpoint":"http://localhost:4511/v1/vector_stores","requester_ip_address":"127.0.0.1","user_agent":"curl/8.7.1","deployment":"openai/gpt-5","deployment_model_name":"gpt-5"}}
    

Create with no metadata and no model

  1. curl -s -X POST localhost:4511/v1/vector_stores $HDRS -d '{"name":"p2"}'
    stored at OpenAI: {"n":12,"metadata":{"trace_id":"trace-from-header","session_id":"trace-from-header","user_api_key_hash":"0321...", ...9 more proxy keys...}}
    

Explicit null metadata with a tag header

  1. curl -s -X POST localhost:4511/v1/vector_stores -H "x-litellm-tags: header-tag" -d '{"name":"p2b","model":"gpt-5","metadata":null}'
    stored at OpenAI: {"n":12,"metadata":{"user_api_key_hash":"0321...", ...11 more proxy keys...}}
    

Form-encoded create

  1. curl -s -X POST localhost:4511/v1/vector_stores -H "Authorization: Bearer $TEAM_KEY" -F name=p2c -F model=gpt-5 -F 'metadata={"team":"llmproxy"}'
    stored at OpenAI: {"n":13,"metadata":{"team":"llmproxy","user_api_key_hash":"…", ...11 more proxy keys...}}
    

Caller keys that share LiteLLM key names

  1. curl -s -X POST localhost:4511/v1/vector_stores -d '{"name":"p3","model":"gpt-5","metadata":{"trace_id":"my-run-42","endpoint":"ingest","user_api_key_label":"mine"}}'
    stored at OpenAI: {"n":13,"metadata":{"trace_id":"my-run-42","endpoint":"http://localhost:4511/v1/vector_stores", ...11 proxy keys...}}
    
    endpoint was overwritten by the proxy and user_api_key_label never reached OpenAI

Fill the 16 slots

  1. Create with {"a":"1","b":"2","c":"3"} and $HDRS, then curl -s -X POST localhost:4511/v1/vector_stores/$VS $HDRS -d '{"model":"gpt-5","metadata":{"k01":"v", ... ,"k13":"v"}}'
    after create: {"n":16}
    update: HTTP 400 Metadata can have at most 16 properties, but your update resulted in an object with 29 properties (up from 16 properties before).
    

Spend log and agent limit

  1. Spend row for the first create
    avector_store_create | team_ok=true | tags=["admin-tag", "User-Agent: curl", "User-Agent: curl/8.7.1"] | spend_logs_metadata={"cost_center": "admin"}
    
  2. for i in 1 2; do curl -s -o /dev/null -w "HTTP %{http_code}\n" "localhost:4511/v1/vector_stores?limit=1" -H "Authorization: Bearer $TEAM_KEY" -H "x-litellm-agent-id: $AGENT_VS"; done
    HTTP 200
    HTTP 429
    

After (a16f1f1)

Create with caller metadata

  1. curl -s -X POST localhost:4512/v1/vector_stores $HDRS -d '{"name":"p1","model":"gpt-5","metadata":{"team":"llmproxy"}}'
    stored at OpenAI: {"n":1,"metadata":{"team":"llmproxy"}}
    

Create with no metadata and no model

  1. curl -s -X POST localhost:4512/v1/vector_stores $HDRS -d '{"name":"p2"}'
    stored at OpenAI: {"n":0,"metadata":{}}
    

Explicit null metadata with a tag header

  1. curl -s -X POST localhost:4512/v1/vector_stores -H "x-litellm-tags: header-tag" -d '{"name":"p2b","model":"gpt-5","metadata":null}'
    stored at OpenAI: {"n":0,"metadata":{}}
    

Form-encoded create

  1. curl -s -X POST localhost:4512/v1/vector_stores -H "Authorization: Bearer $TEAM_KEY" -F name=p2c -F model=gpt-5 -F 'metadata={"team":"llmproxy"}'
    stored at OpenAI: {"n":1,"metadata":{"team":"llmproxy"}}
    

Caller keys that share LiteLLM key names

  1. curl -s -X POST localhost:4512/v1/vector_stores -d '{"name":"p3","model":"gpt-5","metadata":{"trace_id":"my-run-42","endpoint":"ingest","user_api_key_label":"mine"}}'
    stored at OpenAI: {"n":3,"metadata":{"trace_id":"my-run-42","endpoint":"ingest","user_api_key_label":"mine"}}
    

Fill the 16 slots

  1. Create with {"a":"1","b":"2","c":"3"} and $HDRS, then curl -s -X POST localhost:4512/v1/vector_stores/$VS $HDRS -d '{"model":"gpt-5","metadata":{"k01":"v", ... ,"k13":"v"}}'
    after create: {"n":3}
    update: HTTP 200 {"n":16,"keys":["a","b","c","k01","k02","k03","k04","k05","k06","k07","k08","k09","k10","k11","k12","k13"]}
    

Spend log and agent limit

  1. Spend row for the first create
    avector_store_create | team_ok=true | tags=["admin-tag", "User-Agent: curl", "User-Agent: curl/8.7.1"] | spend_logs_metadata={"cost_center": "admin"}
    
  2. Same agent loop as Before
    HTTP 200
    HTTP 429
    

SDK without the proxy

  1. litellm.vector_stores.create(name="sdk-probe", metadata={"team":"llmproxy","endpoint":"ingest","trace_id":"my-run-42"})
    {'team': 'llmproxy', 'endpoint': 'ingest', 'trace_id': 'my-run-42'}
    
  2. litellm.Router(model_list=[gpt-5]).vector_store_create(model="gpt-5", name="router-probe", metadata={"team":"llmproxy"})
    {'team': 'llmproxy'}
    

Lifecycle of a store created before the fix

One run, both proxies up at once, every count read straight from OpenAI. :4511 is the merge base aa32e4c and :4512 is a16f1f1. $S1 was created through :4511 with {"team":"llmproxy"} plus $HDRS, $S2 through :4511 with {"team":"search","owner":"alice"}, and $S3 straight at OpenAI with {"team":"direct"} as a control the script should leave alone. The script always runs with --vector-store-id $S1 --vector-store-id $S2 --vector-store-id $S3

  1. Stores right after creation
    S1 {"n":15} 12 proxy keys + team, trace_id, session_id
    S2 {"n":14} 12 proxy keys + team, owner
    S3 {"n":1,"keys":["team"]}
    
  2. The fixed proxy cannot add to $S1 yet, curl -s -X POST localhost:4512/v1/vector_stores/$S1 -d '{"model":"gpt-5","metadata":{"env":"prod","owner":"search"}}'
    HTTP 400 Metadata can have at most 16 properties, but your update resulted in an object with 17 properties (up from 15 properties before)
    
  3. python db_scripts/strip_vector_store_internal_metadata.py, a dry run that leaves OpenAI untouched
    $S1: would delete 12 keys: deployment, deployment_model_name, endpoint, litellm_api_version, requester_ip_address, user_agent, user_api_key, user_api_key_hash, user_api_key_request_route, user_api_key_team_alias, user_api_key_team_budget_reset_at, user_api_key_team_id
    $S2: would delete 12 keys: deployment, ... (same 12)
    scanned=3 matched=2 updated=0 failed=0 (dry run, pass --apply to delete)
    S1 {"n":15}  S2 {"n":14}  S3 {"n":1}
    
  4. ... --apply
    $S1: deleted 12 keys: deployment, ...
    $S2: deleted 12 keys: deployment, ...
    scanned=3 matched=2 updated=2 failed=0 (applied)
    S1 {"n":3,"keys":["session_id","team","trace_id"]}
    S2 {"n":2,"keys":["owner","team"]}
    S3 {"n":1,"keys":["team"]}
    
  5. ... --apply --extra-key trace_id --extra-key session_id, then a plain dry run again
    $S1: deleted 2 keys: session_id, trace_id
    scanned=3 matched=1 updated=1 failed=0 (applied)
    S1 {"n":1,"keys":["team"]}
    scanned=3 matched=0 updated=0 failed=0 (dry run, pass --apply to delete)
    
  6. Fill $S1 through the fixed proxy with k01 to k15 and $HDRS plus a tag header, then read it from OpenAI
    HTTP 200 {"n":16,"keys":["k01", ... ,"k15","team"]}
    OpenAI   {"n":16,"keys":["k01", ... ,"k15","team"]}
    
    A 17th key gets OpenAI's own 400, so the store now holds exactly the caller's 16
  7. Add {"env":"prod"} to $S2 through the fixed proxy without a model
    HTTP 200, OpenAI {"team":"search","owner":"alice","env":"prod"}
    
  8. Another dry run after all that traffic through the fixed proxy
    scanned=3 matched=0 updated=0 failed=0 (dry run, pass --apply to delete)
    
  9. For contrast, one update of the cleaned $S2 through the unfixed proxy, -d '{"model":"gpt-5","metadata":{"x":"1"}}'
    HTTP 200, OpenAI {"n":14} 10 proxy keys back + team, owner, env, x
    

These stores were deleted through the fixed proxy at the end and each returned 404 from OpenAI afterwards. Every store from the sections above was deleted too

Tests

A new test sends create and update through the real proxy app with real auth, with and without a model, and with dict, empty, JSON-string, null and missing metadata plus tag, trace and session headers. Only OpenAI's HTTP layer is mocked. It checks the provider body equals the caller's metadata and that the logged request body has no internal key. A second test covers form-encoded bodies and JSON nested too deep to reparse, for create and update. Mutants that skip the snapshot on create or update, read the parsed body instead of the raw one, skip JSON-string decoding, skip the fallback copy or drop the log exclusion are all killed, as are the earlier filter, Router, SDK and script mutants

Type

🐛 Bug Fix

Caveats (if any)

Medium

  • Stores created before this stay full until an admin runs the script
    • The script leaves trace_id and session_id by default since callers may own them, --extra-key removes them

Low

  • Form bodies and JSON nested over ~200 levels use the parsed body, so a tag header's tags can ride along
    • OpenAI drops it since it is not a string, Vertex RAG would store it as a label
  • Metadata sent as a JSON string nested 200+ levels deep now gets a 400, base accepted it
  • Router-only SDK calls still drop caller keys named like LiteLLM's own keys (deployment, endpoint)
  • Deleting a key with {"metadata":{"k":null}} through the proxy returns 200 but keeps the key, on base too, because the OpenAI transform drops non-string values
  • The script is OpenAI only, Azure stores need a manual cleanup
  • tests/unit/db_scripts added to the proxy-extras unit shard, otherwise no shard runs it

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

…etadata

The proxy merged its request context (user_api_key_* fields, endpoint,
user_agent, requester_ip_address, litellm_api_version) and the router's
deployment info into the vector store request's metadata. For vector
stores that field is also OpenAI's own metadata, which is capped at 16
keys, so a store created with a team key was full on creation and every
later metadata update returned 400.

Vector store routes now keep that context in litellm_metadata, like
batches, files and responses, and the router does the same for
avector_store_create. Provider-side metadata holds only what the caller
sent.

Adds db_scripts/strip_vector_store_internal_metadata.py, an opt-in
script that removes the proxy-written keys from stores created before
this change. It is a dry run unless --apply is passed.
…n and tolerate non-string values

Listing every store recursed once per page, which overflows the interpreter stack on large projects. Pages are now walked iteratively. Metadata values are no longer required to be strings, and a malformed response exits 2 with a fixed message instead of a traceback that could echo metadata values.
@yuneng-berri
yuneng-berri requested a review from a team October 17, 2026 00:43
@greptile-apps

greptile-apps Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Automatic reviews are disabled for this repository.

@codecov

codecov Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@codspeed

codspeed Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

⚠️ 1 benchmark spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

✅ 32 untouched benchmarks


Comparing litellm_vector-store-metadata-fix (a16f1f1) with main (1436a88)1

Open in CodSpeed

Footnotes

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

Comment thread litellm/proxy/litellm_pre_call_utils.py Resolved
@veria-ai

veria-ai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

PR overview

All previously flagged issues have been addressed. No open security concerns remain on this pull request.

Security review

No open security issues remain on this pull request.

Fixed/addressed: 4 · PR risk: 0/10

@yuneng-berri
yuneng-berri marked this pull request as draft October 17, 2026 00:56
@yuneng-berri
yuneng-berri marked this pull request as ready for review October 17, 2026 01:27
@yuneng-berri

Copy link
Copy Markdown
Contributor Author

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.

@yuneng-berri
yuneng-berri enabled auto-merge (squash) October 17, 2026 01:34
@yuneng-berri

Copy link
Copy Markdown
Contributor Author

@litereview gauntlet

@yuneng-berri

Copy link
Copy Markdown
Contributor Author

bugbot run

@yuneng-berri
yuneng-berri disabled auto-merge October 17, 2026 01:43
@yuneng-berri

Copy link
Copy Markdown
Contributor Author

@litellm-stampbot

@litellm-stampbot

litellm-stampbot Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

litellm-stampbot: risk low

Approved at a6bfbdc.

Rules (stampbot/risk_rules.yml):

  • low: no rule flagged it

Judge (gpt-6-luna): low, probability of high 0.02 (high at or above 0.75)

  • risk: low (probability of high 0.02)

Pushes do not re-run this check. Comment @litellm-stampbot again to re-check the new head.

@litellm-stampbot litellm-stampbot Bot added the risk:low Small, isolated, low-risk change label Oct 17, 2026

@kerry-berri kerry-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.

Low risk by rule and by judgement at a6bfbdc

@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.

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Live QA at a6bfbdc vs merge base aa32e4c

The metadata fix works end to end against real OpenAI, and the cleanup script behaves as documented. One regression is reproduced live on the tip. Vector store search now takes metadata.user_api_key from the caller and writes it into the spend row, which is the Veria finding in this thread

Setup is two proxies with 2 workers each, base on :4001 and tip on :4002, each from its own worktree (worker cwd checked) and its own fresh Postgres. gpt-5 is openai/gpt-5 for vector stores and gpt-chat is openai/gpt-4.1-mini. $TEAM_KEY is a team key inside an org with a member user, and $VICTIM_HASH is the token hash of a second key on the same proxy

Create, rename, then add one key

$ curl -s localhost:$PORT/v1/vector_stores/$VS?model=gpt-5 -H "Authorization: Bearer $TEAM_KEY" | jq -c '{n: (.metadata|length)}'
base  {"n":16}   # deployment, endpoint, user_agent, user_api_key, user_api_key_hash, team/org/user ids and email ...
tip   {"n":0}

$ curl -s -X POST localhost:$PORT/v1/vector_stores/$VS -H "Authorization: Bearer $TEAM_KEY" -H "Content-Type: application/json" -d '{"name":"after-update","model":"gpt-5"}' | jq -c '{name, n: (.metadata|length)}'
base  {"name":"after-update","n":16}
tip   {"name":"after-update","n":0}

$ curl -s -X POST localhost:$PORT/v1/vector_stores/$VS -H "Authorization: Bearer $TEAM_KEY" -H "Content-Type: application/json" -d '{"metadata":{"team":"llmproxy"},"model":"gpt-5"}'
base  HTTP 400 ... Metadata can have at most 16 properties, but your update resulted in an object with 17 properties (up from 16 properties before)
tip   HTTP 200 {"id":"vs_...","object":"vector_store","name":"after-update",...,"metadata":{"team":"llmproxy"}}

$ curl -s https://api.openai.com/v1/vector_stores/$VS -H "Authorization: Bearer $OPENAI_API_KEY" | jq -c '{n: (.metadata|length), keys: (.metadata|keys)}'
base  {"n":16,"keys":["deployment","deployment_model_name","endpoint",...,"user_api_key_user_id"]}
tip   {"n":1,"keys":["team"]}

Grow a store created with 3 caller keys to OpenAI's 16

$ curl -s -X POST localhost:$PORT/v1/vector_stores/$VS2 -H "Authorization: Bearer $TEAM_KEY" -H "Content-Type: application/json" -d '{"model":"gpt-5","metadata":{"k01":"v",...,"k13":"v"}}'
base  HTTP 400 ... your update resulted in an object with 29 properties (up from 16 properties before)
tip   HTTP 200

$ curl -s https://api.openai.com/v1/vector_stores/$VS2 -H "Authorization: Bearer $OPENAI_API_KEY" | jq -c '{n: (.metadata|length), keys: (.metadata|keys)}'
base  {"n":16,"keys":["a","b","c","endpoint","litellm_api_version",...,"user_api_key_user_id"]}
tip   {"n":16,"keys":["a","b","c","k01","k02","k03","k04","k05","k06","k07","k08","k09","k10","k11","k12","k13"]}

A caller sending user_api_key_team_id: "forged" on create gets the forged value dropped on both sides (base stores the real team id in provider metadata, tip stores only the caller's x). A master key create with no model also went from 8 proxy keys on base to {} on tip

Router SDK

Router(model_list=[gpt-5 -> openai/gpt-5]), then avector_store_create(model="gpt-5", name="router-sdk-probe", metadata={"app": "sdk"}), avector_store_search(..., query="hello"), and a direct OpenAI GET of the store

base  litellm imported from qa47021/base   metadata keys ['app', 'deployment', 'deployment_model_name']   search vector_store.search_results.page
tip   litellm imported from qa47021/tip    metadata keys ['app']                                          search vector_store.search_results.page

Neighbouring routes, same results on both sides

GET  /v1/vector_stores?model=gpt-5                 200
GET  /v1/vector_stores/$VS?model=gpt-5             200
GET  /v1/vector_stores/$VS/files?model=gpt-5       200
POST /v1/vector_stores/$VS/files  {"file_id":"$FID","model":"gpt-5","attributes":{"src":"qa"}}
     {"object":"vector_store.file","status":"in_progress","attributes":{"src":"qa"}} 200
POST /v1/vector_stores/$VS/search {"query":"llamas","model":"gpt-5"}
     {"object":"vector_store.search_results.page","hits":1,"first":"LiteLLM vector store QA probe document about llamas."}
POST /v1/chat/completions  gpt-chat               200
POST /v1/responses         gpt-chat               200

$FID was uploaded straight to OpenAI. Uploading it through the proxy /v1/files returned no file id on both sides in this setup, so that leg is not a PR difference

Cleanup script on a store the base code created

$VS4 is the base side's forged-team-id store (15 proxy keys plus the caller's x)

$ python db_scripts/strip_vector_store_internal_metadata.py --vector-store-id $VS4
$VS4: would delete 15 keys: deployment, endpoint, litellm_api_version, requester_ip_address, user_agent, user_api_key, user_api_key_hash, user_api_key_org_alias, user_api_key_org_id, user_api_key_request_route, user_api_key_team_alias, user_api_key_team_budget_reset_at, user_api_key_team_id, user_api_key_user_email, user_api_key_user_id
scanned=1 matched=1 updated=0 failed=0 (dry run, pass --apply to delete)
exit=0      # OpenAI still shows {"n":16,"x":"1"}

$ python db_scripts/strip_vector_store_internal_metadata.py --apply --vector-store-id $VS4 --extra-key x
$VS4: deleted 16 keys: deployment, ..., user_api_key_user_id, x
scanned=1 matched=1 updated=1 failed=0 (applied)
exit=0      # OpenAI now shows {"n":0,"metadata":{}}

$ curl -s -X POST localhost:4002/v1/vector_stores/$VS4 -H "Authorization: Bearer $TEAM_KEY" -H "Content-Type: application/json" -d '{"metadata":{"team":"llmproxy"},"model":"gpt-5"}' | jq -c '{metadata}'
{"metadata":{"team":"llmproxy"}}

$ python db_scripts/strip_vector_store_internal_metadata.py --apply --vector-store-id $VS4
scanned=1 matched=0 updated=0 failed=0 (applied)

$ python db_scripts/strip_vector_store_internal_metadata.py --vector-store-id vs_doesnotexist
could not read vector stores: HTTP 404: No vector store found with id 'vs_doesnotexist'.
exit=2

$ python db_scripts/strip_vector_store_internal_metadata.py --api-key sk-bad --vector-store-id $VS4
could not read vector stores: HTTP 401: Incorrect API key provided: sk-bad. ...

$ python db_scripts/strip_vector_store_internal_metadata.py      # whole OpenAI project, dry run
scanned=235 matched=27 updated=0 failed=0 (dry run, pass --apply to delete)

Regression, caller-controlled user_api_key on vector store search

Same request on both sides, then the spend rows read back from LiteLLM_SpendLogs after the flush

$ curl -s -X POST localhost:$PORT/v1/vector_stores/$VS/search -H "Authorization: Bearer $TEAM_KEY" -H "Content-Type: application/json" -d '{"query":"hello","model":"gpt-5","metadata":{"user_api_key":"'$VICTIM_HASH'"}}'
base  HTTP 200
tip   HTTP 200

The same forged field was also sent on /v1/responses and /v1/chat/completions

SELECT call_type, CASE WHEN api_key = sha256($TEAM_KEY) THEN 'caller key' WHEN api_key = sha256($VICTIM_HASH) THEN 'sha256(victim hash)' ... END, team_id IS NOT NULL, "startTime" FROM "LiteLLM_SpendLogs" ...

== BASE
 avector_store_search | caller key          | t | 01:40:33.016   <- forged search
 aresponses           | caller key          | t | 01:40:33.902   <- forged
 acompletion          | caller key          | t | 01:40:35.718   <- forged
 avector_store_search | caller key          | t | 01:40:37.941
== TIP
 avector_store_search | sha256(victim hash) | t | 01:40:34.931   <- forged search
 aresponses           | caller key          | t | 01:40:38.107   <- forged
 acompletion          | caller key          | t | 01:40:39.51    <- forged
 avector_store_search | caller key          | t | 01:40:41.609

So on the tip the search row is no longer billed to the key that sent it, while responses and chat with the same forged field stay correct on both sides. Team and user attribution stayed correct. OpenAI search cost $0 here, so no dollar amount moved. Reading update_database in db_spend_update_writer.py, a non sk- token is used as is, so a paid search provider (e.g. Vertex) would put the cost on the victim key's spend counter. That last part comes from the code and was not run live

The cause looks like the exact user_api_key field. The pre-call sanitizer only strips the user_api_key_ prefix, then add_missing_spend_metadata_to_litellm_metadata copies any key containing user_api_key from metadata into the spend metadata now that vector stores use litellm_metadata. The cleanup script already treats the exact user_api_key as proxy-written, so stripping it in the sanitizer too, plus a test for search, looks like the fix

All QA vector stores and the uploaded file were deleted from OpenAI afterwards

@litereview

litereview Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

New commits were pushed. This review covers a6bfbdc53539.

⚠️ gauntlet

Scope: full · Full PR review.

Completed · Checks failed.

The provider-metadata fix passes the focused tests, but two downstream consumers still assume proxy context lives in metadata. I reproduced regressions in header-based agent limiting and administrator logging metadata. These caveats remain defects even though neighboring endpoints have similar behavior.

Reviewed the full supplied diff at a6bfbdc53539d735dd2e3c40347bfaf55bb3738c in /workspace/repo. If these backwards-incompatible changes are retained, the PR title needs a conventional breaking-change marker.

Thanks, the fix is verified. The limiter now prefers the proxy-resolved litellm_metadata.agent_id over provider metadata while preserving key-owned agent precedence. Header-based vector-store requests again create both agent and agent-session limit descriptors.

Thanks, the reported collision is fixed. String-valued provider metadata no longer replaces configured administrator tags or spend-log fields, and tag extraction no longer raises the reported AttributeError.

Checks and execution details
  • Passed · Focused regression suites (optional): Ran .venv/bin/python -m pytest tests/unit/db_scripts/test_strip_vector_store_internal_metadata.py tests/unit/proxy/test_litellm_pre_call_utils.py tests/unit/test_router/test_router_endpoints.py -q. Result: 580 passed, 17 warnings in 38.34s.
  • Failed · Metadata consumer compatibility probe (optional): Ran PYTHONPATH=. .venv/bin/python /tmp/probe_metadata.py. Compared old and new route selection through real request preparation, agent resolution, metadata merging, and request-tag extraction. Reproduced both reported regressions without external provider calls.
  • Not run · Live OpenAI verification (optional): No live provider calls were made. The PR's live-run evidence was read but is not claimed as independently verified.

View review · Reviewed a6bfbdc53539

Comment thread litellm/proxy/litellm_pre_call_utils.py Resolved
Comment thread litellm/proxy/litellm_pre_call_utils.py Resolved
… from litellm_metadata

Vector store routes now keep proxy context in litellm_metadata, but the v3
limiter only read agent_id from metadata, and logging let provider metadata
tags or spend_logs_metadata replace the proxy's values. A string tags value
also crashed get_request_tags.

The limiter now prefers the proxy-resolved agent_id in litellm_metadata.
Logging combines list tags from both buckets (metadata first, deduplicated)
and merges dict spend_logs_metadata with litellm_metadata winning, ignoring
values of the wrong type.
@yuneng-berri

Copy link
Copy Markdown
Contributor Author

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.

… routes

On routes that keep proxy context in litellm_metadata, the proxy builds
litellm_metadata.tags from the caller's tags plus key, team and header
tags, but get_request_tags preferred the caller's metadata.tags. A caller
sending metadata.tags on a vector store call dropped the key's tags from
request_tags, which tag spend tracking reads. get_request_tags now prefers
a non-empty litellm_metadata tag list, and falls back to metadata.tags as
before.
@yuneng-berri

Copy link
Copy Markdown
Contributor Author

bugbot run

…ry instead of moving metadata buckets

Moving vector store proxy context into litellm_metadata broke shared readers
(agent limits, request tags, merged logging metadata), and fixing them
widened the change to every litellm_metadata route. This reverts the bucket
move, the router change and the reader fixes, so proxy context stays in
metadata exactly as on main.

Vector store create and update now drop the keys LiteLLM itself writes
(user_api_key*, requester and deployment keys, agent ids) from the metadata
sent to the provider, in the shared optional-param helper both paths use.
The cleanup script reuses the same key list.
@yuneng-berri

Copy link
Copy Markdown
Contributor Author

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.

@yuneng-berri

Copy link
Copy Markdown
Contributor Author

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.

@yuneng-berri

Copy link
Copy Markdown
Contributor Author

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.

@yuneng-berri

Copy link
Copy Markdown
Contributor Author

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.

@yuneng-berri

Copy link
Copy Markdown
Contributor Author

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/vector_stores/utils.py Resolved
Comment thread litellm/vector_stores/utils.py Resolved
@yuneng-berri

Copy link
Copy Markdown
Contributor Author

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.

✅ 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 a16f1f1. Configure here.

@yuneng-berri
yuneng-berri merged commit 4846cfa into main Oct 17, 2026
148 of 150 checks passed
@yuneng-berri
yuneng-berri deleted the litellm_vector-store-metadata-fix branch October 17, 2026 19:51
yuneng-berri added a commit that referenced this pull request Oct 17, 2026
…etadata (#47021) (#47159)

* fix(vector-stores): keep proxy context out of provider vector store metadata

The proxy merged its request context (user_api_key_* fields, endpoint,
user_agent, requester_ip_address, litellm_api_version) and the router's
deployment info into the vector store request's metadata. For vector
stores that field is also OpenAI's own metadata, which is capped at 16
keys, so a store created with a team key was full on creation and every
later metadata update returned 400.

Vector store routes now keep that context in litellm_metadata, like
batches, files and responses, and the router does the same for
avector_store_create. Provider-side metadata holds only what the caller
sent.

Adds db_scripts/strip_vector_store_internal_metadata.py, an opt-in
script that removes the proxy-written keys from stores created before
this change. It is a dry run unless --apply is passed.

* fix(vector-stores): page the metadata cleanup script without recursion and tolerate non-string values

Listing every store recursed once per page, which overflows the interpreter stack on large projects. Pages are now walked iteratively. Metadata values are no longer required to be strings, and a malformed response exits 2 with a fixed message instead of a traceback that could echo metadata values.

* fix(vector-stores): read proxy agent id, tags and spend_logs_metadata from litellm_metadata

Vector store routes now keep proxy context in litellm_metadata, but the v3
limiter only read agent_id from metadata, and logging let provider metadata
tags or spend_logs_metadata replace the proxy's values. A string tags value
also crashed get_request_tags.

The limiter now prefers the proxy-resolved agent_id in litellm_metadata.
Logging combines list tags from both buckets (metadata first, deduplicated)
and merges dict spend_logs_metadata with litellm_metadata winning, ignoring
values of the wrong type.

* fix(vector-stores): narrow the logging fallback to mistyped caller values

The tag union and spend_logs_metadata merge changed logged tags and
spend_logs_metadata on every route that has both metadata buckets, deduped
tags quadratically, and stopped background interaction polling from keeping
string tags as sent. Caller values now win exactly as before, and the
proxy's litellm_metadata tags or spend_logs_metadata only replace a caller
value of the wrong type.

The limiter reads agent ids through a pydantic model instead of a cast and
ignores non-string ids.

* fix(vector-stores): log the proxy's full tag list on litellm_metadata routes

On routes that keep proxy context in litellm_metadata, the proxy builds
litellm_metadata.tags from the caller's tags plus key, team and header
tags, but get_request_tags preferred the caller's metadata.tags. A caller
sending metadata.tags on a vector store call dropped the key's tags from
request_tags, which tag spend tracking reads. get_request_tags now prefers
a non-empty litellm_metadata tag list, and falls back to metadata.tags as
before.

* fix(vector-stores): strip LiteLLM-written keys at the provider boundary instead of moving metadata buckets

Moving vector store proxy context into litellm_metadata broke shared readers
(agent limits, request tags, merged logging metadata), and fixing them
widened the change to every litellm_metadata route. This reverts the bucket
move, the router change and the reader fixes, so proxy context stays in
metadata exactly as on main.

Vector store create and update now drop the keys LiteLLM itself writes
(user_api_key*, requester and deployment keys, agent ids) from the metadata
sent to the provider, in the shared optional-param helper both paths use.
The cleanup script reuses the same key list.

* fix(vector-stores): pass non-string metadata keys through the provider metadata filter

* fix(vector-stores): strip LiteLLM-written metadata keys only on proxy and router calls

* fix(vector-stores): send the provider exactly the metadata the caller sent through the proxy

* fix(vector-stores): snapshot caller metadata from the raw request body and keep it out of logged request bodies

* fix(vector-stores): copy the parsed-body metadata when the raw request body cannot be reparsed

(cherry picked from commit 4846cfa)
@yuneng-berri yuneng-berri mentioned this pull request Oct 20, 2026
2 of 6 tasks
rogerrum pushed a commit to rogerrum/k8s-gitops that referenced this pull request Oct 25, 2026
….106.4 ) (#3677)

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 | `v1.105.1` → `v1.106.4` |

---

> ⚠️ **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.106.4`](https://github.com/BerriAI/litellm/releases/tag/v1.106.4)

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

#### Verify this release

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/e82a3c646908ba0a6ee0beddc4310d7a6cac4065/cosign.pub \
  ghcr.io/berriai/litellm:v1.106.4
```

Same command for `litellm-database`, `litellm-non_root` and the `docker.io/litellm/*` images

#### What's new in 1.106.4

3 PRs. 2 fixed. No action needed to upgrade

##### Changes

- **Deployment:** Fixed the proxy sometimes exiting on startup with an `ImportError` when it cannot reach the remote model cost map, broken since v1.104.0 ([#&#8203;46711](https://github.com/BerriAI/litellm/issues/46711)) <sup>Also in [1.104.7](https://github.com/BerriAI/litellm/releases/tag/v1.104.7), [1.105.5](https://github.com/BerriAI/litellm/releases/tag/v1.105.5)</sup>
- **Deployment:** Fixed image scans flagging brotli 1.2.0, the emSign ECC Root CA - G3 and unused lockfile packages ([#&#8203;48283](https://github.com/BerriAI/litellm/issues/48283), [#&#8203;48300](https://github.com/BerriAI/litellm/issues/48300))

***

Backport [#&#8203;48294](https://github.com/BerriAI/litellm/issues/48294) · [Full changelog](https://github.com/BerriAI/litellm/compare/v1.106.3...v1.106.4)

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

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

> \[!IMPORTANT]
> **The image-signing key has changed.** Starting with this release, every Docker image and Helm chart is signed with the new cosign key from commit [`e82a3c6`](https://github.com/BerriAI/litellm/commit/e82a3c646908ba0a6ee0beddc4310d7a6cac4065). Verifying with the previous key from commit `0112e53` will fail.
>
> Update anything that pins the old `cosign.pub`: `cosign verify` scripts, CI checks, and admission policies such as Kyverno, Sigstore policy-controller or Connaisseur.
>
> New `cosign.pub` SHA-256: `e3fe3e08c44b16407fe0b37c43b4f8b603b3a0f4ee74c29e647bc022d762c2c0`

#### Verify this release

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/e82a3c646908ba0a6ee0beddc4310d7a6cac4065/cosign.pub \
  ghcr.io/berriai/litellm:v1.106.3
```

Same command for `litellm-database`, `litellm-non_root` and the `docker.io/litellm/*` images

#### What's new in 1.106.3

4 PRs. 1 changed, 1 removed. 1 needs action

##### Action required

- **Deployment:** Verify image signatures with the `cosign.pub` from commit `e82a3c6`, the previous key no longer matches ([#&#8203;48103](https://github.com/BerriAI/litellm/issues/48103)) <sup>Also in [1.103.8](https://github.com/BerriAI/litellm/releases/tag/v1.103.8), [1.104.6](https://github.com/BerriAI/litellm/releases/tag/v1.104.6), [1.105.4](https://github.com/BerriAI/litellm/releases/tag/v1.105.4)</sup>

##### Changes

- **Deployment:** Removed the eMudhra root CA from every certificate bundle the SDK, proxy and Docker images trust ([#&#8203;47670](https://github.com/BerriAI/litellm/issues/47670), [#&#8203;47969](https://github.com/BerriAI/litellm/issues/47969), [#&#8203;48139](https://github.com/BerriAI/litellm/issues/48139)) <sup>Also in [1.103.8](https://github.com/BerriAI/litellm/releases/tag/v1.103.8), [1.104.6](https://github.com/BerriAI/litellm/releases/tag/v1.104.6), [1.105.4](https://github.com/BerriAI/litellm/releases/tag/v1.105.4)</sup>
- **Deployment:** Changed the cosign key that signs Docker images and Helm charts to the one from commit `e82a3c6` ([#&#8203;48103](https://github.com/BerriAI/litellm/issues/48103)) <sup>Also in [1.103.8](https://github.com/BerriAI/litellm/releases/tag/v1.103.8), [1.104.6](https://github.com/BerriAI/litellm/releases/tag/v1.104.6), [1.105.4](https://github.com/BerriAI/litellm/releases/tag/v1.105.4)</sup>

***

Backport [#&#8203;48078](https://github.com/BerriAI/litellm/issues/48078) · Backport [#&#8203;48142](https://github.com/BerriAI/litellm/issues/48142) · [Full changelog](https://github.com/BerriAI/litellm/compare/v1.106.2...v1.106.3)

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

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

#### Verify Docker Image Signature

All LiteLLM Docker images are signed with [cosign](https://docs.sigstore.dev/cosign/overview/). Every release is signed with the same key introduced in [commit `0112e53`](https://github.com/BerriAI/litellm/commit/0112e53046018d726492c814b3644b7d376029d0).

**Verify using the pinned commit hash (recommended):**

A commit hash is cryptographically immutable, so this is the strongest way to ensure you are using the original signing key:

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/0112e53046018d726492c814b3644b7d376029d0/cosign.pub \
  ghcr.io/berriai/litellm:v1.106.2
```

**Verify using the release tag (convenience):**

Tags are protected in this repository and resolve to the same key. This option is easier to read but relies on tag protection rules:

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/v1.106.2/cosign.pub \
  ghcr.io/berriai/litellm:v1.106.2
```

Expected output:

```
The following checks were performed on each of these signatures:
  - The cosign claims were validated
  - The signatures were verified against the specified public key
```

***

#### What's Changed

- fix(count_tokens): backport Bedrock Mantle 404 fallback to stable/1.106.x by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;47742](https://github.com/BerriAI/litellm/pull/47742)
- fix(batches)!: backport P0 batch-cost, pricing and translation fixes to stable/1.106.x for v1.106.2 by [@&#8203;mrinal-berri](https://github.com/mrinal-berri) in [#&#8203;47736](https://github.com/BerriAI/litellm/pull/47736)
- fix(proxy): backport LIT-145 spend and cost fixes to stable/1.106.x for v1.106.2 by [@&#8203;kerry-berri](https://github.com/kerry-berri) in [#&#8203;47695](https://github.com/BerriAI/litellm/pull/47695)

**Full Changelog**: <https://github.com/BerriAI/litellm/compare/v1.106.1...v1.106.2>

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

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

#### Verify this release

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/0112e53046018d726492c814b3644b7d376029d0/cosign.pub \
  ghcr.io/berriai/litellm:v1.106.1
```

Same command for `litellm-database`, `litellm-non_root` and the `docker.io/litellm/*` images

#### What's new in 1.106.1

9 PRs. 6 fixed. 1 needs action

##### Action required

- **Vector stores:** Run `db_scripts/strip_vector_store_internal_metadata.py` to fix stores created before this release ([#&#8203;47021](https://github.com/BerriAI/litellm/issues/47021))

##### Changes

- **Anthropic:** Fixed signed thinking blocks and `thinking.block_binding` being dropped on multi-turn requests ([#&#8203;41362](https://github.com/BerriAI/litellm/issues/41362), [#&#8203;46342](https://github.com/BerriAI/litellm/issues/46342)) <sup>Also in [1.105.2](https://github.com/BerriAI/litellm/releases/tag/v1.105.2)</sup>
- **Chat completions:** Fixed tool calls landing on `choices[1]` with gpt-5.4+ models, broken since v1.97.0 ([#&#8203;46099](https://github.com/BerriAI/litellm/issues/46099)) <sup>Also in [1.105.2](https://github.com/BerriAI/litellm/releases/tag/v1.105.2)</sup>
- **Batches and files:** Fixed 403 when team keys retrieve, cancel or download their own batches ([#&#8203;47067](https://github.com/BerriAI/litellm/issues/47067)) <sup>Also in [1.105.2](https://github.com/BerriAI/litellm/releases/tag/v1.105.2)</sup>
- **Vector stores:** Fixed HTTP 400 on metadata updates caused by keys the proxy added to the store ([#&#8203;47021](https://github.com/BerriAI/litellm/issues/47021))
- **Token counting:** Fixed undercounted PDFs, system prompts and tools, and rejected Google `countTokens` requests ([#&#8203;47389](https://github.com/BerriAI/litellm/issues/47389), [#&#8203;47446](https://github.com/BerriAI/litellm/issues/47446), [#&#8203;47454](https://github.com/BerriAI/litellm/issues/47454)) <sup>Also in [1.104.4](https://github.com/BerriAI/litellm/releases/tag/v1.104.4), [1.105.2](https://github.com/BerriAI/litellm/releases/tag/v1.105.2)</sup>
- **MCP:** Fixed `Tool not found` when calling a bare tool name on `/{server}/mcp`, broken since v1.103.0 ([#&#8203;46225](https://github.com/BerriAI/litellm/issues/46225))

***

Backport [#&#8203;47517](https://github.com/BerriAI/litellm/issues/47517) · [Full changelog](https://github.com/BerriAI/litellm/compare/v1.106.0...v1.106.1)

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

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

#### Verify Docker Image Signature

All LiteLLM Docker images are signed with [cosign](https://docs.sigstore.dev/cosign/overview/). Every release is signed with the same key introduced in [commit `0112e53`](https://github.com/BerriAI/litellm/commit/0112e53046018d726492c814b3644b7d376029d0).

**Verify using the pinned commit hash (recommended):**

A commit hash is cryptographically immutable, so this is the strongest way to ensure you are using the original signing key:

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/0112e53046018d726492c814b3644b7d376029d0/cosign.pub \
  ghcr.io/berriai/litellm:v1.106.0
```

**Verify using the release tag (convenience):**

Tags are protected in this repository and resolve to the same key. This option is easier to read but relies on tag protection rules:

```bash
cosign verify \
  --key https://raw.githubusercontent.com/BerriAI/litellm/v1.106.0/cosign.pub \
  ghcr.io/berriai/litellm:v1.106.0
```

Expected output:

```
The following checks were performed on each of these signatures:
  - The cosign claims were validated
  - The signatures were verified against the specified public key
```

***

#### What's Changed

- test(mcp): fire MCP client test deadlines on conditions instead of wall-clock time by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44166](https://github.com/BerriAI/litellm/pull/44166)
- fix(cost-map): add OpenAI TTS and GPT-5.x deprecation dates by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44175](https://github.com/BerriAI/litellm/pull/44175)
- fix(tracing): unify ClickHouse storage configuration by [@&#8203;yujonglee-berri](https://github.com/yujonglee-berri) in [#&#8203;43941](https://github.com/BerriAI/litellm/pull/43941)
- feat(docker): one-command quickstart that starts the gateway, Postgres, and the admin UI by [@&#8203;misbahsy](https://github.com/misbahsy) in [#&#8203;43673](https://github.com/BerriAI/litellm/pull/43673)
- fix(lens): simplify the example investigation preview by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44123](https://github.com/BerriAI/litellm/pull/44123)
- chore(helm): drop migrationJob values the chart never reads by [@&#8203;Bernedotcom2312](https://github.com/Bernedotcom2312) in [#&#8203;42141](https://github.com/BerriAI/litellm/pull/42141)
- fix(ui): register tencent in the Add Model provider dropdown by [@&#8203;jimaldon](https://github.com/jimaldon) in [#&#8203;40924](https://github.com/BerriAI/litellm/pull/40924)
- test: remove 130 legacy tests owned by stronger unit proofs by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44157](https://github.com/BerriAI/litellm/pull/44157)
- feat(mcp)!: disable stdio MCP servers by default by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;44066](https://github.com/BerriAI/litellm/pull/44066)
- fix(proxy): exit when DATABASE_URL is set but the Prisma toolchain is missing by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44207](https://github.com/BerriAI/litellm/pull/44207)
- fix(proxy): preserve lifespan state across all entrypoints by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;44214](https://github.com/BerriAI/litellm/pull/44214)
- fix(oci): resolve the GenAI endpoint realm from the compartment OCID instead of hardcoding oraclecloud.com by [@&#8203;fede-kamel](https://github.com/fede-kamel) in [#&#8203;43180](https://github.com/BerriAI/litellm/pull/43180)
- fix(chatgpt): preserve requested service tier in Responses calls by [@&#8203;SteffanWolter](https://github.com/SteffanWolter) in [#&#8203;40108](https://github.com/BerriAI/litellm/pull/40108)
- fix(ui): leave unset callback select params out of the save payload by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44213](https://github.com/BerriAI/litellm/pull/44213)
- fix(proxy-extras): hand libpq a root cert, not Prisma's sslcert, when the migration job builds indexes by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44203](https://github.com/BerriAI/litellm/pull/44203)
- feat: add Laya gateway and OSS classifier providers by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;43626](https://github.com/BerriAI/litellm/pull/43626)
- fix(auto-router): count usage savings by selected UTC request day by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;44115](https://github.com/BerriAI/litellm/pull/44115)
- fix(lens): preserve framework agent names and GenAI message content by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44218](https://github.com/BerriAI/litellm/pull/44218)
- feat(jwt): auto_register_map_existing_key maps JWT to the user's existing virtual key by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;42375](https://github.com/BerriAI/litellm/pull/42375)
- feat(ui): select Laya for OSS classification by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;43768](https://github.com/BerriAI/litellm/pull/43768)
- fix(otel): tolerate non-dict callback_settings.otel and ignore bare EXCLUDED_SERVICES env by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44086](https://github.com/BerriAI/litellm/pull/44086)
- fix(proxy): carry key, team and project tags into pass-through spend logs by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;42662](https://github.com/BerriAI/litellm/pull/42662)
- feat(ui): add System One (Jev) tab to the playground by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44043](https://github.com/BerriAI/litellm/pull/44043)
- chore: bump litellm-proxy-extras 0.4.104 -> 0.4.105 by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44234](https://github.com/BerriAI/litellm/pull/44234)
- chore(prices): add xAI grok-voice-transcribe-1.0 deprecation date by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44237](https://github.com/BerriAI/litellm/pull/44237)
- fix(exa): fall back to highlights/summary when text is missing by [@&#8203;wakqasahmed](https://github.com/wakqasahmed) in [#&#8203;42213](https://github.com/BerriAI/litellm/pull/42213)
- fix(scim): apply path-less group PATCH ops instead of storing them under an empty metadata key by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;43978](https://github.com/BerriAI/litellm/pull/43978)
- fix(lens): run investigations with configured wildcard models by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44233](https://github.com/BerriAI/litellm/pull/44233)
- fix(ui): shrink the sidebar logo so it stops outweighing page titles by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;44247](https://github.com/BerriAI/litellm/pull/44247)
- feat(tracing): support claude agent sdk traces with agent name, logo and chat content by [@&#8203;ishaan-berri](https://github.com/ishaan-berri) in [#&#8203;44248](https://github.com/BerriAI/litellm/pull/44248)
- fix(ui): make model leaderboard chart bars wide and readable by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44249](https://github.com/BerriAI/litellm/pull/44249)
- test: repair stale and polluting tests red on scheduled main CI by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;44229](https://github.com/BerriAI/litellm/pull/44229)
- feat(traces): type queries and align read access with log visibility by [@&#8203;yujonglee-berri](https://github.com/yujonglee-berri) in [#&#8203;44228](https://github.com/BerriAI/litellm/pull/44228)
- chore(ui): untrack tsconfig.tsbuildinfo and gitignore \*.tsbuildinfo by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44261](https://github.com/BerriAI/litellm/pull/44261)
- refactor(mcp): extract upstream preparation and support modern clients by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;44232](https://github.com/BerriAI/litellm/pull/44232)
- fix(lens): default to traces and reopen span details by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44260](https://github.com/BerriAI/litellm/pull/44260)
- fix(bedrock): surface unrecognized converse-stream event frames instead of an empty turn by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44112](https://github.com/BerriAI/litellm/pull/44112)
- perf(proxy): batch daily model usage writes instead of upserting per request by [@&#8203;ishaan-berri](https://github.com/ishaan-berri) in [#&#8203;44243](https://github.com/BerriAI/litellm/pull/44243)
- test(integration): opt the config pass-through spend-log case into auth by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;44265](https://github.com/BerriAI/litellm/pull/44265)
- test: fix three order-dependent and timing-flaky tests by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;44271](https://github.com/BerriAI/litellm/pull/44271)
- fix(ui): make the Lens traces refresh button always clickable by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44252](https://github.com/BerriAI/litellm/pull/44252)
- feat(lens): add sample previews and improve setup and worker feedback by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44268](https://github.com/BerriAI/litellm/pull/44268)
- chore(openrouter): sync prices, limits and deprecation dates from the models API by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44287](https://github.com/BerriAI/litellm/pull/44287)
- refactor(traces): type the ClickHouse query help response by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44285](https://github.com/BerriAI/litellm/pull/44285)
- fix(proxy): stop queued registry read-throughs spending the resync budget by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;44277](https://github.com/BerriAI/litellm/pull/44277)
- feat(lens): show investigation progress as one staged bar with time left by [@&#8203;ishaan-berri](https://github.com/ishaan-berri) in [#&#8203;44301](https://github.com/BerriAI/litellm/pull/44301)
- refactor(ui): compose dashboard pages with shared layouts by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44306](https://github.com/BerriAI/litellm/pull/44306)
- fix(proxy): share ownership permissions for spend logs and traces by [@&#8203;yujonglee-berri](https://github.com/yujonglee-berri) in [#&#8203;44239](https://github.com/BerriAI/litellm/pull/44239)
- fix(proxy-extras): retry P3009 when a peer already recovered the named migration row by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44283](https://github.com/BerriAI/litellm/pull/44283)
- fix(bedrock): price amazon nova 2 pro preview at the standard tier by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44302](https://github.com/BerriAI/litellm/pull/44302)
- feat: add Bespoke Nimble gateway and OSS classifier support by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;44246](https://github.com/BerriAI/litellm/pull/44246)
- fix(anthropic): stop repeating streamed thinking text in the signature chunk by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44127](https://github.com/BerriAI/litellm/pull/44127)
- fix(responses): drop bridge-minted reasoning items from OpenAI replays by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44132](https://github.com/BerriAI/litellm/pull/44132)
- feat(bedrock): drop lookaround regex patterns from tool schemas for Converse models that reject them by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44138](https://github.com/BerriAI/litellm/pull/44138)
- feat(bedrock): serve gpt-5.6+ chat completions natively by default, with chat_completions/ opt-in for gpt-oss and grok by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44307](https://github.com/BerriAI/litellm/pull/44307)
- feat(lens): issue briefs with problem, user goal, outcome and test cases by [@&#8203;ishaan-berri](https://github.com/ishaan-berri) in [#&#8203;44311](https://github.com/BerriAI/litellm/pull/44311)
- fix(responses): keep gpt-5.4/5.5 tool calls on chat and merge bridged tool calls into one choice by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44295](https://github.com/BerriAI/litellm/pull/44295)
- fix(cost): price rule-only model names at the deployment's rate by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44144](https://github.com/BerriAI/litellm/pull/44144)
- fix(auto-router): attribute router-day savings without spend logs or a session by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;44226](https://github.com/BerriAI/litellm/pull/44226)
- test(integration): let run.py select cells by pytest node id by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44319](https://github.com/BerriAI/litellm/pull/44319)
- fix(bedrock): honor unsupported reasoning effort levels for OpenAI GPT models by [@&#8203;Aasif-Multani](https://github.com/Aasif-Multani) in [#&#8203;44183](https://github.com/BerriAI/litellm/pull/44183)
- feat(lens): add preset watch-for checks to investigation setup by [@&#8203;ishaan-berri](https://github.com/ishaan-berri) in [#&#8203;44313](https://github.com/BerriAI/litellm/pull/44313)
- fix(proxy): use OpenAI workload identity federation tokens on /openai_passthrough by [@&#8203;6matt](https://github.com/6matt) in [#&#8203;44140](https://github.com/BerriAI/litellm/pull/44140)
- feat(interactions): durable cross-pod settlement for background interaction billing by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;41955](https://github.com/BerriAI/litellm/pull/41955)
- fix(streaming): keep the finish_reason of the provider's last content chunk in the logged response by [@&#8203;joeym82956](https://github.com/joeym82956) in [#&#8203;44318](https://github.com/BerriAI/litellm/pull/44318)
- fix(bedrock): send the anthropic-workspace-id header to Bedrock Mantle by [@&#8203;kohjunhao](https://github.com/kohjunhao) in [#&#8203;44173](https://github.com/BerriAI/litellm/pull/44173)
- fix(guardrails): run unified guardrails on /v1/images/edits by [@&#8203;michelligabriele](https://github.com/michelligabriele) in [#&#8203;44195](https://github.com/BerriAI/litellm/pull/44195)
- feat(scaleway): add rerank support by [@&#8203;ankit373](https://github.com/ankit373) in [#&#8203;44160](https://github.com/BerriAI/litellm/pull/44160)
- fix(vector_stores): return managed file ids from vector store file list by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;43800](https://github.com/BerriAI/litellm/pull/43800)
- fix(proxy): return 4xx instead of 500 for missing required params, invalid pagination and unknown ids by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;43787](https://github.com/BerriAI/litellm/pull/43787)
- fix(guardrails): encrypt guardrail litellm_params secrets at rest by [@&#8203;yucheng-berri](https://github.com/yucheng-berri) in [#&#8203;43627](https://github.com/BerriAI/litellm/pull/43627)
- fix(search_tools): encrypt search tool litellm_params at rest by [@&#8203;yucheng-berri](https://github.com/yucheng-berri) in [#&#8203;43631](https://github.com/BerriAI/litellm/pull/43631)
- feat(roi): add GitLab sources and branch cost attribution by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44324](https://github.com/BerriAI/litellm/pull/44324)
- fix(model-prices): mark azure us/eu responses-only models as mode responses by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44323](https://github.com/BerriAI/litellm/pull/44323)
- revert(cost): revert "fix(cost): price rule-only model names at the deployment's rate" ([#&#8203;44144](https://github.com/BerriAI/litellm/issues/44144)) by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44335](https://github.com/BerriAI/litellm/pull/44335)
- fix(proxy): stamp the client alias on a copy of each streamed chunk so pricing sees the deployment model by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44341](https://github.com/BerriAI/litellm/pull/44341)
- revert(responses): revert "fix(responses): keep gpt-5.4/5.5 tool calls on chat and merge bridged tool calls into one choice" ([#&#8203;44295](https://github.com/BerriAI/litellm/issues/44295)) by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44344](https://github.com/BerriAI/litellm/pull/44344)
- refactor(dashboard): migrate to zod 4 and openai 6 by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44345](https://github.com/BerriAI/litellm/pull/44345)
- feat(ui): move LiteAdmin into the header with a docked side panel by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;44293](https://github.com/BerriAI/litellm/pull/44293)
- fix(responses): merge bridged tool calls into the same choice as the text by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44346](https://github.com/BerriAI/litellm/pull/44346)
- feat(ui): improve trace inspection and ROI estimation by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44351](https://github.com/BerriAI/litellm/pull/44351)
- refactor(ui): reorganize Lens dashboard components by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44354](https://github.com/BerriAI/litellm/pull/44354)
- refactor(ui): inject Lens backends as services instead of a fake HTTP client by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44369](https://github.com/BerriAI/litellm/pull/44369)
- refactor: clean up fresh tech debt from 2026-10-02 by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44362](https://github.com/BerriAI/litellm/pull/44362)
- feat(traces): tracing development seed by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44363](https://github.com/BerriAI/litellm/pull/44363)
- refactor(types): replace Any with proven types in 4 files by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44370](https://github.com/BerriAI/litellm/pull/44370)
- build(deps): suppress unfixed braces GHSA-vfj7-8cjw-p6xm to clear osv-scan by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44347](https://github.com/BerriAI/litellm/pull/44347)
- fix(azure): add MAI-Image max_input_tokens from models sold directly page by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44375](https://github.com/BerriAI/litellm/pull/44375)
- fix(proxy): emit postgres service spans only on real DB reads in auth cache helpers by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44148](https://github.com/BerriAI/litellm/pull/44148)
- fix(otel): nest cache spans under their operation and name service spans by purpose by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44150](https://github.com/BerriAI/litellm/pull/44150)
- fix(otel): name postgres service spans by operation and table by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44240](https://github.com/BerriAI/litellm/pull/44240)
- perf(proxy): stop prompt-cache eligibility from tokenizing the whole conversation by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44221](https://github.com/BerriAI/litellm/pull/44221)
- fix(proxy): keep the database error when the log_db_metrics failure hook raises by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44383](https://github.com/BerriAI/litellm/pull/44383)
- feat(azure): add azure_ai/kimi-k2-thinking from Azure Kimi pricing page by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44382](https://github.com/BerriAI/litellm/pull/44382)
- feat(harness): add Harness.TOOL_LOOP, a minimal in-process tool-calling loop by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44391](https://github.com/BerriAI/litellm/pull/44391)
- feat(decisions): add unified /v1/decisions endpoint for Jev-compatible providers by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44236](https://github.com/BerriAI/litellm/pull/44236)
- fix(lens): paginate trace reads within ClickHouse limits by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44384](https://github.com/BerriAI/litellm/pull/44384)
- feat(lens): live dot field timeline and full-screen traces view by [@&#8203;ishaan-berri](https://github.com/ishaan-berri) in [#&#8203;44390](https://github.com/BerriAI/litellm/pull/44390)
- feat(ui): make LiteAdmin enterprise-only by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;44399](https://github.com/BerriAI/litellm/pull/44399)
- fix(bedrock): stop emitting Converse cachePoint blocks for Kimi K3 by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44292](https://github.com/BerriAI/litellm/pull/44292)
- test(cost): pin OpenAI reported web search count with mixed actions by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44414](https://github.com/BerriAI/litellm/pull/44414)
- fix(ci): give the pass-through auth regression test a real FastAPI app by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44403](https://github.com/BerriAI/litellm/pull/44403)
- fix(azure): add azure_ai/flux.2-pro input token limit from the models sold directly page by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44405](https://github.com/BerriAI/litellm/pull/44405)
- fix(lens): batch run reads and reset trace pagination by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44398](https://github.com/BerriAI/litellm/pull/44398)
- fix(lens): preserve full trace access and expose investigation failures by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44406](https://github.com/BerriAI/litellm/pull/44406)
- feat: add make lens-dev for one-command lens local dev by [@&#8203;ishaan-berri](https://github.com/ishaan-berri) in [#&#8203;44413](https://github.com/BerriAI/litellm/pull/44413)
- fix(bedrock): honor the per-request timeout on Converse and Invoke streaming (internal copy of [#&#8203;38210](https://github.com/BerriAI/litellm/issues/38210)) by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44134](https://github.com/BerriAI/litellm/pull/44134)
- feat(traces): render curated SQL examples from shared files by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44388](https://github.com/BerriAI/litellm/pull/44388)
- fix(model_prices): registry audit 2026-10-03, add cohere embed v5, grok-imagine-video-1.5-lite and openrouter gpt-image rows by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44376](https://github.com/BerriAI/litellm/pull/44376)
- refactor(traces): extract snapshot cache by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44424](https://github.com/BerriAI/litellm/pull/44424)
- feat(lens): always-on investigations with findings and investigations tables by [@&#8203;ishaan-berri](https://github.com/ishaan-berri) in [#&#8203;44418](https://github.com/BerriAI/litellm/pull/44418)
- feat(docker): add a Windows quickstart in PowerShell, and a styled terminal for both quickstarts by [@&#8203;misbahsy](https://github.com/misbahsy) in [#&#8203;44310](https://github.com/BerriAI/litellm/pull/44310)
- feat(proxy): serve a Codex-native model catalog with per-model service_tiers from /v1/models by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44136](https://github.com/BerriAI/litellm/pull/44136)
- refactor(types): replace Any with proven types in 9 files by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44389](https://github.com/BerriAI/litellm/pull/44389)
- fix(proxy): treat Postgres connection exhaustion as DB unavailable, not poison spend-log rows by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44270](https://github.com/BerriAI/litellm/pull/44270)
- fix(proxy): treat Postgres connection exhaustion as backpressure, not poison rows by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44266](https://github.com/BerriAI/litellm/pull/44266)
- fix(lens): release budget reservations when the analysis model call fails by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44431](https://github.com/BerriAI/litellm/pull/44431)
- fix(mcp): preserve upstream tool schemas and parameter headers by [@&#8203;joshua-berri](https://github.com/joshua-berri) in [#&#8203;44425](https://github.com/BerriAI/litellm/pull/44425)
- fix(bedrock_mantle): route Claude chat completions to the native Messages endpoint by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;43646](https://github.com/BerriAI/litellm/pull/43646)
- fix(tracing): preserve spend identity and gateway correlation by [@&#8203;yujonglee-berri](https://github.com/yujonglee-berri) in [#&#8203;44421](https://github.com/BerriAI/litellm/pull/44421)
- feat(roi): measure shipping velocity, quality, and recorded spend by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44426](https://github.com/BerriAI/litellm/pull/44426)
- fix(azure): set text-embedding max input to 8192 from the models sold directly page by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44449](https://github.com/BerriAI/litellm/pull/44449)
- feat(ui): show invitation and reset password links in a copyable field by [@&#8203;yuneng-berri](https://github.com/yuneng-berri) in [#&#8203;44454](https://github.com/BerriAI/litellm/pull/44454)
- feat(lens): coordinate worker releases and bundled installs by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44428](https://github.com/BerriAI/litellm/pull/44428)
- fix(auth): resolve hidden model_group_alias entries in the zero-cost budget check by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;43741](https://github.com/BerriAI/litellm/pull/43741)
- fix(vertex_ai): forward system and tools to partner model count_tokens by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;43900](https://github.com/BerriAI/litellm/pull/43900)
- fix(traces): reject conflicting spend aliases and unrelated HTTP siblings by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44456](https://github.com/BerriAI/litellm/pull/44456)
- chore(cost-map): add azure_ai/kimi-k2-thinking retirement date from the Azure retired models page by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44455](https://github.com/BerriAI/litellm/pull/44455)
- fix(health): probe Bedrock Mantle Claude deployments over the Anthropic Messages API by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44419](https://github.com/BerriAI/litellm/pull/44419)
- fix(tests): match the OS bind error in the owned-proxy port-race retry by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44462](https://github.com/BerriAI/litellm/pull/44462)
- feat(anthropic): workload identity federation and pluggable identity sources by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44448](https://github.com/BerriAI/litellm/pull/44448)
- test(integration): exact four-part translation cases on a shared fake provider and shared YAML deployment by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44451](https://github.com/BerriAI/litellm/pull/44451)
- feat(roi): default people and branch lists to matched accounts by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44465](https://github.com/BerriAI/litellm/pull/44465)
- feat(enterprise): bundle LiteAdmin Slack with native gateway login by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;44444](https://github.com/BerriAI/litellm/pull/44444)
- fix(caching): count tool_call cache_control marks in the injection census by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;43556](https://github.com/BerriAI/litellm/pull/43556)
- chore(cost-map): sync openrouter prices from the models API by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44466](https://github.com/BerriAI/litellm/pull/44466)
- fix(lens): preserve approved worker digests and harden its image by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44467](https://github.com/BerriAI/litellm/pull/44467)
- feat: improve Lens dev seeding and live UI by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44468](https://github.com/BerriAI/litellm/pull/44468)
- test(ui): wait for step search value to settle in TraceDrawer test by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44470](https://github.com/BerriAI/litellm/pull/44470)
- feat(ui): share trace drawer as a closable SidePanel and polish Lens by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44473](https://github.com/BerriAI/litellm/pull/44473)
- fix(lens): align source setup with available worker images by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44476](https://github.com/BerriAI/litellm/pull/44476)
- feat(sdk): add run_tool_loop and arun_tool_loop helpers by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44381](https://github.com/BerriAI/litellm/pull/44381)
- feat(lens): guide setup through the first investigation by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44475](https://github.com/BerriAI/litellm/pull/44475)
- test(ci): fix six CircleCI test regressions on main by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44429](https://github.com/BerriAI/litellm/pull/44429)
- fix(proxy-extras): log v1 migration failures at ERROR so LITELLM_LOG=ERROR shows them by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44202](https://github.com/BerriAI/litellm/pull/44202)
- feat(ui): inline Lens settings tab and investigation editor by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44479](https://github.com/BerriAI/litellm/pull/44479)
- feat(mcp): hand listed-tool description and input schema to pre-call hooks per caller by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;41162](https://github.com/BerriAI/litellm/pull/41162)
- refactor: clean up fresh tech debt from 2026-10-03 by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44484](https://github.com/BerriAI/litellm/pull/44484)
- fix(otel): read the registered v2 logger without importing the proxy by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44485](https://github.com/BerriAI/litellm/pull/44485)
- test(mcp): keep the SSO assertion round trip from matching its refresh token inside random ciphertext by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44494](https://github.com/BerriAI/litellm/pull/44494)
- test(ci): pin the ROI estimator flag and the prompt-cache counter in two drifted tests by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44499](https://github.com/BerriAI/litellm/pull/44499)
- refactor(ui): move TraceView into components/lens/traces by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44501](https://github.com/BerriAI/litellm/pull/44501)
- refactor(ui): rename view_logs to logs and split request, audit and detail by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44505](https://github.com/BerriAI/litellm/pull/44505)
- refactor(ui): share CopyButton between Lens traces and logs by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44513](https://github.com/BerriAI/litellm/pull/44513)
- refactor(lens): storage-independent trace reads, shared keyset pager, typed read failures by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44422](https://github.com/BerriAI/litellm/pull/44422)
- fix(ci): send the Lens preview body as selection in the tracing endpoint tests by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44525](https://github.com/BerriAI/litellm/pull/44525)
- fix(azure): set gpt-realtime-2.1 retirement dates from the retirement schedule by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44526](https://github.com/BerriAI/litellm/pull/44526)
- fix(ci): repair the security sweep and Lens billing integration tests for ROI, JWKS, and release identity changes by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44529](https://github.com/BerriAI/litellm/pull/44529)
- fix(dashboard): route dev API calls on Accept and fail fast on non-JSON 2xx by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44528](https://github.com/BerriAI/litellm/pull/44528)
- chore(cost-map): sync openrouter prices from the models API by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44533](https://github.com/BerriAI/litellm/pull/44533)
- refactor(ui): route dashboard URL state through nuqs parsers by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44537](https://github.com/BerriAI/litellm/pull/44537)
- fix(logging): deduplicate streaming failure callbacks by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44442](https://github.com/BerriAI/litellm/pull/44442)
- feat(proxy): add LITELLM_FIPS_MODE startup gate with provider assertion and loud password migration failure by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;42700](https://github.com/BerriAI/litellm/pull/42700)
- fix(guardrails): run the end-of-stream post_call scan when the client disconnects mid-stream by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;43839](https://github.com/BerriAI/litellm/pull/43839)
- refactor(mcp): fix Sequence/list return mismatch and collapse record_listed_tools wrapper by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44556](https://github.com/BerriAI/litellm/pull/44556)
- chore(cost-map): add azure retirement dates for gpt-4o-realtime-preview-2024-10-01 and jamba-instruct by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44567](https://github.com/BerriAI/litellm/pull/44567)
- feat(ui): add persistent columns and loading skeletons to Lens runs by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44579](https://github.com/BerriAI/litellm/pull/44579)
- fix(ui): remove Top models by task card from Model Leaderboard by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44502](https://github.com/BerriAI/litellm/pull/44502)
- refactor(rust): track ClickHouse migrations in a checksummed ledger by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44580](https://github.com/BerriAI/litellm/pull/44580)
- refactor(ui): extract shared timeline and time-range controls by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44584](https://github.com/BerriAI/litellm/pull/44584)
- fix(azure): set gpt-4o-transcribe retirement date from the retirement schedule by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44585](https://github.com/BerriAI/litellm/pull/44585)
- ci: move Postgres, MCP and Redis suites to CircleCI integration by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44453](https://github.com/BerriAI/litellm/pull/44453)
- chore!: retire the integrated ROI calculator by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44477](https://github.com/BerriAI/litellm/pull/44477)
- fix(caching): key response cache by router model group in litellm_metadata by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44542](https://github.com/BerriAI/litellm/pull/44542)
- fix(auto-router): align preview and serving default resolution by [@&#8203;moyai-berriai](https://github.com/moyai-berriai)\[bot] in [#&#8203;44436](https://github.com/BerriAI/litellm/pull/44436)
- fix(mcp): bind OAuth clients to their upstream issuer by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;37777](https://github.com/BerriAI/litellm/pull/37777)
- feat(guardrails): add llm shield pii redaction and rehydration guardrail by [@&#8203;ninadphalak](https://github.com/ninadphalak) in [#&#8203;42645](https://github.com/BerriAI/litellm/pull/42645)
- refactor(tracing): generate existing HTTP request models from Rust schemas by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44591](https://github.com/BerriAI/litellm/pull/44591)
- ci: run unit selections from GHA test-path and drop the CircleCI unit jobs by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44461](https://github.com/BerriAI/litellm/pull/44461)
- fix(ui): make mobile sidebar and top bar responsive by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44603](https://github.com/BerriAI/litellm/pull/44603)
- refactor(types): replace Any with proven types in 137 files by [@&#8203;mateo-berri](https://github.com/mateo-berri) in [#&#8203;44478](https://github.com/BerriAI/litellm/pull/44478)
- fix(ui): restore inline Lens onboarding and responsive layout by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44604](https://github.com/BerriAI/litellm/pull/44604)
- test(integration): anthropic-route basic translation cases for six Claude models on messages, chat completions and responses by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44607](https://github.com/BerriAI/litellm/pull/44607)
- fix(responses): report truncated bridged output as incomplete and echo request params by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44460](https://github.com/BerriAI/litellm/pull/44460)
- fix(proxy): enforce internal-user model creation prohibition by [@&#8203;moyai-berriai](https://github.com/moyai-berriai)\[bot] in [#&#8203;44438](https://github.com/BerriAI/litellm/pull/44438)
- chore(harness): drop the unused Any import left in harness options by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44625](https://github.com/BerriAI/litellm/pull/44625)
- fix(harness): drop the unused Any import that fails ruff on main by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44627](https://github.com/BerriAI/litellm/pull/44627)
- refactor(proxy): rename management/teams/access.py to authz.py by [@&#8203;ryan-crabbe-berri](https://github.com/ryan-crabbe-berri) in [#&#8203;44624](https://github.com/BerriAI/litellm/pull/44624)
- feat(tracing)!: return only data from SQL queries by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44609](https://github.com/BerriAI/litellm/pull/44609)
- fix(openai/realtime): drop model from upstream URL for intent=transcription by [@&#8203;michelligabriele](https://github.com/michelligabriele) in [#&#8203;43854](https://github.com/BerriAI/litellm/pull/43854)
- fix(gemini): add priority tier audio input price to three Gemini rows by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44632](https://github.com/BerriAI/litellm/pull/44632)
- fix(cost): bill per-second transcription models outside chat modes by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44458](https://github.com/BerriAI/litellm/pull/44458)
- fix(ui): explain why team member reset spend is unavailable instead of hiding it by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44629](https://github.com/BerriAI/litellm/pull/44629)
- test(integration): bedrock_converse-route basic translation cases for six Claude models on messages, chat completions and responses by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44646](https://github.com/BerriAI/litellm/pull/44646)
- test(integration): run the anthropic /v1/responses basic translation cases now that the bridge echoes request params by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44615](https://github.com/BerriAI/litellm/pull/44615)
- feat(lens): restore compact navigation with live investigation review by [@&#8203;ishaan-berri](https://github.com/ishaan-berri) in [#&#8203;44472](https://github.com/BerriAI/litellm/pull/44472)
- feat(proxy): limit which models an end user can call by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;43904](https://github.com/BerriAI/litellm/pull/43904)
- fix(sso): let CLI and Claude Code gateway sign-in through on DISABLE_ADMIN_UI nodes by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44620](https://github.com/BerriAI/litellm/pull/44620)
- feat(ui): declare shared search operators and flush queries on blur by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44665](https://github.com/BerriAI/litellm/pull/44665)
- fix(lens): make tool steps and conversations readable by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44645](https://github.com/BerriAI/litellm/pull/44645)
- fix(ui): send null instead of $0 when a team's member default budget is cleared by [@&#8203;ryan-crabbe-berri](https://github.com/ryan-crabbe-berri) in [#&#8203;44644](https://github.com/BerriAI/litellm/pull/44644)
- test(integration): azure_ai-route basic translation cases for six Claude models on messages, chat completions and responses by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44658](https://github.com/BerriAI/litellm/pull/44658)
- test(integration): basic translation cases for the openai_responses route by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44663](https://github.com/BerriAI/litellm/pull/44663)
- feat(lens): analyze trace workspaces with confined Python and compaction by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44640](https://github.com/BerriAI/litellm/pull/44640)
- fix(vertex-ai): add deprecation_date to gemini-3.1-flash-lite-image by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44639](https://github.com/BerriAI/litellm/pull/44639)
- fix(bedrock): add priority and flex prices for Grok 4.3, 4.6, 4.7 and Kimi K3 by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44670](https://github.com/BerriAI/litellm/pull/44670)
- test(integration): pin the Claude-tokenizer recount for streamed claude-sonnet-5 no-usage cases by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44643](https://github.com/BerriAI/litellm/pull/44643)
- feat(proxy): embed enterprise LiteAdmin MCP in LiteLLM images by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;44610](https://github.com/BerriAI/litellm/pull/44610)
- test(integration): basic translation cases for the azure route by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44672](https://github.com/BerriAI/litellm/pull/44672)
- test(integration): assert the Messages API health probe on Mantle Claude by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44612](https://github.com/BerriAI/litellm/pull/44612)
- refactor(rust): rename litellm-framing crate to litellm-framer by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44683](https://github.com/BerriAI/litellm/pull/44683)
- test(integration): basic translation cases for the gemini route by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44662](https://github.com/BerriAI/litellm/pull/44662)
- test(integration): basic translation cases for the openai route by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44667](https://github.com/BerriAI/litellm/pull/44667)
- refactor(rust): derive string enum serde through strum and serde_with by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44675](https://github.com/BerriAI/litellm/pull/44675)
- fix(spend-tracking): stop caching failed spend-log metadata lookups as confirmed misses by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;43560](https://github.com/BerriAI/litellm/pull/43560)
- fix(proxy): let a listed team alias win over a same-named key alias in the customer model check by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44677](https://github.com/BerriAI/litellm/pull/44677)
- chore: move PR template to PULL_REQUEST_TEMPLATE/general.md, add rust.md by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44693](https://github.com/BerriAI/litellm/pull/44693)
- fix(router): retry a /v1/messages stream the provider drops before the first content chunk by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44276](https://github.com/BerriAI/litellm/pull/44276)
- fix(lens): persist final coverage with source diagnostics by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44682](https://github.com/BerriAI/litellm/pull/44682)
- test(integration): point the scratch upgraded proxy's read replica at the scratch database by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44613](https://github.com/BerriAI/litellm/pull/44613)
- fix(lens): show investigation findings for agent traces by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44696](https://github.com/BerriAI/litellm/pull/44696)
- fix(build): rebuild the Rust bridge when uv sync sees Rust sources change by [@&#8203;nate-berri](https://github.com/nate-berri) in [#&#8203;44708](https://github.com/BerriAI/litellm/pull/44708)
- fix(lens): preserve span timestamps in investigation evidence by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44702](https://github.com/BerriAI/litellm/pull/44702)
- ci: split slow unit shards and build the Rust bridge once per run by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44622](https://github.com/BerriAI/litellm/pull/44622)
- test(rust_bridge): expect PartRow start_time and end_time as required LENS_CONTENT fields by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44719](https://github.com/BerriAI/litellm/pull/44719)
- chore(deps): bump langgraph-sdk from 0.4.2 to 0.4.4 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;44713](https://github.com/BerriAI/litellm/pull/44713)
- feat: add Reka as an OpenAI-compatible provider by [@&#8203;anniejeng](https://github.com/anniejeng) in [#&#8203;44278](https://github.com/BerriAI/litellm/pull/44278)
- feat(ui): support native decisions endpoint in decision playground by [@&#8203;moyai-berriai](https://github.com/moyai-berriai)\[bot] in [#&#8203;44664](https://github.com/BerriAI/litellm/pull/44664)
- fix(lens): reconstruct native coding agent conversations by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44711](https://github.com/BerriAI/litellm/pull/44711)
- fix(responses): honor request cache controls on chat completions bridged to the Responses API by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44676](https://github.com/BerriAI/litellm/pull/44676)
- fix(deps): bump source-map-js, smol-toml, mako, multidict and werkzeug for OSV advisories by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44728](https://github.com/BerriAI/litellm/pull/44728)
- test(integration): rename translation runner run to assert_translation by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44741](https://github.com/BerriAI/litellm/pull/44741)
- feat(lens): show investigation names in findings table by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44753](https://github.com/BerriAI/litellm/pull/44753)
- feat(ui): configure cache-aware auto routing by [@&#8203;tin-berri](https://github.com/tin-berri) in [#&#8203;43396](https://github.com/BerriAI/litellm/pull/43396)
- fix(lens): bound result recovery and preserve partial results by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44692](https://github.com/BerriAI/litellm/pull/44692)
- feat(prometheus): cap series per metric for every labeled metric by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44420](https://github.com/BerriAI/litellm/pull/44420)
- feat(lens): type to filter the traces agent dropdown by [@&#8203;ishaan-berri](https://github.com/ishaan-berri) in [#&#8203;44745](https://github.com/BerriAI/litellm/pull/44745)
- test(lens): use current worker protocol in billing integration by [@&#8203;moe-berri](https://github.com/moe-berri) in [#&#8203;44760](https://github.com/BerriAI/litellm/pull/44760)
- feat(model_prices): add chatgpt subscription rows for the gpt-6 family by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44758](https://github.com/BerriAI/litellm/pull/44758)
- test(e2e): assert the sibling-replica cooldown through the router by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44706](https://github.com/BerriAI/litellm/pull/44706)
- test(integration): basic translation cases for the bedrock_invoke route by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44752](https://github.com/BerriAI/litellm/pull/44752)
- fix(gemini): stop replaying thinking block signatures to Gemini by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44661](https://github.com/BerriAI/litellm/pull/44661)
- fix(ci): namespace claude session ids in tracing seeds and allowlist /v1/logs on backend by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44761](https://github.com/BerriAI/litellm/pull/44761)
- fix(proxy): judge the free-model budget waiver by the group an alias routes to by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44638](https://github.com/BerriAI/litellm/pull/44638)
- test(integration): basic translation cases for the vertex_ai route by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44751](https://github.com/BerriAI/litellm/pull/44751)
- fix(vertex_ai): apply regional endpoint uplift on image generation cost path by [@&#8203;nate-berri](https://github.com/nate-berri) in [#&#8203;44679](https://github.com/BerriAI/litellm/pull/44679)
- refactor(tests): extract Rust cache test split from [#&#8203;44714](https://github.com/BerriAI/litellm/issues/44714) by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44780](https://github.com/BerriAI/litellm/pull/44780)
- feat(proxy): cap batch file records, daily batch uploads, and per-file downloads by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;43632](https://github.com/BerriAI/litellm/pull/43632)
- feat(lens): add copy link button to trace header by [@&#8203;ishaan-berri](https://github.com/ishaan-berri) in [#&#8203;44749](https://github.com/BerriAI/litellm/pull/44749)
- test(integration): keep scripted upstream connections open past the proxy's keepalive by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44695](https://github.com/BerriAI/litellm/pull/44695)
- test(integration): basic translation cases for the bedrock_mantle route by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;44750](https://github.com/BerriAI/litellm/pull/44750)
- fix(chatgpt,github_copilot): refuse device-code login inside an event loop or worker thread by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;39585](https://github.com/BerriAI/litellm/pull/39585)
- feat(bedrock): add glm 5.3 cross-region rows and nova 2.5 sonic by [@&#8203;berriai-litellm-provider-info-sync](https://github.com/berriai-litellm-provider-info-sync)\[bot] in [#&#8203;44710](https://github.com/BerriAI/litellm/pull/44710)
- fix(responses): honor caller stream flag when provider forces SSE (internal copy of [#&#8203;34095](https://github.com/BerriAI/litellm/issues/34095)) by [@&#8203;devin-ai-integration](https://github.com/devin-ai-integration)\[bot] in [#&#8203;41235](https://github.com/BerriAI/litellm/pull/41235)
- refactor(cache): remove dead Cache.\_native_cache run…
Cartofante pushed a commit to CartoDB/litellm that referenced this pull request Oct 26, 2026
…etadata (BerriAI#47021)

* fix(vector-stores): keep proxy context out of provider vector store metadata

The proxy merged its request context (user_api_key_* fields, endpoint,
user_agent, requester_ip_address, litellm_api_version) and the router's
deployment info into the vector store request's metadata. For vector
stores that field is also OpenAI's own metadata, which is capped at 16
keys, so a store created with a team key was full on creation and every
later metadata update returned 400.

Vector store routes now keep that context in litellm_metadata, like
batches, files and responses, and the router does the same for
avector_store_create. Provider-side metadata holds only what the caller
sent.

Adds db_scripts/strip_vector_store_internal_metadata.py, an opt-in
script that removes the proxy-written keys from stores created before
this change. It is a dry run unless --apply is passed.

* fix(vector-stores): page the metadata cleanup script without recursion and tolerate non-string values

Listing every store recursed once per page, which overflows the interpreter stack on large projects. Pages are now walked iteratively. Metadata values are no longer required to be strings, and a malformed response exits 2 with a fixed message instead of a traceback that could echo metadata values.

* fix(vector-stores): read proxy agent id, tags and spend_logs_metadata from litellm_metadata

Vector store routes now keep proxy context in litellm_metadata, but the v3
limiter only read agent_id from metadata, and logging let provider metadata
tags or spend_logs_metadata replace the proxy's values. A string tags value
also crashed get_request_tags.

The limiter now prefers the proxy-resolved agent_id in litellm_metadata.
Logging combines list tags from both buckets (metadata first, deduplicated)
and merges dict spend_logs_metadata with litellm_metadata winning, ignoring
values of the wrong type.

* fix(vector-stores): narrow the logging fallback to mistyped caller values

The tag union and spend_logs_metadata merge changed logged tags and
spend_logs_metadata on every route that has both metadata buckets, deduped
tags quadratically, and stopped background interaction polling from keeping
string tags as sent. Caller values now win exactly as before, and the
proxy's litellm_metadata tags or spend_logs_metadata only replace a caller
value of the wrong type.

The limiter reads agent ids through a pydantic model instead of a cast and
ignores non-string ids.

* fix(vector-stores): log the proxy's full tag list on litellm_metadata routes

On routes that keep proxy context in litellm_metadata, the proxy builds
litellm_metadata.tags from the caller's tags plus key, team and header
tags, but get_request_tags preferred the caller's metadata.tags. A caller
sending metadata.tags on a vector store call dropped the key's tags from
request_tags, which tag spend tracking reads. get_request_tags now prefers
a non-empty litellm_metadata tag list, and falls back to metadata.tags as
before.

* fix(vector-stores): strip LiteLLM-written keys at the provider boundary instead of moving metadata buckets

Moving vector store proxy context into litellm_metadata broke shared readers
(agent limits, request tags, merged logging metadata), and fixing them
widened the change to every litellm_metadata route. This reverts the bucket
move, the router change and the reader fixes, so proxy context stays in
metadata exactly as on main.

Vector store create and update now drop the keys LiteLLM itself writes
(user_api_key*, requester and deployment keys, agent ids) from the metadata
sent to the provider, in the shared optional-param helper both paths use.
The cleanup script reuses the same key list.

* fix(vector-stores): pass non-string metadata keys through the provider metadata filter

* fix(vector-stores): strip LiteLLM-written metadata keys only on proxy and router calls

* fix(vector-stores): send the provider exactly the metadata the caller sent through the proxy

* fix(vector-stores): snapshot caller metadata from the raw request body and keep it out of logged request bodies

* fix(vector-stores): copy the parsed-body metadata when the raw request body cannot be reparsed

(cherry picked from commit 4846cfa)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:low Small, isolated, low-risk change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants