Commit graph

15506 commits

Author SHA1 Message Date
mateo-berri
f15bdfb669 chore: merge litellm_internal_staging into the mid-stream failure logging branch
Keeps staging's response-id keying next to the pass-through failure-path helpers
and types the read-only raw_bytes parameters as Sequence[bytes] so the merged tree
stays inside the lint budgets
2026-09-03 15:51:51 -07:00
mateo-berri
1d71e306cc test(router): assert a non-chat configured mode round-trips
With every kept get_configured_mode test using mode "chat", a Router that
answered "chat" for any non-blank configured mode passed all four of them
(the deleted #39630 pair's audio_speech case was the only test catching it).
Read the mode back as audio_speech on an unmapped model so the configured
value itself is what the test checks. Six hand-applied mutations of
Router.get_configured_mode, including that hardcoded-chat one, are now all
killed by the four surviving tests.
2026-09-03 15:38:15 -07:00
mateo-berri
24531ee576 refactor(cost): drop the docstrings that restate TokenRates and the new tests 2026-09-03 15:37:56 -07:00
ryan-crabbe-berri
a5b3bc887a
Merge pull request #39218 from BerriAI/litellm_lit_6593_access_group_attached_teams
fix(access_groups): derive attached teams from the team table and reject unknown team ids
2026-09-03 15:30:32 -07:00
mateo-berri
57da95a77c fix(proxy): apply default_vertex_config location before building the Vertex passthrough base URL
Routes without /projects/<project>/locations/<location>/ built the upstream host from the URL's
still-empty location and 500ed even with default_vertex_config set. Build the base URL once after
the configured project and location are applied, drop the hook that re-derived it afterwards, and
answer 400 with a fix-it message when no location is available at all.

Resolves LIT-6905
2026-09-03 15:27:47 -07:00
mateo-berri
ea12510f1a test(router): drop duplicate get_configured_mode test failing ruff F811
PRs #39630 and #39634 both added test_get_configured_mode_reads_deployment_model_info
to tests/test_litellm/test_router.py, so the staging tip defines it twice and the
required lint check fails with F811 on every PR synced past 321636ef5d.

Keep the four tests from #39634 (mode read, None for unset or unknown, no wildcard
pattern routing, malformed values treated as absent), which subsume the #39630 pair,
and delete that pair. Five hand-applied mutations of Router.get_configured_mode are
all still killed by the surviving tests.
2026-09-03 15:20:42 -07:00
ryan-crabbe-berri
4811041048 feat(proxy): add a search param to key, memory, audit, and spend log listings
GET /key/list?search= matches the key hash (a raw sk- key is hashed
first) or a case-insensitive alias substring, and key_hash= now hashes a
raw sk- value too. GET /v1/memory?search= matches a key prefix or an
exact memory_id. GET /audit?search= matches id, object_id, changed_by,
or changed_by_api_key. GET /spend/logs/ui?search= matches request_id
across all time and api_key, team_id, user, end_user, session_id, or
model_id inside the date window; session grouping is skipped while a
search is active.

