Commit graph

29199 commits

Author SHA1 Message Date
Yuta Saito
6393277bf4 fix: separate MCP handling out of main.py 2025-12-11 10:39:14 +09:00
Ishaan Jaff
059fedbed5
[Feat] Agent Gateway - Track agent_id in SpendLogs (#17795)
* add agent_id in metadata in spend logs

* add agent_id in SpendLogsPayload

* add agent_id in SpendLogsPayload

* add _set_agent_id_on_logging_obj

* add agent id tracking in SpendLogs

* add agent id in spend logs

* fix create_a2a_client

* test_asend_message_passes_agent_id_to_callback

* test_get_logging_payload_includes_agent_id_from_kwargs

* test_asend_message_streaming_triggers_callbacks

* fix asend_message_streaming

* asend_message_streaming

* A2AStreamingIterator

* _handle_stream_message

* test_asend_message_streaming_propagates_metadata
2025-12-10 16:09:56 -08:00
yuneng-jiang
8ed1dfcb6a Agent Usage UI 2025-12-10 15:46:22 -08:00
Ishaan Jaff
5d456bcdc3
[Feat] UI SSO - allow fetching role from generic SSO provider (Keycloak) (#17787)
* fix ui SSO

* TestGenericResponseConvertorUserRole

* Assigning User Roles via SSO
2025-12-10 13:09:28 -08:00
Alexsander Hamir
439bb5bfe3
fix: suggest Gunicorn instead of uvicorn when using max_requests_before_restart (#17788) 2025-12-10 13:09:00 -08:00
Ishaan Jaff
7ad2a58dcd
[Feat] A2a Gateway - allow using bedrock agentcore, langgraph agents with A2a Gateway (#17786)
* init LANGGRAPH

* init LangGraphConfig

* init LangGraphConfig types

* init langgraph

* init getting api base and key

* init transform langgraph

* fix SSE issues

* test_langgraph_acompletion_non_streaming

* add LangGraph to docs

* docs: Setting Up a Local LangGraph Server

* fix langgraph SSE

* fix import uuid

* init A2A to LiteLLM Completion Bridge

* add send message for bridge

* test_a2a_completion_bridge_non_streaming

* add A2ACompletionBridgeTransformation

* add a2a send message support

* init a2a bridge
2025-12-10 13:08:43 -08:00
Ishaan Jaff
49b91c4a35
[Feat] A2a gateway - Add cost per token pricing (#17780)
* fix calculate_a2a_cost

* add cost_per_query

* add test_asend_message_uses_cost_per_query

* fix: _initialize_slack_alerting_jobs

* feat: add token tracking for agents invoke

* add A2ARequestUtils

* add _set_usage_on_logging_obj

* test_asend_message_token_tracking

* add _handle_a2a_response_logging

* test_asend_message_streaming_token_tracking

* add A2AStreamingIterator

* add cost calculator for agents

* test_asend_message_uses_input_output_cost_per_token

* docs gix
2025-12-10 13:08:15 -08:00
Alexsander Hamir
ccb6cd880a
[Perf] - Cut memory leak in half (#17784)
Stop passing references to large objects to fire-and-forget tasks.
2025-12-10 12:31:58 -08:00
Ishaan Jaff
5ee32167c0
[Feat] New Provider - add langgraph (#17783)
* init LANGGRAPH

* init LangGraphConfig

* init LangGraphConfig types

* init langgraph

* init getting api base and key

* init transform langgraph

* fix SSE issues

* test_langgraph_acompletion_non_streaming

* add LangGraph to docs

* docs: Setting Up a Local LangGraph Server

* fix langgraph SSE

* fix import uuid
2025-12-10 12:30:35 -08:00
yuneng-jiang
1cad479297 Daily Agent Usage Table WIP 2025-12-10 11:50:52 -08:00
Ishaan Jaff
115a14891d
[Feat] Agent Gateway - Add token counting non streaming + streaming (#17779)
* fix calculate_a2a_cost

* add cost_per_query

* add test_asend_message_uses_cost_per_query

* fix: _initialize_slack_alerting_jobs

* feat: add token tracking for agents invoke

* add A2ARequestUtils

* add _set_usage_on_logging_obj

* test_asend_message_token_tracking

* add _handle_a2a_response_logging

* test_asend_message_streaming_token_tracking

* add A2AStreamingIterator
2025-12-10 11:45:28 -08:00
Krish Dholakia
8bc5e2ca7f
Add /v1/messages/count_tokens endpoint documentation (#17772)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-12-10 11:34:11 -08:00
Krish Dholakia
7a773b738b
Add docstring to add_new_model endpoint (#17778)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-12-10 11:25:07 -08:00
Krrish Dholakia
4ea758767a build: update poetry.lock 2025-12-10 11:09:28 -08:00
Ishaan Jaff
7a33579af6
[Feat] Agent Gateway - Add cost per query for agent invocations (#17774)
* fix calculate_a2a_cost

* add cost_per_query

* add test_asend_message_uses_cost_per_query

* fix: _initialize_slack_alerting_jobs
2025-12-10 10:43:52 -08:00
yuneng-jiang
3d7c6cb690 Merge remote-tracking branch 'origin' into litellm_sendgrid 2025-12-10 10:42:47 -08:00
saisurya237
f3ead2c153
add a new feature fix to expose the team alias when authenticating th… (#17725)
* CLI SSO: show team aliases in team selection

* temp poetry lock fix

* add poetry.lock to gitignore

* Revert proxy_server background job refactor

* Revert proxy_server background job refactor

* rever gitignore and poetry lock file
2025-12-10 10:10:28 -08:00
yuneng-jiang
ba554a86b9
Merge pull request #16843 from BerriAI/litellm_allow_custom_mount_paths
[Feature] Allow Root Path to Redirect when Docs not on Root Path
2025-12-10 09:52:30 -08:00
Sameer Kankute
15e5a8251e fix: respect videos content db creds 2025-12-10 23:00:01 +05:30
Sameer Kankute
dea62e3f60
Merge pull request #17769 from BerriAI/litellm_test_fix
Fix nvdia and geminin tests
2025-12-10 22:29:04 +05:30
Sameer Kankute
ad45fc7cce
Merge pull request #17770 from BerriAI/litellm_deepseek_v3.2
Add DeepSeek-V3.2 model support
2025-12-10 22:28:50 +05:30
Sameer Kankute
4c78c1afc8
Merge pull request #17756 from BerriAI/litellm_add_gemini_computer_use
Add support for computer use for gemini
2025-12-10 22:28:37 +05:30
Sameer Kankute
05a82ae570 Add support for deepseek v3.2 2025-12-10 22:21:04 +05:30
Sameer Kankute
ec30032bc3 Fix nvdia and geminin tests 2025-12-10 22:05:11 +05:30
Sameer Kankute
0f99517170 Fix lint error 2025-12-10 18:28:29 +05:30
Sameer Kankute
9e3a04a725 Add batch passthrough endpoint cost tracking for anthropic 2025-12-10 18:24:31 +05:30
Sameer Kankute
ad87aa1926 fix code quality qa 2025-12-10 17:24:16 +05:30
Sameer Kankute
a69384598c Fix:Argument llm_provider 2025-12-10 17:21:15 +05:30
Sameer Kankute
b9d3d7c059 Add tests for file and batch feat for anthropic 2025-12-10 17:14:47 +05:30
Sameer Kankute
ec3c9191f3 Transform anthropic file content to openai file content 2025-12-10 17:07:00 +05:30
Sameer Kankute
854183e3b9 Revert batch utils with original logic 2025-12-10 17:01:21 +05:30
Sameer Kankute
0d2f8ce931
Merge pull request #17711 from BerriAI/litellm_add_additional_drop_params_support
feat: Add nested field removal support to additional_drop_params
2025-12-10 15:37:39 +05:30
Lucas Sugi
c7fd8fabdb
fix: Avoid error when we have just the tool_calls in input (#17753)
* fix: Avoid error when we have just the tool_calls in input

* fix: Remove the tool call validation

* feat: Add unit test
2025-12-09 22:59:59 -08:00
Krish Dholakia
b0a5a4b81d
Arize Phoenix OSS - Prompt Management Integration (#17750)
* docs(prompt_management.md): document how to onboard prompts to litellm

* feat(arize_phoenix_prompt_manager.py): support new prompt management integration

allows users to connect arize phoenix prompt manager to litellm

* fix(proxy/utils.py): remove prompt variables to avoid re-processing prompt

* docs(arize_phoenix_prompts.md): document new prompt management integration
2025-12-09 22:53:42 -08:00
Sameer Kankute
bcac9e41f6 Add support for computer use for gemini 2025-12-10 10:34:08 +05:30
yuneng-jiang
0769a290da Sendgrid integration + bump enterprise package 2025-12-09 19:34:09 -08:00
yuneng-jiang
b5763d27eb bump: version 0.1.23 → 0.1.24 2025-12-09 19:31:12 -08:00
Ishaan Jaff
e546f0e021
[Fix] UI SSO - allow up-serting user role when SSO provider role changes (#17754)
* use _build_sso_user_update_data

* test_build_sso_user_update_data_with_valid_role
2025-12-09 19:16:10 -08:00
Peter Chanthamynavong
539ce89d4e
fix(guardrails): mask all regex pattern matches, not just first (#17727)
Before: search() + replace() only replaced first match
After: sub() replaces all matches of each pattern

Closes #17687
2025-12-09 18:51:28 -08:00
Cesar Garcia
b4e0dabb37
fix: use absolute URL for Supported Endpoints link to avoid Docusaurus slug conflict (#17710)
The relative link was causing Docusaurus to incorrectly associate the
/supported_endpoints page with SDK Functions category instead of the
actual Supported Endpoints generated-index.
2025-12-09 18:49:49 -08:00
Hunter Wittenborn
82f0c3c887
Support model names with slashes on Gemini endpoints (#17743)
* Support model names with slashes on Gemini endpoints

* Fix test

* Update tests/proxy_unit_tests/test_google_endpoint_routing.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update tests/proxy_unit_tests/test_google_endpoint_routing.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update tests/proxy_unit_tests/test_google_endpoint_routing.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update tests/proxy_unit_tests/test_google_endpoint_routing.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update tests/proxy_unit_tests/test_google_endpoint_routing.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update tests/proxy_unit_tests/test_google_endpoint_routing.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-09 18:40:51 -08:00
Krrish Dholakia
8b125ff74e test: remove test_helicone - integration test made live calls to api and broke ci/cd 2025-12-09 18:36:51 -08:00
Krish Dholakia
254c1155a2
Remove streaming_logging.md documentation (#17739)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-12-09 18:26:08 -08:00
Cesar Garcia
01dec55c2f
fix(anthropic): preserve server_tool_use and web_search_tool_result in multi-turn conversations (#17746)
- Extract web_search_tool_result blocks in extract_response_content()
- Store web_search_results in provider_specific_fields for round-trip
- Detect srvtoolu_ prefix to reconstruct as server_tool_use (not tool_use)
- Add corresponding web_search_tool_result after server_tool_use blocks

This ensures multi-turn conversations with Anthropic web search + custom
tools work correctly without Anthropic expecting tool_result for server-
side tool executions.
2025-12-09 18:25:23 -08:00
Krish Dholakia
9fa6c51678
Fix: Add Gemini context window exception mapping (#17751)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-12-09 18:24:13 -08:00
Krrish Dholakia
f23a78fddc test: remove expensive test 2025-12-09 18:23:03 -08:00
Krrish Dholakia
c276a87ab0 fix(anthropic/chat/transformation.py): pass output_config + thinking to claude opus 4.5 2025-12-09 18:21:41 -08:00
Sameer Kankute
8fafd81f9d
Merge pull request #17732 from BerriAI/litellm_videos_bugs_2
Fix : use litellm params for all videos apis
2025-12-10 07:49:55 +05:30
Krrish Dholakia
d3531be9a0 docs(community.md): add new integration partner doc 2025-12-09 18:17:14 -08:00
yuneng-jiang
0e2fcde145 Change health check to read env varlike chat completions 2025-12-09 18:17:07 -08:00