Commit graph

51402 commits

Author SHA1 Message Date
yujonglee
bd82d73ca1
Merge pull request #41981 from BerriAI/litellm_rust_typed_pyo3
refactor(rust): use typed pyo3 APIs instead of getattr/import strings
2026-09-19 10:09:34 -07:00
yujonglee
209a780992
Merge pull request #41977 from BerriAI/litellm_rust_sealed_request_textract
feat(rust): add Amazon Textract to litellm.ocr and sign provider requests after host hooks
2026-09-19 09:53:07 -07:00
Yujong Lee
619a19b8a2 refactor(rust): use typed pyo3 APIs instead of getattr/import strings
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-19 16:46:34 +00:00
kerry-berri
5d28684016
Merge pull request #41966 from BerriAI/litellm-providers/price-sync-azure
chore(prices): sync Azure prices: 5 models, 5 deprecated
2026-09-19 09:41:53 -07:00
kerry-berri
6718fd67fb
Merge pull request #41328 from BerriAI/litellm_e2e_cost_calculation_scripted_provider
test(integration): literal request/response cost tracking suite on a test-owned cost map
2026-09-19 09:40:04 -07:00
Mateo Wang
f9d4979d21
Merge pull request #41946 from BerriAI/litellm_deflake_20260919 2026-09-19 09:38:25 -07:00
Yujong Lee
eb502824f0 fix stuff 2026-09-19 09:32:46 -07:00
berriai-litellm-provider-info-sync[bot]
196a631835
chore(prices): sync Azure prices: 5 models, 5 deprecated
azure/eu/gpt-4.1-nano: deprecation_date
azure/gpt-4.1-nano: deprecation_date
azure/gpt-4.1-nano-2025-04-14: deprecation_date
azure/us/gpt-4.1-nano: deprecation_date
azure/us/gpt-4.1-nano-2025-04-14: deprecation_date
2026-09-19 16:30:59 +00:00
joshua-berri
f08b787685
Merge pull request #41975 from BerriAI/litellm_fix_azure_snapshot_fallback_test
test(utils): isolate dated model fallback from pricing additions
2026-09-19 16:20:51 +00:00
Yujong Lee
c404bed9f0 feat(rust): add Amazon Textract to litellm.ocr and sign provider requests after host hooks
Add an aws_textract OCR provider on the Rust route, with no Python path. The
detect-document-text model returns plain lines and analyze-document renders
layout and tables as markdown. Both use Textract's synchronous API, so a
multi-page PDF or TIFF is rejected with an error that names the single-page
limit. A call with no region fails instead of falling back to Bedrock's default

SigV4 covers the request body, and host hooks can rewrite that body before it
is sent. litellm-http now has OutboundRequest, which serializes the body once,
shows those bytes to a RequestSigner and is the only thing a route can send.
Chat, audio transcription and OCR build it after their hooks ran, so a callback
that redacts the body still produces a valid Bedrock or Textract signature

ChatCompletionsAuth and AudioTranscriptionAuth are replaced by
litellm_auth::RequestAuth, and one helper in core turns it into a signed or
unsigned request. Audio transcription now signs only the AWS header set and
rejects a forwarded header that SigV4 computes, the same as chat

The OCR catalog routes aws_textract as Rust required, and the dispatch context
reads the provider from the model prefix so a provider scoped rule can match
2026-09-19 09:11:52 -07:00
yujonglee
362be56bb0
Merge pull request #41969 from BerriAI/litellm_rust_settings_layers
refactor(rust): centralize layered settings resolution
2026-09-19 09:00:19 -07:00
yuneng-jiang
6ed9deb4d7
Merge pull request #41931 from BerriAI/litellm_settings_store_immutable
fix(proxy): refuse runtime writes to config-owned settings
2026-09-19 09:00:13 -07:00
Yujong Lee
0d0c63dde1 fix(rust): suppress private settings resolver lint
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-19 15:48:07 +00:00
Mateo Wang
638e085dba
Merge pull request #41971 from BerriAI/litellm_fix_dated_snapshot_test_exact_key
test(cost): point dated snapshot tests at a date the cost map cannot carry
2026-09-19 08:39:20 -07:00
Joshua Valluru
0e7ba74f95 test(utils): isolate dated model fallback from pricing additions 2026-09-19 08:39:02 -07:00
Yujong Lee
e2397e7dd3 fix(rust): drop http_proxy under CGI where environment names ignore case 2026-09-19 08:37:27 -07:00
Yujong Lee
1669213eb5 fix(rust): read OCR secrets from the process environment and decline when a secret manager is readable
The OCR route called back into Python's get_secret_str for every env
fallback. With no secret manager configured that is os.environ behind a GIL
hop, and with one configured it blocked a tokio worker on vault I/O and also
sent the Azure and GCP identity variables, which Python reads with os.getenv,
to the vault. The other Rust routes already read the process environment.

