Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
0fd5b94
added support for metadata
Mar 21, 2026
b223dc9
fix: PR review - meta truthiness, BlobResourceContents mimeType, add …
Mar 21, 2026
19af722
pyproject to .25
Mar 22, 2026
f626587
feat(teams): resolve access group models/MCPs/agents in team endpoints
ryan-crabbe-berri Apr 2, 2026
bbe708b
perf(teams): single-pass access group resolution + asyncio.gather in …
ryan-crabbe-berri Apr 2, 2026
59b0910
docs: add default_team_params to config reference and update examples
ryan-crabbe-berri Apr 2, 2026
c19a63e
docs: clarify that models sub-field only applies to SSO auto-created …
ryan-crabbe-berri Apr 2, 2026
f0bd334
fix: lazy import get_access_object to break cyclic import + short-cir…
ryan-crabbe-berri Apr 2, 2026
5a8f910
add: making organizations a select instead of read only badges
ryan-crabbe-berri Apr 3, 2026
1bb726a
fix(ui): only send organization_id when changed and use raw initial v…
ryan-crabbe-berri Apr 3, 2026
cd7b262
fix(ui): add paginated team search to usage page filter
ryan-crabbe-berri Apr 3, 2026
1533f68
fix(ui): fix imports and update placeholder for team multi select
ryan-crabbe-berri Apr 3, 2026
96b660b
fix(ui): wire team_id filter to key alias dropdown on Virtual Keys tab
ryan-crabbe-berri Apr 3, 2026
1521004
Merge pull request #25114 from BerriAI/litellm_fix-virtual-keys-team-…
ryan-crabbe-berri Apr 3, 2026
0575c3f
Merge pull request #25107 from BerriAI/litellm_fix-team-id-search-filter
ryan-crabbe-berri Apr 3, 2026
20077fe
Merge pull request #25095 from BerriAI/litellm_fix-ui-update-org-teams
ryan-crabbe-berri Apr 3, 2026
eb780a8
Merge pull request #25032 from BerriAI/litellm_docs-default-team-params
ryan-crabbe-berri Apr 3, 2026
38f6c94
fix(tests): correct mock targets in TestResolveAccessGroupResources
ryan-crabbe-berri Apr 3, 2026
ea32cb5
fix: use direct attribute access with or [] fallback in _resolve_acce…
ryan-crabbe-berri Apr 3, 2026
3bdd042
fix(ui): remove model source legend from team detail view
ryan-crabbe-berri Apr 3, 2026
bb03a11
fix(ui): add missing access_group fields to TeamData.team_info type
ryan-crabbe-berri Apr 3, 2026
93369bf
perf(teams): batch-fetch access groups in single DB query
ryan-crabbe-berri Apr 4, 2026
0331fb5
Merge pull request #25027 from BerriAI/litellm_add-access-group-to-model
ryan-crabbe-berri Apr 4, 2026
ce219fc
refactor(proxy): extract helpers to fix PLR0915 violations
ryan-crabbe-berri Apr 4, 2026
866c4a2
test(ui): update tests to match new team_id / access-group signatures
ryan-crabbe-berri Apr 4, 2026
c495acd
fix(ui): send null (not '') for cleared organization_id on team update
ryan-crabbe-berri Apr 4, 2026
ad203dc
poetry
ryan-crabbe-berri Apr 4, 2026
ad81892
Merge remote-tracking branch 'origin/main' into litellm_ryan-march-31
ryan-crabbe-berri Apr 4, 2026
76c0591
chore: regen poetry.lock for litellm-proxy-extras 0.4.64 bump
ryan-crabbe-berri Apr 4, 2026
fa9e3d8
Merge pull request #25119 from BerriAI/litellm_ryan-march-31
yuneng-berri Apr 4, 2026
1e414b5
chore: update Next.js build artifacts (2026-04-04 17:55 UTC, node v22…
yuneng-berri Apr 4, 2026
c898edb
Merge pull request #25136 from BerriAI/ui_build_apr4
yuneng-berri Apr 4, 2026
12fa28f
Merge branch 'main' into litellm_metadata_for_mcp
shivamrawat1 Apr 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions docs/my-website/docs/proxy/config_settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ router_settings:
| enable_json_schema_validation | boolean | If true, enables json schema validation for all requests. |
| enable_key_alias_format_validation | boolean | If true, validates `key_alias` format on `/key/generate` and `/key/update`. Must be 2-255 chars, start/end with alphanumeric, only allow `a-zA-Z0-9_-/.@`. Default `false`. |
| disable_copilot_system_to_assistant | boolean | **DEPRECATED** - GitHub Copilot API supports system prompts. |
| default_team_params | object | Default parameters applied to every new team created via `/team/new` (including SSO auto-created teams). Only fills in fields not explicitly set in the request. Sub-fields: `max_budget` (float), `budget_duration` (string, e.g. `"30d"`), `tpm_limit` (integer), `rpm_limit` (integer), `team_member_permissions` (array of strings, e.g. `["/team/daily/activity", "/key/generate"]`), `models` (array of strings — only applied to SSO auto-created teams). |

### general_settings - Reference

Expand Down
25 changes: 17 additions & 8 deletions docs/my-website/docs/proxy/self_serve.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,15 @@ When you connect litellm to your SSO provider, litellm can auto-create teams. Us

```yaml showLineNumbers title="Default Params for new teams"
litellm_settings:
default_team_params: # Default Params to apply when litellm auto creates a team from SSO IDP provider
max_budget: 100 # Optional[float], optional): $100 budget for the team
budget_duration: 30d # Optional[str], optional): 30 days budget_duration for the team
models: ["gpt-3.5-turbo"] # Optional[List[str]], optional): models to be used by the team
default_team_params: # Applied to all /team/new calls (including SSO auto-created teams) when the field is not explicitly set
max_budget: 100 # Optional[float]: $100 budget for the team
budget_duration: 30d # Optional[str]: 30 days budget_duration for the team
models: ["gpt-3.5-turbo"] # Optional[List[str]]: models for the team (only applied to SSO auto-created teams)
tpm_limit: 100000 # Optional[int]: tokens per minute limit
rpm_limit: 1000 # Optional[int]: requests per minute limit
team_member_permissions: # Optional[List[str]]: permissions granted to non-admin team members
- "/team/daily/activity" # Allow members to view team usage
- "/key/generate" # Allow members to generate API keys
```


Expand Down Expand Up @@ -390,10 +395,14 @@ litellm_settings:
max_budget_in_team: 100 # Optional[float], optional): $100 budget for the team. Defaults to None.
user_role: "user" # Optional[str], optional): "user" or "admin". Defaults to "user"

default_team_params: # Default Params to apply when litellm auto creates a team from SSO IDP provider
max_budget: 100 # Optional[float], optional): $100 budget for the team
budget_duration: 30d # Optional[str], optional): 30 days budget_duration for the team
models: ["gpt-3.5-turbo"] # Optional[List[str]], optional): models to be used by the team
default_team_params: # Applied to all /team/new calls (including SSO auto-created teams) when the field is not explicitly set
max_budget: 100 # Optional[float]: $100 budget for the team
budget_duration: 30d # Optional[str]: 30 days budget_duration for the team
models: ["gpt-3.5-turbo"] # Optional[List[str]]: models for the team (only applied to SSO auto-created teams)
tpm_limit: 100000 # Optional[int]: tokens per minute limit
rpm_limit: 1000 # Optional[int]: requests per minute limit
team_member_permissions: # Optional[List[str]]: permissions granted to non-admin team members
- "/team/daily/activity"


upperbound_key_generate_params: # Upperbound for /key/generate requests when self-serve flow is on
Expand Down
10 changes: 6 additions & 4 deletions docs/my-website/docs/tutorials/msft_sso.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,12 @@ Navigate to your litellm config file and set the following params

```yaml showLineNumbers title="litellm config with default_team_params"
litellm_settings:
default_team_params: # Default Params to apply when litellm auto creates a team from SSO IDP provider
max_budget: 100 # Optional[float], optional): $100 budget for the team
budget_duration: 30d # Optional[str], optional): 30 days budget_duration for the team
models: ["gpt-3.5-turbo"] # Optional[List[str]], optional): models to be used by the team
default_team_params: # Applied to all /team/new calls (including SSO auto-created teams) when the field is not explicitly set
max_budget: 100 # Optional[float]: $100 budget for the team
budget_duration: 30d # Optional[str]: 30 days budget_duration for the team
models: ["gpt-3.5-turbo"] # Optional[List[str]]: models for the team (only applied to SSO auto-created teams)
team_member_permissions: # Optional[List[str]]: permissions granted to non-admin team members
- "/team/daily/activity" # Allow members to view team usage
```

### 3.2 Auto-create a new team on LiteLLM
Expand Down
49 changes: 29 additions & 20 deletions litellm/proxy/_experimental/mcp_server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,34 @@ class ListMCPToolsRestAPIResponseObject(MCPTool):
mcp_info: Optional[MCPInfo] = None
model_config = ConfigDict(arbitrary_types_allowed=True)

def _normalize_resource_contents(contents: list) -> List[ReadResourceContents]:
Comment thread
shivamrawat1 marked this conversation as resolved.
"""Normalize ResourceContents to ReadResourceContents, preserving meta (MCP 1.26.0+)."""
normalized: List[ReadResourceContents] = []
for content in contents:
meta = getattr(content, "meta", None)
if meta is None and hasattr(content, "model_dump"):
d = content.model_dump()
meta = d.get("meta")
if meta is None:
meta = d.get("_meta")
if isinstance(content, TextResourceContents):
normalized.append(
ReadResourceContents(
content=content.text,
mime_type=content.mimeType,
meta=meta,
)
)
elif isinstance(content, BlobResourceContents):
normalized.append(
ReadResourceContents(
content=content.blob,
mime_type=content.mimeType,
meta=meta,
)
)
Comment thread
shivamrawat1 marked this conversation as resolved.
return normalized
Comment thread
shivamrawat1 marked this conversation as resolved.
Comment thread
shivamrawat1 marked this conversation as resolved.

########################################################
############ Initialize the MCP Server #################
########################################################
Expand Down Expand Up @@ -630,26 +658,7 @@ async def read_resource(url: AnyUrl) -> list[ReadResourceContents]:
raw_headers=raw_headers,
)

normalized_contents: List[ReadResourceContents] = []
for content in read_resource_result.contents:
if isinstance(content, TextResourceContents):
text_content: TextResourceContents = content
normalized_contents.append(
ReadResourceContents(
content=text_content.text,
mime_type=text_content.mimeType,
)
)
elif isinstance(content, BlobResourceContents):
blob_content: BlobResourceContents = content
normalized_contents.append(
ReadResourceContents(
content=blob_content.blob,
mime_type=None,
)
)

return normalized_contents
return _normalize_resource_contents(read_resource_result.contents)

########################################################
############ End of MCP Server Routes ##################
Expand Down

Large diffs are not rendered by default.

Loading
Loading