Commit graph

42355 commits

Author SHA1 Message Date
Sameer Kankute
3c322a879f
Merge pull request #23460 from BerriAI/litellm_add_webrtc_support
Improve doc for WebRTC
2026-03-12 22:46:23 +05:30
Sameer Kankute
8bbebb5d75 Improve doc for WebRTC 2026-03-12 22:45:36 +05:30
Sameer Kankute
5ccf1cf4fe
Merge pull request #23459 from BerriAI/litellm_add_webrtc_support
Improve doc for WebRTC
2026-03-12 22:43:05 +05:30
Sameer Kankute
cf1d330e63 Improve doc for WebRTC 2026-03-12 22:41:39 +05:30
Cesar Garcia
e01d722803
Merge branch 'main' into litellm_oss_staging_03_11_2026 2026-03-12 13:53:14 -03:00
Sameer Kankute
d507f840d3
Merge pull request #23432 from BerriAI/litellm_azure-model-router-show-actual-model
feat(azure_ai): show actual model used in Azure Model Router response
2026-03-12 22:18:50 +05:30
Sameer Kankute
d1a99f571e
Merge pull request #23446 from BerriAI/litellm_add_webrtc_support
[Feat] Add WebRTC support
2026-03-12 22:16:55 +05:30
Sameer Kankute
507bced04f Fix the live tester 2026-03-12 22:14:08 +05:30
Cesar Garcia
33457ab702
Merge pull request #23457 from Chesars/revert-revert-21601-model-cost-aliases
fix: restore commits lost by revert of PR #21601
2026-03-12 13:43:07 -03:00
Chesars
4e6e1d8de8 merge: resolve conflicts with upstream staging (bedrock + mcp tests)
Keep both sets of tests: upstream's OAuth2 token injection test and
our case-insensitive tool matching tests. Use upstream's version of
the bedrock output_config test (more comprehensive).
2026-03-12 13:40:16 -03:00
Chesars
feed274aa3 Reapply "feat: add model_cost aliases expansion support"
This reverts commit 3d2df7e8b5.
2026-03-12 13:36:57 -03:00
michelligabriele
7c5e2e8389
fix(proxy): make async_post_call_response_headers_hook consistent across all endpoints (#22985)
* fix(proxy): make async_post_call_response_headers_hook consistent across all endpoints

The response headers hook had 5 gaps that prevented callbacks from
reliably extracting routing metadata across endpoint types:

1. Hook never fired for /audio/transcriptions (endpoint bypasses
   base_process_llm_request)
2. custom_llm_provider not accessible in hook data for any endpoint
3. custom_llm_provider not stamped in ResponsesAPIResponse._hidden_params
   (unlike chat completions)
4. model_info under inconsistent keys (metadata vs litellm_metadata)
5. request_headers always None at all call sites

This adds a litellm_call_info parameter to the hook that normalizes
routing metadata (custom_llm_provider, model_info, api_base, model_id)
regardless of endpoint type. Also stamps custom_llm_provider on
Responses API responses, adds the hook call to the transcription
handler, and passes request_headers at all call sites.

Supersedes PR #21385.

* fix(proxy): address review feedback — safer backwards compat and None guards

- Replace try/except TypeError with inspect.signature() check for
  litellm_call_info backwards compatibility. This avoids masking real
  TypeErrors inside callback implementations and prevents double
  invocation with inconsistent parameters.

- Use (data.get("key") or {}) instead of data.get("key", {}) to guard
  against keys that exist with an explicit None value, which would
  cause AttributeError on the subsequent .get() call.

* fix(proxy): cache inspect.signature result for callback compat check

Move the inspect.signature() call into a module-level helper with a
dict cache keyed by callback identity. Avoids repeated introspection
per request per callback in the hot path.

* fix(proxy): use class identity for signature cache key

Key the _CALLBACK_ACCEPTS_CALL_INFO cache by id(type(cb)) instead of
id(cb) to avoid stale entries from Python address reuse after GC.
All instances of the same callback class share the same method
signature, so class identity is both safer and more cache-efficient.
2026-03-12 08:51:00 -07:00
joereyna
1af7f11dae fix: extract normalize_route_for_root_path to deduplicate root-path stripping; fix mock target 2026-03-12 08:16:00 -07:00
joereyna
938452cc59 fix: extract normalize_route_for_root_path to deduplicate root-path stripping 2026-03-12 07:55:22 -07:00
Cesar Garcia
6bd7cd7573
Merge branch 'main' into litellm_oss_staging_03_11_2026 2026-03-12 10:43:08 -03:00
Sameer Kankute
291e6e1841
Merge pull request #23435 from BerriAI/litellm_vector-store-retrieve-list-update-delete
Add vector store retrieve list update delete
2026-03-12 19:08:39 +05:30
Sameer Kankute
4f5b6ae556
Merge pull request #23448 from BerriAI/litellm_cicd_1203126
Litellm cicd 1203126
2026-03-12 19:07:33 +05:30
Sameer Kankute
b7cfcdd35d Add docs 2026-03-12 19:06:57 +05:30
Chesars
fa68d69bcf fix: restore _get_effort_level and is_model_gpt_5_4_plus_model (PR #23151)
Independent fix (base: main) collaterally removed by PR #23276.
Restores:
- _get_effort_level() for extracting effort from string or dict
- is_model_gpt_5_4_plus_model() classmethod
- effective_effort usage in xhigh/tool-drop/sampling/temperature guards
- Azure: _get_effort_level import and usage for dict reasoning_effort
- Azure: gpt-5.4+ tool+reasoning drop logic
2026-03-12 10:28:27 -03:00
Chesars
9d1bcc7d37 Merge upstream/main into litellm_oss_staging_03_11_2026
Restore independent fixes from main that were collaterally removed
when PR #23276 (staging_03_10 → main) carried a revert commit:
- bedrock: restore output_config pop (PR #23240)
- redact_messages: restore dict handling for ModelResponse (PR #23235)
- model_checks: restore list() copies to avoid cache mutation (PR #23236)
- openapi_to_mcp_generator: restore relative URL handling (PR #23238)
- vertex_ai/gemini: restore _LITELLM_INTERNAL_EXTRA_BODY_KEYS check (PR #23131)
- openai types: restore extra finish reasons (PR #22138)
- completion_extras: restore usage transformation logic

Accept main for: model_prices JSONs, credential_endpoints,
team_endpoints, object_permission_utils, responses transformation.
2026-03-12 10:25:13 -03:00
Sameer Kankute
bb451cfcb0 address greptile review feedback (greploop iteration 2)
- Thread api_version through HTTP handlers to Azure realtime endpoints
- Make expires_at optional in RealtimeClientSecretResponse
- Fix test token expiry times to be in the future
- Populate user_id and team_id in minimal_auth for spend tracking

Made-with: Cursor
2026-03-12 18:53:22 +05:30
Sameer Kankute
f4103c51a6 address greptile review feedback (greploop iteration 1)
- Add api-version query param to Azure realtime URLs
- Remove Content-Type from Azure realtime_calls headers (httpx sets it)
- Add token expiry validation in proxy_realtime_calls endpoint
- Fix type annotations for upstream_resp

Made-with: Cursor
2026-03-12 18:40:37 +05:30
Sameer Kankute
f5be79419c Fix test_claude_agent_sdk_streaming 2026-03-12 18:36:04 +05:30
Sameer Kankute
f6238e781e Fix mypy 2026-03-12 18:35:17 +05:30
Sameer Kankute
982f3917c5 Fix test_standard_logging_payload 2026-03-12 18:35:01 +05:30
Sameer Kankute
15d873e204 Fix update deprecated model test 2026-03-12 18:34:20 +05:30
Sameer Kankute
374c35a6b7 Fix update deprecated model test 2026-03-12 18:34:15 +05:30
Sameer Kankute
7c70015a5f Fix mcp error 2026-03-12 18:33:58 +05:30
Sameer Kankute
18df137021 Fix mypy error 2026-03-12 18:33:40 +05:30
Sameer Kankute
0f91a4f9da Fix test_get_tools_for_single_server 2026-03-12 18:33:14 +05:30
Sameer Kankute
412a283569 Revert "fix(vertex): skip harmful schema transforms for Gemini 2.0+ tool parameters"
This reverts commit a9c3095cc5.
2026-03-12 18:26:11 +05:30
Sameer Kankute
72c98489d1 Revert "fix(vertex): shallow copy parameters before mutating in _build_vertex_schema_for_gemini_2"
This reverts commit 08d81f5d7c.
2026-03-12 18:26:11 +05:30
Chesars
47e9a0dcf0 Merge branch 'litellm_oss_staging_03_11_2026' of https://github.com/BerriAI/litellm into litellm_oss_staging_03_11_2026 2026-03-12 09:39:22 -03:00
Chesars
1be6b31e2f merge: resolve conflicts between main and litellm_oss_staging_03_11_2026 2026-03-12 09:38:31 -03:00
Sameer Kankute
7aa5bd3ff3
Merge pull request #23429 from BerriAI/litellm_dev_03_10_2026_p1
Litellm dev 03 10 2026 p1
2026-03-12 18:04:48 +05:30
Sameer Kankute
7778af6c78 Add tests 2026-03-12 17:54:57 +05:30
Sameer Kankute
e2be1aabae Add webrtc in init 2026-03-12 16:37:36 +05:30
Sameer Kankute
eb64cd6c46 Add webrtc transformations and http handler 2026-03-12 16:37:23 +05:30
Sameer Kankute
f793d2043b Add webrtc routing 2026-03-12 16:36:59 +05:30
Sameer Kankute
edd4463a28 Add webrtc endpoints 2026-03-12 16:36:33 +05:30
Cursor Agent
7737e9c313 feat(ui): migrate user_dashboard.tsx and user_info_view.tsx to /v2/user/info
- user_dashboard.tsx: Replace userInfoCall with userGetInfoV2 for spend data,
  remove keys/teams logic (keys come from props/useKeys hook, teams from fetchTeams)
- user_info_view.tsx: Replace userInfoCall with userGetInfoV2, flatten data
  structure from nested {user_info: {...}} to flat response, fetch team details
  separately using teamInfoCall, remove keys display (Virtual Keys section)
- Update user_dashboard.test.tsx and user_info_view.test.tsx mocks

Co-authored-by: yuneng-jiang <yuneng-jiang@users.noreply.github.com>
2026-03-12 07:50:36 +00:00
Cursor Agent
d03404d21e feat(ui): add userGetInfoV2 networking function and migrate useCurrentUser hook
- Add UserInfoV2Response type and userGetInfoV2() function in networking.tsx
- Migrate useCurrentUser hook from userInfoCall to userGetInfoV2
- Update useCurrentUser.test.ts to test new v2 API integration
- The hook no longer needs userRole since the endpoint handles auth itself

Co-authored-by: yuneng-jiang <yuneng-jiang@users.noreply.github.com>
2026-03-12 07:48:10 +00:00
Cursor Agent
679b8fd52a test: add unit tests for /v2/user/info endpoint and route checks
- 9 tests for the endpoint: admin access, self-lookup, unauthorized access,
  default to self, nonexistent user, response shape, team admin access,
  team admin denied, URL encoding
- 2 tests for route checks: route in info_routes, route access control

Co-authored-by: yuneng-jiang <yuneng-jiang@users.noreply.github.com>
2026-03-12 07:46:31 +00:00
Cursor Agent
81e3a2e421 feat: add /v2/user/info endpoint - lightweight user info with RBAC
- Add UserInfoV2Response type in _types.py (returns only user object, no keys/teams)
- Add /v2/user/info endpoint handler with proper access control:
  - Proxy admins can query any user
  - Team admins can query users in their teams
  - Internal users can query themselves only
  - Returns 404 for unauthorized/not-found (not 403)
- Add /v2/user/info to info_routes in LiteLLMRoutes
- Add route check passthrough in route_checks.py
- Add get_user_v2() method to Python client

Co-authored-by: yuneng-jiang <yuneng-jiang@users.noreply.github.com>
2026-03-12 07:43:55 +00:00
Sameer Kankute
e37efc4218
Merge pull request #23431 from BerriAI/litellm_gemini_model_map_update
Fix model cost for gemini-embedding-2-preview
2026-03-12 12:43:49 +05:30
Sameer Kankute
116795f7b4 Fix input_cost_per_video_per_second pricing 2026-03-12 12:43:08 +05:30
Sameer Kankute
36ec80d90c Fix azure model router 2026-03-12 12:40:37 +05:30
joereyna
791e598ad5 fix: add break on match and guard empty normalized_route in mapped route checks
- Add break after match in user_api_key_auth.py loop to avoid unnecessary
  iterations over remaining mapped routes
- Guard against normalized_route being empty when route == root_path exactly,
  which would otherwise match every mapped route via startswith("")
- Apply same empty-string guard in pass_through_endpoints.py for consistency
2026-03-11 23:50:34 -07:00
Joe Reyna
2848d5607f
Merge pull request #23417 from joereyna/fix/vertex-batch-cost-model-name
fix: update stale model name in vertex AI batch cost calculation test
2026-03-11 23:47:11 -07:00
Sameer Kankute
5927345eab Add get, list and delete for vector store endpoints 2026-03-12 12:09:51 +05:30