Skip to content

Conversation

@busla
Copy link

@busla busla commented Nov 19, 2025

No description provided.

@busla busla marked this pull request as ready for review November 19, 2025 10:46
busla and others added 29 commits November 19, 2025 11:00
- Extract headers from secret_fields.raw_headers and tools[].headers
- Merge headers from both sources before passing to MCP server
- Add extract_mcp_headers_from_request utility method
- Fix tool name prefix handling in _execute_tool_calls
- Add get_mcp_servers_from_ids method to MCPServerManager
- Ensure raw_headers is properly converted to dict before use
…ions

- Replace Logging type annotations with LiteLLMLoggingObj in main.py (lines 1157, 4097, 5811)
- Fixes NameError: name 'Logging' is not defined errors
- Maintains lazy loading benefits - Logging only loaded when accessed via litellm.Logging
- Add error handling to lazy import functions for better debugging
…_manager

- Add type stubs and @overload decorators for cost_per_token and completion_cost
- Refactor lazy loading system with centralized registry for better maintainability
- Add comprehensive documentation for adding new lazy-loaded functions
- Fixes 'Any? not callable' errors at lines 111, 139, and 146 in budget_manager.py
- Remove excessive comments and simplify documentation
- Remove @overload decorators (type stubs are sufficient)
- Remove Logging type stub to avoid redefinition errors
- Keep only essential type stubs for cost_per_token and completion_cost
- Fixes type checking errors without using type: ignore comments
ishaan-jaff and others added 30 commits December 1, 2025 12:55
* test_watsonx_zen_api_key_from_client

* zen api key

* docs using zen api key
… info endpoints (BerriAI#17324)

* feat: allow fetching OIDC user info

* test: use test_auth_builder_with_oidc_userinfo_enabled gets user info when enabled

* fix tool permission doc

* docs fix diagram
…ANT support for LiteLLM w/out PR to repo (BerriAI#17175)

* feat(generic_guardrail_api.py): new generic api for guardrails

Allows guardrail providers to work with litellm for guardrails without needing to make a PR to LiteLLM

* docs(generic_guardrail_api.md): document new generic guardrail api

* Fix: Improve PII detection and guardrail API integration

Co-authored-by: krrishdholakia <krrishdholakia@gmail.com>

* feat: correctly extract raw request from guardrail api

* docs(generic_guardrail_api.md): document this is a beta feature

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Similar to `claude-sonnet-4-5`.
* """
add

* fix transform_audio_transcription_request

* fix tests

* test_watsonx_transcription_request_body
…oke-headers

[fix] extra_headers in messages api bedrock invoke
fix: GA path for azure openai realtime models
…rriAI#17337)

* test_enterprise_routes.py

* test_enterprise_routes_all_imports_exist
* fix: skip user budget/model validation for org-scoped teams

When creating a team with organization_id, budget and model constraints
should be validated against the organization's limits, not the user's
personal limits. This allows org admins with restrictive personal
budgets to create teams within their organization's more generous limits.

Adds 4 unit tests to verify:
- Org-scoped teams bypass user budget validation
- Org-scoped teams bypass user model validation
- Standalone teams still validate against user limits

* fix: enforce user budget/model limits for standalone teams in update_team

- Add user-level budget and model validation to update_team endpoint for standalone teams,
  matching the existing pattern in new_team
- Org-scoped teams correctly bypass user validation and use organization limits instead
- Add 5 new comprehensive tests covering standalone/org team budget/model validation

* fix: Add direct TPM/RPM org limit validation and consolidate user team limit checks

- Add direct TPM/RPM comparison against org limits in _check_org_team_limits()
- Consolidate budget/models/TPM/RPM user validation into _check_user_team_limits() helper
- Ensure user limits only apply to standalone teams (organization_id=None)
- Org-scoped teams now validate TPM/RPM against org limits (not user limits)
- Add 8 tests for TPM/RPM validation scenarios (org and user limits)
- Reduce code duplication between new_team() and update_team()
* test: add failing tests for SSO user not added to Entra-synced teams bug

Adds tests reproducing the bug where new SSO users with teams=None
(from NewUserResponse) are not added to Entra ID synced teams because
add_missing_team_member() returns early when teams is None.

Tests demonstrate:
- NewUserResponse with teams=None fails to add user to teams (bug)
- LiteLLM_UserTable with teams=[] correctly adds user to teams (control)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: treat None as empty list in add_missing_team_member for new SSO users

Fixed bug where new SSO users logging in via Microsoft SSO were not added
to their Entra-synced teams. The issue was an early return when
user_info.teams is None (default for NewUserResponse). Now treats None
as an empty list so new users are properly added to all their SSO teams.

Location: litellm/proxy/management_endpoints/ui_sso.py:438-440

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
…clude system instructions (BerriAI#17315)

* Support system prompts in noma guardrails

* Use litellm util to covert chat completions to responses api
* feat(provider): add Z.AI (Zhipu AI) as built-in provider

Add support for Z.AI GLM models as a native OpenAI-compatible provider.

- Add "zai" to openai_compatible_providers list
- Add ZAI enum to LlmProviders
- Add provider URL resolution for https://api.z.ai/api/paas/v4
- Add 8 GLM models with pricing to model cost maps:
  - glm-4.6 (200K context, $0.6/$2.2 per 1M tokens)
  - glm-4.5, glm-4.5v, glm-4.5-x, glm-4.5-air, glm-4.5-airx
  - glm-4-32b-0414-128k
  - glm-4.5-flash (free tier)
- Add unit tests for provider integration

Closes BerriAI#17289

* docs: add Z.AI provider documentation

- Add zai.md with usage examples, model list, and pricing
- Add to sidebars.js navigation
…) (BerriAI#17306)

Handle the case where metadata is explicitly set to null/None in the
request body. This was causing a 401 error with "'NoneType' object
has no attribute 'get'" when calling /v1/batches with metadata: null.

The fix uses `or {}` instead of a default dict value since the key
exists but has a None value.
* feat: add experimental latest-user filtering for Bedrock

* doc: add experimental bedrock latest-message flag
…cks pricing test). (BerriAI#17277)

* update databricks pricing and add DBU<>USD test

* Refactor test_databricks_pricing.py

Removed unnecessary sys.path modification and cleaned up comments.
…ype (request/response), image support (BerriAI#17338)

* refactor(generic_guardrail_api.py): refactor to update to new guardrail api logic

* refactor: refactor llm api integrations to support passing in text as a list[str] instead of one at a time

* refactor: fix linting errors

* refactor: pass request type to guardrail api

allows request vs. response processing to occur

* feat: pass user api key dict information to the guardrail api

* fix: pass user api key dict information to the guardrail api

* feat: pass litellm call id + trace id, if present

* docs: update docs
We recommend using 10–20 connections. Our actual default is 10, but the documentation incorrectly listed the default as 100.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.