Commit Graph

38315 Commits

Author SHA1 Message Date
user
bef28aa789 chore(proxy): keep public AI hub unauthenticated 2026-05-01 19:07:21 -07:00
user
0c864880a8 Merge remote-tracking branch 'origin/litellm_internal_staging' into HEAD
# Conflicts:
#	litellm/proxy/middleware/prometheus_auth_middleware.py
#	tests/test_litellm/proxy/middleware/test_prometheus_auth_middleware.py
2026-05-01 11:34:59 -07:00
harish-berri
c8fb77f119
Merge pull request #25980 from BerriAI/litellm_metrics_auth
Fix /metrics hang when require_auth_for_metrics_endpoint is true and auth succeeds
2026-05-01 11:01:39 -07:00
Sameer Kankute
8300657af9
fix(mcp): preserve oauth2 m2m auth for tools routes (#26871)
* Fix tool/list M2M creds issue

* Fix tool call creds issue

* Fix greptile review

* Fix lint

* Fix lint

* Fix lint

* Fix lint
2026-05-01 10:26:10 -07:00
Mateo Wang
a155ea1e8a
Merge pull request #26076 from BerriAI/litellm_vertex_model_garden_xai_openapi
feat(vertex_ai): Model Garden OpenAPI for publisher model ids
2026-05-01 10:15:58 -07:00
harish-berri
32ab390e7e
Merge pull request #26202 from BerriAI/litellm_token_verification_query_opt
Litellm token verification query optimization
2026-05-01 10:10:07 -07:00
Mateo Wang
026ee8839c
Merge pull request #25270 from BerriAI/litellm_oss_staging_04_06_2026 2026-05-01 08:04:25 -07:00
Mateo Wang
6552e3c5c0
Merge pull request #26402 from BerriAI/litellm_azure-container-file-routing-fix 2026-05-01 07:50:37 -07:00
Mateo Wang
dddbfd54a1
Merge pull request #26950 from BerriAI/litellm_batch_model_id_mapping 2026-05-01 07:47:47 -07:00
Sameer Kankute
a94ae62706
Merge pull request #26984 from BerriAI/litellm_internal_staging
merge main
2026-05-01 19:03:59 +05:30
Sameer Kankute
e656b2a47b
correct model map 2026-05-01 18:07:33 +05:30
Sameer Kankute
71e2b6fcad
Fix reviews 2026-05-01 18:05:08 +05:30
Sameer Kankute
19813527fa
feat(vertex_ai): Model Garden OpenAPI for publisher model ids
- Route publisher/model ids (e.g. xai/grok) to .../endpoints/openapi; keep model in JSON body
- Add model_prices keys for vertex_ai/openai/xai/grok-*
- Document xAI Grok on vertex_partner (aligned with GPT-OSS)
- Add tests for create_vertex_url and body-model heuristic

Made-with: Cursor
2026-05-01 18:05:08 +05:30
Sameer Kankute
475220ecc6
Fix greptile review 2026-05-01 17:46:37 +05:30
Sameer Kankute
e0398cade7
fix(caching): defer streaming cache-hit callbacks for all stream=True
Success handlers already run when CustomStreamWrapper or
CachedResponsesAPIStreamingIterator finishes replay. Logging at
cache-hit time for acompletion/completion streaming duplicated spend
and callbacks. Align tests with deferred behavior.

Made-with: Cursor
2026-05-01 17:03:32 +05:30
Sameer Kankute
15288f3ae7
test: include response key in response.completed chunk for ID hook test
_base_process_chunk only encodes response IDs when parsed_chunk contains
a top-level "response" key. Align test_process_chunk_completed_response_
updates_id_and_usage_cost with that contract and test_base_responses_api_streaming_iterator.

Made-with: Cursor
2026-05-01 15:41:17 +05:30
Sameer Kankute
900ef454c8
test: fix Bedrock PDF tool-result bytes assertion in factory test
The test supplies a minimal PDF base64 payload but expected the wrong
constant (base64 for "test"). Assert against the same pdf_b64 value
and drop the unused import.

Made-with: Cursor
2026-05-01 15:35:30 +05:30
yuneng-jiang
eab0075353
Merge pull request #26805 from BerriAI/litellm_auth_bypass_tag_based_routing
add test(tag-routing): prevent header regex bypass for strict plain t…
2026-05-01 00:08:57 -07:00
Sameer Kankute
94162916a8
Fix lint and ruff 2026-05-01 12:14:53 +05:30
Sameer Kankute
d2346b5259
Fix prompt factory 2026-05-01 12:09:19 +05:30
Baqiao
ec38f2b17b
feat(xai): add parallel_tool_calls to supported params (#25106) 2026-05-01 12:06:56 +05:30
shubham-arora-clear
f49c91ea92
fix(bedrock): handle document content blocks in Converse API message conversion (#24644)
* fix(bedrock): handle document content blocks in Converse API message conversion

Document content blocks (used for PDF support) were silently dropped
during message conversion for Bedrock's Converse API. The content block
processing loop only handled text, image_url, and file types — document
blocks were skipped without warning, causing the model to respond as if
no document was provided.

Adds document block handling in three locations:
- Sync user message processing (_bedrock_converse_messages_pt)
- Async user message processing (_bedrock_converse_messages_pt_async)
- Tool result conversion (_convert_to_bedrock_tool_call_result)

Fixes #24641

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: use _validate_format for proper MIME type to Bedrock format mapping

Address Greptile review: naive media_type.split("/")[1] produced invalid
Bedrock format names for complex MIME types (e.g. OOXML → docx, text/plain
→ txt, text/markdown → md). Now reuses BedrockImageProcessor._validate_format
which handles all MIME types correctly via mimetypes + fallback.

Also fixes test assertions to expect correct Bedrock format values and adds
text/plain and text/markdown test cases.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: reject non-base64 document sources with a clear error

URL-type document sources (e.g. {"type": "url", "url": "..."}) would
crash with an opaque KeyError on missing 'media_type'. Guard at the top
of _process_document_message and raise a clear ValueError since Bedrock
Converse only supports base64-encoded document sources.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-01 12:06:53 +05:30
Gowtham Raj
262782f5b2
fix: resolve access group names in _filter_models_by_team_id (#25224)
The /v2/model/info endpoint (used by the UI's Models + Endpoints page)
was not resolving access group names when filtering models by team.

When a team has models: ["Group-A"] where "Group-A" is an access group,
_filter_models_by_team_id() passed it as a literal model name to
get_model_list(), which found no deployments with that name. This caused
the UI to show all models instead of only team-accessible ones.

The request-time auth path (model_in_access_group in auth_checks.py)
correctly resolves access groups via get_model_access_groups(). This
fix applies the same resolution in _filter_models_by_team_id() for both
the in-memory router lookup and the database fallback query.

Tests added:
- test_filter_resolves_access_group_names
- test_filter_resolves_mix_of_access_groups_and_literal_names
- test_filter_excludes_models_from_other_access_group
- test_filter_db_fallback_receives_resolved_model_names
2026-05-01 11:55:36 +05:30
Noah
8947a74e13
fix(cache): persist and replay streamed Responses API requests (#24580)
* fix(cache): persist and replay streamed Responses API requests

* Add focused coverage for streamed responses cache

* Cover streamed responses cache helper branches

* Exercise streamed responses cache edge branches
2026-05-01 11:55:36 +05:30
shin-berri
9397409c5b
Merge pull request #26961 from BerriAI/yj_bump_apr30
[Infra] Bump Versions
2026-04-30 21:46:50 -07:00
Yuneng Jiang
6da13efcec
uv lock 2026-04-30 21:40:09 -07:00
Yuneng Jiang
dd549d9c50
bump: version 0.4.69 → 0.4.70 2026-04-30 21:39:37 -07:00
Sameer Kankute
efa33bfe50
Merge pull request #26222 from BerriAI/litellm_anthropic-json-mode-nonstreaming-mixed-tools
fix(anthropic): json response_format + user tools non-streaming
2026-05-01 08:24:38 +05:30
Sameer Kankute
72ddbce50e
Merge pull request #25499 from BerriAI/litellm_vertex_request_metadata_labels
feat(vertex_ai): propagate metadata labels to embedding, Imagen, rerank
2026-05-01 08:20:55 +05:30
harish-berri
7c86e6073b Merge branch 'litellm_internal_staging' of https://github.com/BerriAI/litellm into litellm_auth_bypass_tag_based_routing 2026-05-01 01:49:39 +00:00
yuneng-jiang
ebbe2f49ff
Merge pull request #26826 from BerriAI/litellm_health_status_pagination
Add pagination controls to model health status
2026-04-30 18:45:40 -07:00
shivam
f4211ff7c4
Merge branch 'litellm_internal_staging' into litellm_metrics_auth 2026-04-30 18:41:09 -07:00
shivam
b4df0e2c03
Merge branch 'litellm_internal_staging' into litellm_batch_model_id_mapping 2026-04-30 18:40:17 -07:00
shivam
b75820b984
Merge branch 'litellm_internal_staging' into litellm_metrics_auth 2026-04-30 18:28:37 -07:00
Michael-RZ-Berri
05e6402bdb
Merge pull request #26829 from BerriAI/litellm_budgetEnforcementMultiPod
[Fix] Refresh Redis TTL on counter writes, skip stale in-memory in Redis
2026-04-30 18:14:41 -07:00
shivam
e72eac9176
Fix add_model_file_id_mappings when router returns single deployment dict
When model_info.id equals model_name (common for batch models), the router
resolves via has_model_id and returns one deployment dict instead of a list.
The dict branch incorrectly iterated deployment keys (model_name,
litellm_params, model_info), producing non-string values that broke
LiteLLM_ManagedFileTable validation on managed file upload.

Normalize list vs dict by wrapping single deployments and extracting
model_info.id for each response pair.

Add regression tests including the batch model id == model_name case.

Made-with: Cursor
2026-04-30 18:04:47 -07:00
Michael-RZ-Berri
e4fb325a3a
Merge pull request #26914 from BerriAI/litellm_googleGenContentHooks
Run pre_call_hook on Google generateContent endpoints
2026-04-30 17:53:38 -07:00
Michael Riad Zaky
4e26835098 Reorder counter invalidation to run after DB write 2026-04-30 17:50:58 -07:00
Michael Riad Zaky
ff2a938847 Match docstring style on async_increment_cache 2026-04-30 17:50:58 -07:00
Michael Riad Zaky
fed5f36a3d Invalidate spend counters on budget reset 2026-04-30 17:50:58 -07:00
Michael Riad Zaky
9f08db91f9 Refresh Redis TTL on counter writes and skip stale in-memory on Redis miss 2026-04-30 17:50:58 -07:00
ryan-crabbe-berri
76e43b7bb2
Merge pull request #26949 from BerriAI/litellm_/condescending-hawking-19bdeb
[Fix] Responses API: Omit Empty Body On DELETE
2026-04-30 17:49:30 -07:00
Yuneng Jiang
bd638245e8
[Fix] Responses API: Omit Empty Body On DELETE
The async/sync delete_response_api_handler always passed json=data into
httpx.delete, where data is {} from the transformer. httpx serializes that
to a 2-byte body. The Azure Responses DELETE endpoint now rejects any
request body with code: unexpected_body, breaking
test_basic_openai_responses_delete_endpoint on the llm_responses_api_testing
job. Build the kwargs dict and only set json= when data is truthy.

Add unit tests that patch httpx.delete and assert json/data are not in the
captured kwargs for the Azure DELETE path (sync and async).
2026-04-30 17:39:55 -07:00
yuneng-jiang
326bcd6cec
Merge pull request #26941 from BerriAI/litellm_/stoic-jemison-cbb6cf
[Test] Proxy E2E: Opt In To Client Mock Response For Model Access Tests
2026-04-30 17:35:16 -07:00
harish-berri
896e102464 fix linting 2026-05-01 00:32:10 +00:00
harish-berri
8671ec636b fix import error 2026-05-01 00:29:13 +00:00
harish-berri
7c8fe86fd9
Merge branch 'litellm_internal_staging' into litellm_token_verification_query_opt 2026-04-30 17:25:12 -07:00
yuneng-jiang
bdcc23853c
Merge pull request #26835 from stuxf/codex/cli-sso-flow-binding
chore(cli): tighten CLI SSO session flow
2026-04-30 17:10:27 -07:00
yuneng-jiang
15b7386859
Merge pull request #26815 from stuxf/fix/get-image-lfi-ssrf
chore(proxy): contain UI_LOGO_PATH / LITELLM_FAVICON_URL on unauthenticated asset endpoints
2026-04-30 17:10:15 -07:00
yuneng-jiang
71d5015975
Merge pull request #26827 from stuxf/fix/passthrough-auth-default
chore(passthrough): default auth=True and drop enterprise gate on the safe option
2026-04-30 17:06:37 -07:00