Read the process environment here too. When litellm would read secrets from
a secret manager, decline the Rust route so the Python route serves the call
with the vault-backed keys
2026-09-19 08:32:46 -07:00
Yujong Lee
b341d21a76 fix(rust): redact proxy credentials in Debug and build the proxy matcher once
EnvironmentProxies holds raw proxy URLs, which can carry user:password, and
it sits inside HttpSettings and HttpClientConfig, so any {:?} of those would
print the password. Derive veil's Redact like the auth crate does. NO_PROXY
stays readable because it holds no credentials.

The media fetcher also rebuilt the hyper-util matcher for every URL and
redirect hop. Build it once when the fetcher is created
2026-09-19 08:30:35 -07:00
Yujong Lee
0074b943a6 fix(rust): read proxy env vars in urllib's order
Python resolves proxies through urllib.request.getproxies_environment: the
lowercase variable wins, an empty value is unset, an empty lowercase value
clears the uppercase one, and under CGI only the uppercase HTTP_PROXY is
forgotten because a client can set it with a Proxy header. The Rust route
took the uppercase variable even when empty and dropped every proxy under
CGI, so provider calls could skip a required egress proxy
2026-09-19 08:30:11 -07:00
mateo-berri
c735cc3db1 test(cost): point dated snapshot tests at a date the cost map cannot carry
The azure row of test_get_model_info_falls_back_from_dated_snapshot_to_undated_entry used gpt-5.6-luna-2026-07-09, which main's cost map carries as an exact azure key, so the lookup returned the dated key and the required misc test job failed on main. All three dated snapshot tests now use a 2099-01-01 snapshot date, so they keep exercising the strip path whatever real snapshots the map gains
2026-09-19 08:00:12 -07:00
Yujong Lee
0a00021722 fix(rust): resolve Mistral OCR credentials in Python's env order
Python resolves the Mistral key as api_key, MISTRAL_AZURE_API_KEY, then
MISTRAL_API_KEY, and the base as api_base, MISTRAL_AZURE_API_BASE, then
the public endpoint, never reading MISTRAL_API_BASE. Native OCR read
MISTRAL_API_KEY and MISTRAL_API_BASE instead, so with the Azure pair set
it sent the call to a different endpoint with a different key. Empty env
values now fall through like Python's `or` chain.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 07:33:02 -07:00
Mateo Wang
8c4c394ecc
Merge pull request #41960 from BerriAI/litellm_deepseek_off_peak_pricing
fix(cost): bill DeepSeek V4.1 Flash and V4 Pro at off-peak rates outside peak hours
2026-09-19 06:45:46 -07:00
Mateo Wang
12593788a2
Merge pull request #41949 from BerriAI/litellm_bulk_update_keys_keep_unset_fields
fix(proxy): /key/bulk_update writes only the fields each item carries
2026-09-19 06:08:54 -07:00
Mateo Wang
aa0ffee00f
Merge pull request #41423 from BerriAI/litellm_strip_dated_snapshot_cost_lookup
fix(cost): resolve dated openai/azure snapshots to their undated cost map entry
2026-09-19 05:51:46 -07:00
Mateo Wang
f15dba2e2f
Merge pull request #41943 from BerriAI/litellm_unknown_model_spend_logs_outside_router
fix(proxy): keep the raw client model out of spend logs for rejections outside the router
2026-09-19 05:15:26 -07:00
mateo-berri
dc02e5f5fb test(proxy): stub the existing key's team in the bulk item policy tests 2026-09-19 05:12:12 -07:00
mateo-berri
df6a222cb8 fix(proxy): validate bulk object_permission against the key's team as /key/update does 2026-09-19 04:59:26 -07:00
Mateo Wang
b8d837b2ef
Merge pull request #40147 from abhirup7/fix/azure-image-generation-entra-id-auth
fix(azure): send the resolved Entra ID token on image generation requests
2026-09-19 04:44:07 -07:00
mateo-berri
aadadc647d Merge remote-tracking branch 'origin/main' into litellm_unknown_model_spend_logs_outside_router
# Conflicts:
#	litellm/proxy/openai_files_endpoints/common_utils.py
2026-09-19 04:43:19 -07:00
Mateo Wang
dad8c32d23
Merge pull request #41940 from BerriAI/litellm_rag_ingest_registry_store
fix(rag): resolve registry stores on /v1/rag/ingest and reject providers without ingestion
2026-09-19 04:42:54 -07:00
Mateo Wang
40f51df90f
Merge pull request #41953 from BerriAI/litellm_bridge_drop_tool_search
fix(responses): drop tool_search and local_shell in the chat completions bridge
2026-09-19 04:42:28 -07:00
mateo-berri
e0db862781 fix(cost): bill DeepSeek V4.1 Flash and V4 Pro at their off-peak rates outside peak hours
DeepSeek charges half the listed rate outside 01:00-04:00 and 06:00-10:00 UTC
Monday to Friday, so every deepseek-flash, deepseek-v4-flash,
deepseek-v4-flash-vision-exp, and deepseek-v4-pro entry now carries an
off_peak_pricing block with those windows and the halved input, output, and
cache-hit rates. The generated cost map schema picks up the block, and the
regression tests pin the peak and off-peak cost of one call at fixed moments.
2026-09-19 04:31:55 -07:00
mateo-berri
aef209963a fix(s3_vectors): embed registered-store ingests with the store's embedding model
The S3 Vectors ingestion embedded every chunk with the request's
embedding.model or the default, never the embedding_model the store was
registered with, while search on the same store embeds with the
registered model. A registered store uploaded to by id alone therefore
embedded with the wrong model and AWS rejected the vectors on the
dimension mismatch. The store's embedding model now wins for S3 Vectors
ingestion through a helper next to the one search already uses
2026-09-19 04:31:15 -07:00
Mateo Wang
1f6e5b60b5
Merge pull request #41952 from BerriAI/litellm_masker_memo_depth_fail_closed
fix(masker): memoize shared nodes and fail closed past the depth cap
2026-09-19 04:20:17 -07:00
mateo-berri
e74a5e0c21 test(rag): drop the docstrings from the registered-store ingest tests 2026-09-19 04:10:49 -07:00
Mateo Wang
43e835c3ca
Merge pull request #41950 from BerriAI/litellm_cost_callback_bounded_error_msg
fix(proxy): keep request metadata out of the cost tracking failure alert
2026-09-19 04:08:14 -07:00
mateo-berri
aceae8e566 test: drop the recursive detector allowlist entry for the removed _walk_payload 2026-09-19 04:07:07 -07:00
mateo-berri
ccb48eb528 refactor(s3_vectors): keep the ingest target derivation under llms/s3_vectors
The ingest-side bucket and index precedence now sits next to the shared
store id split instead of under litellm/rag/, where provider-specific
parsing does not belong.
2026-09-19 04:04:59 -07:00
Mateo Wang
c39ec34553
Merge pull request #41234 from BerriAI/litellm_invalid_tool_choice_400
fix(utils): reject an untranslatable tool_choice with a 400 instead of a 500
2026-09-19 04:02:04 -07:00
mateo-berri
093fb78baf fix(masker): cut cycles at the first back-edge and walk pydantic dumps without self-recursion 2026-09-19 03:58:47 -07:00
mateo-berri
d437cd662b fix(proxy): placeholder the metadata copied into a placeholdered row's stored request body 2026-09-19 03:56:44 -07:00
mateo-berri
f982d3e046 docs(proxy): state /key/bulk_update null handling as /key/update parity 2026-09-19 03:55:48 -07:00
mateo-berri
5477dbe74c fix(responses): drop tool_search and local_shell in the chat completions bridge
Hosted Responses API tools with no Chat Completions equivalent were forwarded
verbatim, so Codex 0.140+ got a 400 from the provider on every turn. The bridge
now drops tool_search and local_shell the same way it drops computer_use,
image_generation, and shell, and also drops parallel_tool_calls when no chat
tools remain, since chat completions only accepts it alongside tools
2026-09-19 03:55:23 -07:00
mateo-berri
e4d01d1d78 fix(s3_vectors): reject a store id with an empty bucket or index part
A "bucket:" or ":index" id split into an empty name, so ingestion silently
generated a fresh index and search sent the empty name to AWS. Both sides now
raise the existing format error through the shared helper.
2026-09-19 03:52:48 -07:00
Mateo Wang
db04e7909e
Merge pull request #41934 from BerriAI/litellm_mistral_ocr_batches
feat(batches): support Mistral files/batches and per-page OCR batch cost tracking (internal copy of #40484)
2026-09-19 03:51:27 -07:00
Mateo Wang
aa3e6df086
Merge pull request #41926 from BerriAI/litellm_fix_41515
fix(proxy): register transcribe as a known provider for model grants
2026-09-19 03:47:36 -07:00
mateo-berri
b746ac4456 fix(proxy): accept object_permission on /key/bulk_update items instead of 422 2026-09-19 03:44:07 -07:00
Mateo Wang
165255e671
Merge pull request #41947 from BerriAI/litellm_any_sweep_20260919
refactor(types): replace Any with proven types in 6 files
2026-09-19 03:41:43 -07:00
mateo-berri
e2d118aaf8 fix(rag): read a registered S3 Vectors store's bucket and index from its id
A registered S3 Vectors store usually carries only its "bucket:index" id,
and the previous commit stopped forwarding the caller's bucket and index for
a managed store, so ingesting into one raised KeyError 'vector_bucket_name'.
The ingestion now derives both from vector_store_id with the rule the search
side already uses, explicit keys still winning. The caller's
litellm_credential_name is dropped for a managed store too, since it expands
into api_key and api_base, and max_embedding_requests_per_min joins the
per-upload options a caller may still set.
2026-09-19 03:38:20 -07:00
Mateo Wang
2815d80fa4
Merge pull request #41948 from BerriAI/litellm_unit_shard_per_test_timeout
ci(unit): fail a hung test in 120s with a traceback instead of idling the shard to its step timeout
2026-09-19 03:36:37 -07:00