BerriAI/litellm · error · HTTPException

Only proxy admins can update MCP semantic filter settings.

Error message

Only proxy admins can update MCP semantic filter settings.

What it means

Role gate on PATCH /update/mcp_semantic_filter_settings: the authenticated caller's user_role is not PROXY_ADMIN. MCP semantic filter settings are cluster-wide, so only proxy admins may write them; any internal user or team key gets 403.

Source

Thrown at litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py:1292

        config=config,
    )


@router.patch(
    "/update/mcp_semantic_filter_settings",
    tags=["Settings"],
    dependencies=[Depends(user_api_key_auth)],
)
async def update_mcp_semantic_filter_settings(
    settings: MCPSemanticFilterSettings,
    user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
):
    """
    Update MCP semantic filter settings in database.
    Settings will be picked up by all pods within approximately 10 seconds via background polling.
    """
    if user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN:
        raise HTTPException(
            status_code=403,
            detail="Only proxy admins can update MCP semantic filter settings.",
        )

    result: Final = await _update_litellm_setting(
        settings=settings,
        settings_key="mcp_semantic_tool_filter",
        success_message="MCP Semantic Filter settings updated successfully. Changes will be applied across all pods within 10 seconds.",
        user_api_key_dict=user_api_key_dict,
    )
    try:
        from litellm.proxy.proxy_server import prisma_client, proxy_config

        if prisma_client is not None:
            await proxy_config._init_semantic_filter_settings_in_db(prisma_client=prisma_client)
    except Exception as e:
        verbose_proxy_logger.warning("Failed to reinitialize MCP semantic filter settings immediately: %s", e)

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Use a proxy admin key to update MCP semantic filter settings.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py:1292 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/7b6da7be0f3188d4. Report an issue: GitHub.