Claude-Session: https://claude.ai/code/session_01Q5sbiogJzPcCRmYSbaHxZf
2026-09-03 15:20:13 -07:00
devin-ai-integration[bot]
942a46ffd7
fix(caching): don't trip redis circuit breaker on short timeout bursts (#38999)
* fix(caching): don't trip redis circuit breaker on short timeout bursts

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(caching): scope timeout duration gate to timeout failures and count breaker states per label

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(caching): reset the timeout streak on hard failures so stale timeouts cannot pre-age the duration gate

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: yassin <yassin@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-03 22:18:20 +00:00
mateo-berri
0bd2fd2a3b Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_lit6874_fireworks_perplexity_off_peak_pricing 2026-09-03 15:13:44 -07:00
devin-ai-integration[bot]
a0958d5c21
perf(auth): skip object permission DB lookup when no vector stores requested (#39347)
* perf(auth): skip object permission DB lookup when no vector stores requested

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test(auth): justify module patches

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: yassin <yassin@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-03 15:12:06 -07:00
devin-ai-integration[bot]
24666d8dbf
fix(docker): match USE_DDTRACE case-insensitively and route build_from_pip through prod_entrypoint.sh (#39344)
* fix(docker): match USE_DDTRACE case-insensitively and route build_from_pip through prod_entrypoint.sh

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test(docker): run build_from_pip ENTRYPOINT and CMD through the shipped prod_entrypoint.sh

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: yassin <yassin@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-03 15:10:33 -07:00
devin-ai-integration[bot]
35d20468cd
fix(mcp): normalize a schemed authentication_token on the v2 and OpenAPI static paths (#39345)
Co-authored-by: yassin <yassin@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-03 15:09:08 -07:00
devin-ai-integration[bot]
6da516e6f3
fix(mcp): strip inbound auth scheme case-insensitively before token exchange (#39346)
* fix(mcp): strip inbound auth scheme case-insensitively before token exchange

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test(mcp): type the fake credential provider params in token exchange scheme tests

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: yassin <yassin@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-03 15:08:02 -07:00
yuneng-jiang
bed4086619
Merge pull request #33536 from BerriAI/litellm_/rbac-batches-action-items-c00ade
feat(proxy): enforce team isolation for provider-format batch ids and output files
2026-09-03 15:07:59 -07:00
devin-ai-integration[bot]
f2f65a6e8b
fix(mcp): resolve OAuth broker endpoints by server_id with IP access checks (#39432)
* fix(mcp): resolve OAuth broker endpoints by server_id with IP access checks

Resolve named OAuth lookups through server IDs while retaining client IP checks\n\nCo-authored-by: KK291860 <krishnakumar.kocherykumaran@sephora.com>

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* ci: retrigger e2e pipeline

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: yassin <yassin@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-03 15:04:45 -07:00
mateo-berri
f9e41470d6 test(cost): type the off-peak fixture helpers with OffPeakPricing 2026-09-03 15:03:10 -07:00
Riddhi04
6981ccf0ca fix(proxy): make URL model authoritative for Bedrock path-routed passthrough actions
The allowlist check read model from the request body first, while
bedrock_llm_proxy_route dispatches purely on the path model for invoke,
converse, and their streaming variants. A caller could put an allowed
model in the JSON body while targeting a disallowed model in the URL and
slip past the check. count_tokens keeps reading from the body since its
route has no model segment in the path.
2026-09-03 15:02:49 -07:00
Riddhi04
534ab1628d fix(proxy): enforce model access checks on Bedrock passthrough routes
get_model_from_request could not resolve a model for /bedrock/... routes since it only checked the JSON body's model field and a small set of URL regexes, none matching Bedrock's passthrough path. This let common_checks skip the key/project model allowlist entirely for any Bedrock passthrough action (invoke, converse, and their streaming variants), while the same model was correctly blocked on /v1/chat/completions

Extract the model from the Bedrock endpoint path using the same helper the passthrough handler itself relies on, so the existing allowlist check applies uniformly across auth methods and call paths
2026-09-03 15:02:49 -07:00
mateo-berri
0f759c56f0 fix(proxy): bill partial usage on failed Vertex and Gemini pass-through streams 2026-09-03 15:00:08 -07:00
Mateo Wang
3244a034ac
Merge pull request #39534 from BerriAI/litellm_fix_responses_queued_id_encryption
fix(responses): encrypt the response id on every streamed event
2026-09-03 14:54:52 -07:00
moe-berri
321636ef5d
Merge pull request #39634 from BerriAI/litellm_fix_router_mode_coverage
test(router): cover configured mode lookup
2026-09-03 14:52:07 -07:00
mateo-berri
2df5f4a7c8 Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_fix_responses_queued_id_encryption
# Conflicts:
#	type-discipline-budget.json
2026-09-03 14:45:19 -07:00
devin-ai-integration[bot]
ab44e8d602
fix(team_endpoints): stop partial /team/update from wiping team metadata (#36328)
Co-authored-by: yassin <yassin@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-03 14:44:09 -07:00
mateo
f292667601 fix(registry): mark gpt-daybreak-*-latest as responses mode to match their Responses-only endpoints
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-03 21:41:12 +00:00
devin-ai-integration[bot]
959e730d55
fix(agents): hide agents from non-admins who were never granted them (#39636)
Listing agents (GET /v1/agents and MCP agent_search) treated the absence of any
agent grant on the key or team as permission to see every agent. Non-admin keys
now list only the union of explicit grants, and dashboard sessions resolve that
union through the user's real teams and user row instead of the shared
dashboard team. Proxy admins still see everything and direct access to a named
agent is unchanged.

Resolves LIT-6862

Co-authored-by: yassin <yassin@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-03 14:40:36 -07:00
mateo-berri
19da217167 fix(openai): mint workload identity tokens for PrivateLink and regional api.openai.com hosts 2026-09-03 14:38:47 -07:00
yuneng-jiang
918ada8d57
Merge pull request #39611 from BerriAI/litellm_/dazzling-ellis-c9e9ff
test(team-race): wait on pg_locks instead of a fixed sleep
2026-09-03 14:38:41 -07:00
Mateo Wang
10aaea5fae
Merge pull request #39243 from BerriAI/litellm_fix_guardrail_event_hook_resync
fix(guardrails): rebuild the serving worker guardrail on PUT instead of patching it in place
2026-09-03 14:37:52 -07:00
yucheng-berri
e6e5be0989
fix(cache): use sync Redis batch reads (#39358)
* fix(cache): use sync Redis batch reads

* fix(cache): type sync circuit breaker decorator

* test(cache): isolate sync Redis breaker coverage

* fix(cache): keep batch result merge budget compliant

* style(cache): format batch read

* style(cache): satisfy type-discipline budget

* test(cache): mock Redis before sync breaker setup

* style(cache): avoid mutable batch placeholder

* test(cache): document sync breaker patch target

* fix(types): widen batch result params to Sequence

* fix(cache): report real callers through breaker guards

The sync guard's lambda and runner frames replaced the actual caller in
_get_call_stack_info, so Redis service logs attributed every guarded call
to the guard machinery. Skip guard-internal frames when walking the stack
and ratchet the lint budgets this branch lowered

* style(imports): import Sequence from collections.abc

* test(cache): cover concurrent sync and async Redis batch reads

* refactor: build sync batch_get_cache results as tuples to satisfy the LIT002 gate

* chore: ratchet budgets after staging merge

* fix: preserve DualCache batch list contract

* style: format DualCache batch result

* fix: satisfy mutable collection lint gate

* fix(caching): keep breaker guard-frame skipping in bytecode-only deploys

* chore: preserve staging budget ratchets

* test(cache): isolate sync Redis batch reads

* fix(cache): isolate service hook failures

* fix(cache): preserve sync batch fallback on open breaker
2026-09-03 14:37:48 -07:00
Mateo Wang
117ef33a41
Merge pull request #39541 from BerriAI/litellm_spend_logs_bridged_streaming_message_id
fix(anthropic_messages): key bridged streaming spend rows on the streamed msg_ id
2026-09-03 14:36:51 -07:00
Mateo Wang
3a00e8020a
Merge pull request #39464 from BerriAI/litellm_containers_error_passthrough_pagination
fix(containers): pass upstream error status through and forward list pagination params
2026-09-03 14:36:44 -07:00
Mateo Wang
2e5a54f28c
Merge pull request #39538 from BerriAI/litellm_redact_optional_params_verbose_line
fix(utils): redact credentials nested in extra_body on the verbose optional-params line
2026-09-03 14:36:39 -07:00
Mateo Wang
beaf2d4043
Merge pull request #39452 from BerriAI/litellm_fix_rag_query_store_credentials
fix(rag): forward the managed vector store's params to the search call
2026-09-03 14:36:34 -07:00
Mateo Wang
c053fac7b7
Merge pull request #39466 from BerriAI/litellm_prisma_timeout_killpg
fix(proxy-extras): kill the whole Prisma process group when a command times out
2026-09-03 14:36:31 -07:00
Mateo Wang
f7691a3d85
Merge pull request #39411 from BerriAI/litellm_bedrock_bearer_skip_sigv4_chain
fix(bedrock): skip the SigV4 credential chain when a bearer token is configured
2026-09-03 14:36:27 -07:00
Mateo Wang
aa9f3d927b
Merge pull request #39526 from BerriAI/litellm_mask_verbose_request_kwargs
fix(utils): redact credential kwargs from the set_verbose request line
2026-09-03 14:36:25 -07:00
Mateo Wang
00faaa17f4
Merge pull request #39495 from BerriAI/litellm_vector_store_hook_router_injection
fix(vector-stores): survive a failing vector store search in the chat completions hook
2026-09-03 14:36:19 -07:00
Mateo Wang
a4fc936b9d
Merge pull request #39491 from BerriAI/litellm_fix_failing_request_slowdown
fix(router): keep retry breadcrumbs per request and out of the request snapshot
2026-09-03 14:36:16 -07:00
Mateo Wang
c67fe2d3bf
Merge pull request #39521 from BerriAI/litellm_fix_guardrail_error_stringified_none
fix(proxy): stop putting the literal string "None" in error payloads
2026-09-03 14:36:14 -07:00
Mateo Wang
8cc131ad39
Merge pull request #38984 from BerriAI/litellm_fix_search_results_with_guardrails
fix: attach vector store search_results when a guardrail is registered
2026-09-03 14:36:09 -07:00
Mateo Wang
29ea2bd2cd
Merge pull request #39426 from BerriAI/litellm_azure_ai_grok_4_6_cost_map
feat(azure_ai): add grok-4.6 to the model cost map
2026-09-03 14:36:07 -07:00
Mateo Wang
f5f2781c6f
Merge pull request #39543 from BerriAI/litellm_fix_guardrail_mapping_test_order_dependence
fix(guardrails): remove the module-global translation mapping that leaked between tests
2026-09-03 14:36:03 -07:00
Mateo Wang
9eaa6e345e
Merge pull request #39510 from BerriAI/litellm_coerce_multipart_numeric_fields
fix(proxy): parse numeric multipart fields on /v1/images/edits back into numbers
2026-09-03 14:36:00 -07:00
Mateo Wang
0c8510d47c
Merge pull request #39511 from BerriAI/litellm_spend_logs_provider_response_id
fix(spend_tracking): key /v1/messages spend rows on the msg_ id the client received
2026-09-03 14:35:50 -07:00
mateo-berri
2f5d9ae194 Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_fix_responses_queued_id_encryption
# Conflicts:
#	type-discipline-budget.json
2026-09-03 14:29:02 -07:00
Yuneng Jiang
4a3190b68d
Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_/dazzling-ellis-c9e9ff
# Conflicts:
#	tests/openai_endpoints_tests/test_e2e_openai_responses_api.py
2026-09-03 14:18:37 -07:00
Mateo Wang
8699998c9e
Merge pull request #39625 from BerriAI/litellm_lit6873_vertex_passthrough_api_version
fix(vertex): add the API version to versionless project routes on the Vertex passthrough
2026-09-03 14:16:37 -07:00
Mateo Wang
1ea95fa18f
Merge pull request #39617 from BerriAI/litellm_fix_responses_background_stream_flake
test(responses): bound the background stream cancel e2e so an upstream stall skips fast
2026-09-03 14:16:08 -07:00
ryan-crabbe-berri
ed9865c945
Merge pull request #39604 from BerriAI/litellm_lit_4738_users_search_by_id
fix(ui): let the Internal Users search box match user_id as well as email
2026-09-03 14:14:22 -07:00
mateo
8d82f28c85 test(ocr): register the azure ocr4 mixed-rate cost test in the parity ledger
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-03 21:14:18 +00:00