Commit graph

5878 commits

Author SHA1 Message Date
shin-bot-litellm
559cb675a6 fix(test): accept both AuthenticationError and InternalServerError in batch_completion test
The test uses an invalid API key to verify that batch_completion returns
exceptions rather than raising them. However, depending on network conditions,
the error may be:
- AuthenticationError: API properly rejected the invalid key
- InternalServerError: Connection error occurred before API could respond

Both are valid outcomes for this test case.
2026-01-31 21:35:08 +00:00
shin-bot-litellm
dff7f83e7c fix(proxy): resolve 'multiple values for keyword argument' in batch cancel and file retrieve
- batch_endpoints.py: Pop batch_id from data before creating CancelBatchRequest
  to avoid duplicate batch_id when data already contains it from earlier cast

- files_endpoints.py: Pop file_id from data before calling afile_retrieve
  to avoid duplicate file_id when data was initialized with {"file_id": file_id}

- test_claude_agent_sdk.py: Disable bedrock-nova-premier test as it requires
  an inference profile for on-demand throughput (AWS limitation)

Fixes: e2e_openai_endpoints tests (test_batches_operations, test_file_operations)
Fixes: proxy_e2e_anthropic_messages_tests (nova-premier model skip)
2026-01-31 21:26:29 +00:00
Shin
586b041837 fix(test): update test_chat_completion to handle metadata in body
The proxy now adds metadata to the request body during processing.
Updated test to compare fields individually and strip metadata from
body comparison.

Fixes litellm_proxy_unit_testing_part2 CI failure.
2026-01-31 21:25:39 +00:00
shin-bot-litellm
5bd5df3ca6
fix(test): add router.acancel_batch coverage (#20183)
- Add test_router_acancel_batch.py with mock test for router.acancel_batch()
- Add _acancel_batch to ignored list (internal helper tested via public API)

Fixes CI failure in check_code_and_doc_quality job
2026-01-31 12:39:19 -08:00
Ishaan Jaffer
38f5ae8f05 test_budget_reset_and_expires_at_first_of_month 2026-01-31 12:36:53 -08:00
yuneng-jiang
b7c45991d8 Fix health endpoints 2026-01-31 12:25:04 -08:00
Ishaan Jaffer
66c7233f61 test_get_session_iterator_thread_safety 2026-01-31 12:05:09 -08:00
Ishaan Jaffer
f1b16d240e test_delete_vector_store_checks_access 2026-01-31 12:05:09 -08:00
Ishaan Jaffer
280e8a9cd7 test_get_image_non_root_uses_var_lib_assets_dir 2026-01-31 12:05:09 -08:00
yuneng-jiang
a81af9a875
Merge pull request #20177 from BerriAI/litellm_global_fallback_fix
[Fix] Model Name During Fallback
2026-01-31 11:59:54 -08:00
yuneng-jiang
c9261c9f37 fix model name during fallback 2026-01-31 11:46:58 -08:00
Ishaan Jaffer
8b575f4656 test_bedrock_nova_grounding_web_search_options_non_streaming 2026-01-31 11:23:48 -08:00
Ishaan Jaffer
3759ea2de8 test_increment_top_level_request_and_spend_metrics 2026-01-31 11:10:28 -08:00
shin-bot-litellm
fea40925cf
test: remove hosted_vllm from OpenAI client tests (#20163)
hosted_vllm no longer uses the OpenAI client, so these tests
that mock the OpenAI client are not applicable to hosted_vllm.

Removes hosted_vllm from:
- test_openai_compatible_custom_api_base
- test_openai_compatible_custom_api_video
2026-01-31 10:10:45 -08:00
shin-bot-litellm
2780e2f81e
litellm_fix(test): update Prometheus metric test assertions with new labels (#20162)
This fixes the failing litellm_mapped_enterprise_tests (metrics/logging) job.

Recent commits added new labels to several Prometheus metrics (model_id, client_ip, user_agent)
but the test assertions weren't fully updated to expect these new labels.

Tests fixed:
- test_async_post_call_failure_hook
- test_async_log_failure_event
- test_increment_token_metrics
- test_log_failure_fallback_event
- test_set_latency_metrics
- test_set_llm_deployment_success_metrics

Labels added to test assertions:
- model_id for token metrics (litellm_tokens_metric, litellm_input_tokens_metric, litellm_output_tokens_metric)
- model_id for latency metrics (litellm_llm_api_latency_metric)
- model_id for remaining requests/tokens metrics
- model_id for fallback metrics
- model_id for overhead latency metric
- client_ip and user_agent for deployment failure/total/success responses
- client_ip and user_agent for proxy failed/total requests metrics
2026-01-31 10:09:35 -08:00
yuneng-jiang
ae2cf7104d
Merge pull request #20086 from BerriAI/litellm_watsonx_inte_fix
[Fix] Add WATSONX_ZENAPIKEY to WatsonX credentials
2026-01-31 09:13:42 -08:00
yuneng-jiang
c4a2745983
Merge pull request #20031 from BerriAI/litellm_new_badge_dot
[Fix] UI - Vector Store: Allow Config Defined Models to Be Selected
2026-01-31 09:13:29 -08:00
shin-bot-litellm
e35e6504fc
litellm_fix(test): fix router silent experiment tests to properly mock async functions (#20140) 2026-01-31 07:39:05 -08:00
shin-bot-litellm
10194d96cf
litellm_fix: handle unknown models in Azure AI cost calculator (#20150) 2026-01-31 07:37:48 -08:00
shin-bot-litellm
395ad9bdc1
litellm_fix(test): add acancel_batch to Azure SDK client initialization test (#20143) 2026-01-31 07:34:54 -08:00
shin-bot-litellm
7db4594200
litellm_fix(test): allow comment field in schema and exclude robotics models from tpm check (#20139) 2026-01-31 07:32:33 -08:00
shin-bot-litellm
14a5706131
litellm_fix(test): fix Bedrock tool search header test regression (#20135) 2026-01-31 00:44:47 -08:00
shin-bot-litellm
013b4701f4
litellm_fix(test): fix Azure AI cost calculator test - use Logging class (#20134) 2026-01-31 00:43:53 -08:00
shin-bot-litellm
ecd0202f70
litellm_fix(e2e): disable bedrock-converse-claude-sonnet-4.5 model in tests (#20131) 2026-01-31 00:32:42 -08:00
Ishaan Jaff
5345a763c2
[Feat] v2 - Logs view with side panel and improved UX (#20091)
* init: azure_ai/azure-model-router

* show additional_costs in CostBreakdown

* UI show cost breakdown fields

* feat: dedicated cost calc for azure ai

* test_azure_ai_model_router

* docs azure model router

* test azure model router

* fix transfrom

* Add transform file

* fix:feat: route to config

* v0 - looks decen view

* refactored code

* fix ui

* fixes ui

* complete v2 viewer

* address feedback

* address feedback
2026-01-30 18:34:13 -08:00
Alexsander Hamir
a11b043f33
fix(proxy): resolve high CPU when router_settings in DB by avoiding REGISTRY.collect() in PrometheusServicesLogger (#20087) 2026-01-30 14:01:45 -08:00
yuneng-jiang
1f5b875181 Add WATSONX_ZENAPIKEY 2026-01-30 13:52:56 -08:00
Ishaan Jaff
6897d5f59e
[Feat] Add async_post_call_response_headers_hook to CustomLogger (#20083)
* Add async_post_call_response_headers_hook to CustomLogger (#20070)

Allow CustomLogger callbacks to inject custom HTTP response headers
into streaming, non-streaming, and failure responses via a new
async_post_call_response_headers_hook method.

* async_post_call_response_headers_hook

---------

Co-authored-by: michelligabriele <gabriele.michelli@icloud.com>
2026-01-30 12:44:44 -08:00
Harshit Jain
481bb4b6ce
fixes: ci pipeline router coverage failure (#20065) 2026-01-30 11:55:49 -08:00
Sameer Kankute
6e9210381c
Merge pull request #20058 from BerriAI/litellm_vertex_ai_prompt-caching-scope-2026-01-05,
Fix: remove unsupported prompt-caching-scope-2026-01-05 header for vertex ai
2026-01-30 20:32:00 +05:30
Sameer Kankute
8363a26d2e Fix: remove unsupported prompt-caching-scope-2026-01-05 header for vertex ai 2026-01-30 17:33:40 +05:30
Sameer Kankute
1877483deb
Merge pull request #20056 from BerriAI/litellm_vllm_embedding
Fix: vllm embedding format
2026-01-30 17:01:57 +05:30
Sameer Kankute
5277a0cf82
Merge pull request #20053 from BerriAI/litellm_gemini_edit_jan_30
fix aspectRatio mapping in image edit
2026-01-30 17:01:46 +05:30
Sameer Kankute
8b9d5018b6
Merge pull request #20052 from BerriAI/litllm_disable_cache_jan_29
Add disable flag for anthropic gemini cache translation
2026-01-30 17:01:34 +05:30
Sameer Kankute
404c33eca6
Merge pull request #20051 from BerriAI/litellm_xai_web_search_routing
Add routing of xai chat completions to responses when web search options is present
2026-01-30 17:01:19 +05:30
Sameer Kankute
8d485f2403
Merge pull request #19986 from BerriAI/litellm_batch_cost_tracking_jan29
[Feat]Add cost tracking and usage object in aretrieve_batch call type
2026-01-30 17:00:42 +05:30
Sameer Kankute
cfc9c77347
Merge pull request #19981 from BerriAI/litellm_fix_batches_permissions
Fix: Batch and File user level permissions
2026-01-30 17:00:10 +05:30
Sameer Kankute
a8054264ae
Merge pull request #19975 from BerriAI/litellm_oss_staging_01_29_2026
Litellm oss staging 01 29 2026
2026-01-30 16:58:28 +05:30
Sameer Kankute
55348dd9c5 Fix: vllm embedding format 2026-01-30 16:42:59 +05:30
Sameer Kankute
3c451e945a fix aspectRatio mapping 2026-01-30 15:25:18 +05:30
Sameer Kankute
5ac3f75996 Add disable flahg for anthropic gemini cache translation 2026-01-30 14:58:10 +05:30
Sameer Kankute
11c2160379 Add web search tests 2026-01-30 14:56:11 +05:30
Sameer Kankute
dbc8006190 Add routing of xai chat completions to responses when web search options is present 2026-01-30 14:15:35 +05:30
Sameer Kankute
eb50c780e9
Merge branch 'main' into litellm_oss_staging_01_29_2026 2026-01-30 09:03:05 +05:30
Sameer Kankute
c509ffcea8
Merge pull request #20042 from BerriAI/main
merge main in passthrough
2026-01-30 08:44:00 +05:30
Ishaan Jaff
476f0b29d2
[Feat] LiteLLM x Claude Agent SDK Integration (#20035)
* fix: bedrock invoke - does not support prompt-caching-scope

* fix: UNSUPPORTED_BEDROCK_INVOKE_BETA_PATTERNS

* init requirements.txt

* init README for claude Agent SDK

* fix: using converse models with UNSUPPORTED_BEDROCK_CONVERSE_BETA_PATTERNS

* fix main.py

* init: proxy_e2e_anthropic_messages_tests
2026-01-29 17:48:38 -08:00
yuneng-jiang
0b6bacb6d3 adding tests 2026-01-29 16:34:21 -08:00
yuneng-jiang
81e8a127b8 Allow config embedding models 2026-01-29 16:31:30 -08:00
yuneng-jiang
158e1e32d1 error_code in spend logs error metadata 2026-01-29 11:43:18 -08:00
yuneng-jiang
42081a57db
Merge pull request #19886 from BerriAI/litellm_bulk_edit_keys
[Feature] Bulk Update Keys Endpoint
2026-01-29 09:07:58 -08:00