Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

[Feat] add support for dynamic client registration (#15921) (enables Atlassian MCP to work via Oauth on LiteLLM)

YutaSaitoc0890e7d3381
diff --git a/docs/my-website/docs/mcp.md b/docs/my-website/docs/mcp.md
index ac2162af49e..10405c1b493 100644
--- a/docs/my-website/docs/mcp.md
+++ b/docs/my-website/docs/mcp.md
@@ -1223,6 +1223,10 @@ mcp_servers:
scopes: ["public_repo", "user:email"]
```
+**Note**
+In the future, users will only need to specify the `url` of the MCP server.
+LiteLLM will automatically resolve the corresponding `authorization_url`, `token_url`, and `registration_url` based on the MCP server metadata (e.g., `.well-known/oauth-authorization-server` or `oauth-protected-resource`).
+
[**See Claude Code Tutorial**](./tutorials/claude_responses_api#connecting-mcp-servers)
## Using your MCP with client side credentials
diff --git a/docs/my-website/docs/tutorials/claude_responses_api.md b/docs/my-website/docs/tutorials/claude_responses_api.md
index 87d019f11b9..343f938b673 100644
--- a/docs/my-website/docs/tutorials/claude_responses_api.md
+++ b/docs/my-website/docs/tutorials/claude_responses_api.md
@@ -227,6 +227,9 @@ Limitations:
1. Add the MCP server to your `config.yaml`
+<Tabs>
+<TabItem value="github" label="GitHub MCP">
+
In this example, we'll add the Github MCP server to our `config.yaml`
```yaml title="config.yaml" showLineNumbers
@@ -241,6 +244,25 @@ mcp_servers:
scopes: ["public_repo", "user:email"]
```
+</TabItem>
+<TabItem value="atlassian" label="Atlassian MCP">
+
+In this example, we'll add the Atlassian MCP server to our `config.yaml`
+
+```yaml title="config.yaml" showLineNumbers
+atlassian_mcp:
+ server_id: atlassian_mcp_id
+ url: "https://mcp.atlassian.com/v1/sse"
+ transport: "sse"
+ auth_type: oauth2
+ authorization_url: https://mcp.atlassian.com/v1/authorize
+ token_url: https://cf.mcp.atlassian.com/v1/token
+ registration_url: https://cf.mcp.atlassian.com/v1/register
+```
+
+</TabItem>
+</Tabs>
+
2. Start LiteLLM Proxy
```bash
@@ -255,6 +277,8 @@ litellm --config /path/to/config.yaml
claude mcp add --transport http litellm_proxy http://0.0.0.0:4000/github_mcp/mcp --header "Authorization: Bearer sk-LITELLM_VIRTUAL_KEY"
```
+For MCP servers that require dynamic client registration (such as Atlassian), please set `x-litellm-api-key: Bearer sk-LITELLM_VIRTUAL_KEY` instead of using `Authorization: Bearer LITELLM_VIRTUAL_KEY`.
+
4. Authenticate via Claude Code
a. Start Claude Code
diff --git a/litellm/proxy/_experimental/mcp_server/discoverable_endpoints.py b/litellm/proxy/_experimental/mcp_server/discoverable_endpoints.py
index de4f6fafc3c..59a443f7b79 100644
--- a/litellm/proxy/_experimental/mcp_server/discoverable_endpoints.py
+++ b/litellm/proxy/_experimental/mcp_server/discoverable_endpoints.py
@@ -13,6 +13,7 @@ from litellm.proxy.common_utils.encrypt_decrypt_utils import (
decrypt_value_helper,
encrypt_value_helper,
)
+from litellm.proxy.common_utils.http_parsing_utils import _read_request_body
router = APIRouter(
tags=["mcp"],
@@ -90,19 +91,18 @@ async def authorize(
global_mcp_server_manager,
)
- mcp_server = global_mcp_server_manager.get_mcp_server_by_name(client_id)
+ if mcp_server_name:
+ mcp_server = global_mcp_server_manager.get_mcp_server_by_name(mcp_server_name)
+ else:
+ mcp_server = global_mcp_server_manager.get_mcp_server_by_name(client_id)
if mcp_server is None:
raise HTTPException(status_code=404, detail="MCP server not found")
if mcp_server.auth_type != "oauth2":
raise HTTPException(status_code=400, detail="MCP server is not OAuth2")
- if mcp_server.client_id is None:
- raise HTTPException(status_code=400, detail="MCP server client id is not set")
if mcp_server.authorization_url is None:
raise HTTPException(
status_code=400, detail="MCP server authorization url is not set"
)
- if mcp_server.scopes is None:
- raise HTTPException(status_code=400, detail="MCP server scopes is not set")
# Parse it to remove any existing query
parsed = urlparse(redirect_uri)
@@ -117,15 +117,17 @@ async def authorize(
code_challenge_method=code_challenge_method,
client_redirect_uri=redirect_uri,
)
-
# Build params for upstream OAuth provider
params = {
- "client_id": mcp_server.client_id,
+ "client_id": client_id if client_id else mcp_server.client_id,
"redirect_uri": f"{request_base_url}/callback",
- "scope": scope or " ".join(mcp_server.scopes),
"state": encoded_state,
"response_type": response_type or "code",
}
+ if scope:
+ params["scope"] = scope
+ elif mcp_server.scopes:
+ params["scope"] = " ".join(mcp_server.scopes)
# Forward PKCE parameters if present
if code_challenge:
@@ -136,6 +138,7 @@ async def authorize(
return RedirectResponse(f"{mcp_server.authorization_url}?{urlencode(params)}")
[email protected]("/{mcp_server_name}/token")
@router.post("/token")
async def token_endpoint(
request: Request,
@@ -143,8 +146,9 @@ async def token_endpoint(
code: str = Form(None),
redirect_uri: str = Form(None),
client_id: str = Form(...),
- client_secret: str = Form(...),
+ client_secret: Optional[str] = Form(None),
code_verifier: str = Form(None),
+ mcp_server_name: Optional[str] = None,
):
"""
Accept the authorization code from client and exchange it for OAuth token.
@@ -159,7 +163,11 @@ async def token_endpoint(
global_mcp_server_manager,
)
- mcp_server = global_mcp_server_manager.get_mcp_server_by_name(client_id)
+ if mcp_server_name:
+ mcp_server = global_mcp_server_manager.get_mcp_server_by_name(mcp_server_name)
+ else:
+ mcp_server = global_mcp_server_manager.get_mcp_server_by_name(client_id)
+
if mcp_server is None:
raise HTTPException(status_code=404, detail="MCP server not found")
@@ -174,8 +182,8 @@ async def token_endpoint(
# Build token request data
token_data = {
"grant_type": "authorization_code",
- "client_id": mcp_server.client_id,
- "client_secret": mcp_server.client_secret,
+ "client_id": client_id if client_id else mcp_server.client_id,
+ "client_secret": client_secret if client_secret else mcp_server.client_secret,
"code": code,
"redirect_uri": f"{proxy_base_url}/callback",
}
@@ -266,10 +274,22 @@ async def oauth_authorization_server_mcp(
request: Request, mcp_server_name: Optional[str] = None
):
request_base_url = str(request.base_url).rstrip("/")
+
+ authorization_endpoint = (
+ f"{request_base_url}/{mcp_server_name}/authorize"
+ if mcp_server_name
+ else f"{request_base_url}/authorize"
+ )
+ token_endpoint = (
+ f"{request_base_url}/{mcp_server_name}/token"
+ if mcp_server_name
+ else f"{request_base_url}/token"
+ )
+
return {
"issuer": request_base_url, # point to your proxy
- "authorization_endpoint": f"{request_base_url}/authorize",
- "token_endpoint": f"{request_base_url}/token",
+ "authorization_endpoint": authorization_endpoint,
+ "token_endpoint": token_endpoint,
"response_types_supported": ["code"],
"grant_types_supported": ["authorization_code"],
"code_challenge_methods_supported": ["S256"],
@@ -296,11 +316,64 @@ async def oauth_authorization_server_root(
@router.post("/{mcp_server_name}/register")
@router.post("/register")
async def register_client(request: Request, mcp_server_name: Optional[str] = None):
+ from litellm.proxy._experimental.mcp_server.mcp_server_manager import (
+ global_mcp_server_manager,
+ )
+
request_base_url = str(request.base_url).rstrip("/")
- # return fixed GitHub client credentials
- return {
+ request_data = await _read_request_body(request=request)
+ data: dict = {**request_data}
+
+ dummy_return = {
"client_id": mcp_server_name or "dummy_client",
"client_secret": "dummy",
- "redirect_uris": [f"{request_base_url}/mcp/callback"],
+ "redirect_uris": [f"{request_base_url}/callback"],
}
+ if not mcp_server_name:
+ return dummy_return
+
+ mcp_server = global_mcp_server_manager.get_mcp_server_by_name(mcp_server_name)
+ if mcp_server is None:
+ return dummy_return
+
+ if mcp_server.client_id and mcp_server.client_secret:
+ return {
+ "client_id": mcp_server.client_id,
+ "client_secret": mcp_server.client_secret,
+ "redirect_uris": [f"{request_base_url}/callback"],
+ }
+
+ if mcp_server.authorization_url is None:
+ raise HTTPException(
+ status_code=400, detail="MCP server authorization url is not set"
+ )
+
+ if mcp_server.registration_url is None:
+ return dummy_return
+
+ register_data = {
+ "client_name": data.get("client_name", ""),
+ "redirect_uris": [f"{request_base_url}/callback"],
+ "grant_types": data.get("grant_types", []),
+ "response_types": data.get("response_types", []),
+ "token_endpoint_auth_method": data.get("token_endpoint_auth_method", ""),
+ }
+ headers = {
+ "Content-Type": "application/json",
+ "Accept": "application/json",
+ }
+
+ async_client = get_async_httpx_client(
+ llm_provider=httpxSpecialProvider.Oauth2Register
+ )
+ response = await async_client.post(
+ mcp_server.registration_url,
+ headers=headers,
+ json=register_data,
+ )
+ response.raise_for_status()
+
+ token_response = response.json()
+
+ return JSONResponse(token_response)
diff --git a/litellm/proxy/_experimental/mcp_server/mcp_server_manager.py b/litellm/proxy/_experimental/mcp_server/mcp_server_manager.py
index 1705d1e2ff8..631aa2e897b 100644
--- a/litellm/proxy/_experimental/mcp_server/mcp_server_manager.py
+++ b/litellm/proxy/_experimental/mcp_server/mcp_server_manager.py
@@ -206,6 +206,7 @@ class MCPServerManager:
scopes=server_config.get("scopes", None),
authorization_url=server_config.get("authorization_url", None),
token_url=server_config.get("token_url", None),
+ registration_url=server_config.get("registration_url", None),
# TODO: utility fn the default values
transport=server_config.get("transport", MCPTransport.http),
auth_type=server_config.get("auth_type", None),
@@ -356,12 +357,12 @@ class MCPServerManager:
)
# Update tool name to server name mapping (for both prefixed and base names)
- self.tool_name_to_mcp_server_name_mapping[base_tool_name] = (
- server_prefix
- )
- self.tool_name_to_mcp_server_name_mapping[prefixed_tool_name] = (
- server_prefix
- )
+ self.tool_name_to_mcp_server_name_mapping[
+ base_tool_name
+ ] = server_prefix
+ self.tool_name_to_mcp_server_name_mapping[
+ prefixed_tool_name
+ ] = server_prefix
registered_count += 1
verbose_logger.debug(
@@ -431,6 +432,7 @@ class MCPServerManager:
scopes=getattr(mcp_server, "scopes", None),
authorization_url=getattr(mcp_server, "authorization_url", None),
token_url=getattr(mcp_server, "token_url", None),
+ registration_url=getattr(mcp_server, "registration_url", None),
# Stdio-specific fields
command=getattr(mcp_server, "command", None),
args=getattr(mcp_server, "args", None) or [],
diff --git a/litellm/proxy/_experimental/mcp_server/server.py b/litellm/proxy/_experimental/mcp_server/server.py
index 77d6abfed62..e380d88ee70 100644
--- a/litellm/proxy/_experimental/mcp_server/server.py
+++ b/litellm/proxy/_experimental/mcp_server/server.py
@@ -884,6 +884,26 @@ if MCP_AVAILABLE:
verbose_logger.debug(
f"MCP server auth headers: {list(mcp_server_auth_headers.keys()) if mcp_server_auth_headers else None}"
)
+ # https://datatracker.ietf.org/doc/html/rfc9728#name-www-authenticate-response
+ for server_name in mcp_servers or []:
+ server = global_mcp_server_manager.get_mcp_server_by_name(server_name)
+ if server and server.auth_type == MCPAuth.oauth2 and not oauth2_headers:
+ from starlette.requests import Request
+
+ request = Request(scope)
+ base_url = str(request.base_url).rstrip("/")
+
+ authorization_uri = (
+ f"Bearer authorization_uri="
+ f"{base_url}/.well-known/oauth-authorization-server/{server_name}"
+ )
+
+ raise HTTPException(
+ status_code=401,
+ detail="Unauthorized",
+ headers={"www-authenticate": authorization_uri},
+ )
+
# Set the auth context variable for easy access in MCP functions
set_auth_context(
user_api_key_auth=user_api_key_auth,
diff --git a/litellm/types/llms/custom_http.py b/litellm/types/llms/custom_http.py
index e7d2b9dabcc..6b86f55e025 100644
--- a/litellm/types/llms/custom_http.py
+++ b/litellm/types/llms/custom_http.py
@@ -16,6 +16,7 @@ class httpxSpecialProvider(str, Enum):
GuardrailCallback = "guardrail_callback"
Caching = "caching"
Oauth2Check = "oauth2_check"
+ Oauth2Register = "oauth2_register"
SecretManager = "secret_manager"
PassThroughEndpoint = "pass_through_endpoint"
PromptFactory = "prompt_factory"
diff --git a/litellm/types/mcp_server/mcp_server_manager.py b/litellm/types/mcp_server/mcp_server_manager.py
index b0ddc017d17..9bbec4e41d8 100644
--- a/litellm/types/mcp_server/mcp_server_manager.py
+++ b/litellm/types/mcp_server/mcp_server_manager.py
@@ -1,10 +1,8 @@
from typing import Any, Dict, List, Optional
from pydantic import BaseModel, ConfigDict
-from typing_extensions import TypedDict
from litellm.proxy._types import MCPAuthType, MCPTransportType
-from litellm.types.mcp import MCPServerCostInfo
# MCPInfo now allows arbitrary additional fields for custom metadata
MCPInfo = Dict[str, Any]
@@ -21,26 +19,27 @@ class MCPServer(BaseModel):
auth_type: Optional[MCPAuthType] = None
authentication_token: Optional[str] = None
mcp_info: Optional[MCPInfo] = None
- extra_headers: Optional[List[str]] = (
- None # allow admin to specify which headers to forward from client to the MCP server
- )
+ extra_headers: Optional[
+ List[str]
+ ] = None # allow admin to specify which headers to forward from client to the MCP server
allowed_tools: Optional[List[str]] = None
disallowed_tools: Optional[List[str]] = None
- allowed_params: Optional[Dict[str, List[str]]] = (
- None # map of tool names to allowed parameter lists
- )
+ allowed_params: Optional[
+ Dict[str, List[str]]
+ ] = None # map of tool names to allowed parameter lists
# OAuth-specific fields
client_id: Optional[str] = None
client_secret: Optional[str] = None
scopes: Optional[List[str]] = None
authorization_url: Optional[str] = None
token_url: Optional[str] = None
+ registration_url: Optional[str] = None
# Stdio-specific fields
command: Optional[str] = None
args: Optional[List[str]] = None
env: Optional[Dict[str, str]] = None
access_groups: Optional[List[str]] = None
- static_headers: Optional[Dict[str, str]] = (
- None # static headers to forward to the MCP server
- )
+ static_headers: Optional[
+ Dict[str, str]
+ ] = None # static headers to forward to the MCP server
model_config = ConfigDict(arbitrary_types_allowed=True)
diff --git a/tests/mcp_tests/test_mcp_server.py b/tests/mcp_tests/test_mcp_server.py
index cc7cd4cd82e..b124b81f766 100644
--- a/tests/mcp_tests/test_mcp_server.py
+++ b/tests/mcp_tests/test_mcp_server.py
@@ -1351,6 +1351,7 @@ def test_add_update_server_with_alias():
mock_mcp_server.client_id = None
mock_mcp_server.client_secret = None
mock_mcp_server.authorization_url = None
+ mock_mcp_server.registration_url = None
mock_mcp_server.token_url = None
# Add server to manager
@@ -1387,6 +1388,7 @@ def test_add_update_server_without_alias():
mock_mcp_server.client_id = None
mock_mcp_server.client_secret = None
mock_mcp_server.authorization_url = None
+ mock_mcp_server.registration_url = None
mock_mcp_server.token_url = None
# Add server to manager
@@ -1423,6 +1425,7 @@ def test_add_update_server_fallback_to_server_id():
mock_mcp_server.client_id = None
mock_mcp_server.client_secret = None
mock_mcp_server.authorization_url = None
+ mock_mcp_server.registration_url = None
mock_mcp_server.token_url = None
# Add server to manager
diff --git a/tests/test_litellm/proxy/_experimental/mcp_server/test_discoverable_endpoints.py b/tests/test_litellm/proxy/_experimental/mcp_server/test_discoverable_endpoints.py
index afa7627952e..8ed0dd0a12a 100644
--- a/tests/test_litellm/proxy/_experimental/mcp_server/test_discoverable_endpoints.py
+++ b/tests/test_litellm/proxy/_experimental/mcp_server/test_discoverable_endpoints.py
@@ -1,6 +1,6 @@
"""Tests for MCP OAuth discoverable endpoints"""
import pytest
-from unittest.mock import MagicMock, patch
+from unittest.mock import AsyncMock, MagicMock, patch
@pytest.mark.asyncio
@@ -53,7 +53,8 @@ async def test_authorize_endpoint_includes_response_type():
# Call authorize endpoint
response = await authorize(
request=mock_request,
- client_id="test_oauth",
+ client_id="test_client_id",
+ mcp_server_name="test_oauth",
redirect_uri="https://client.example.com/callback",
state="test_state",
)
@@ -118,7 +119,8 @@ async def test_authorize_endpoint_forwards_pkce_parameters():
# Call authorize endpoint with PKCE parameters
response = await authorize(
request=mock_request,
- client_id="google_mcp",
+ client_id="669428968603-test.apps.googleusercontent.com",
+ mcp_server_name="google_mcp",
redirect_uri="http://localhost:60108/callback",
state="test_client_state",
code_challenge="x6YH_qgwbvOzbsHDuL1sW9gYkR9-gObUiIB5RkPwxDk",
@@ -204,8 +206,9 @@ async def test_token_endpoint_forwards_code_verifier():
grant_type="authorization_code",
code="4/test_authorization_code",
redirect_uri="http://localhost:60108/callback",
- client_id="google_mcp",
- client_secret="dummy",
+ client_id="669428968603-test.apps.googleusercontent.com",
+ mcp_server_name="google_mcp",
+ client_secret="GOCSPX-test_secret",
code_verifier="test_code_verifier_from_client",
)
@@ -226,3 +229,161 @@ async def test_token_endpoint_forwards_code_verifier():
token_data = json.loads(response_data)
assert token_data["access_token"] == "ya29.test_access_token"
assert token_data["token_type"] == "Bearer"
+
+
+
+async def test_register_client_without_mcp_server_name_returns_dummy():
+ try:
+ from litellm.proxy._experimental.mcp_server.discoverable_endpoints import register_client
+ from fastapi import Request
+ except ImportError:
+ pytest.skip("MCP discoverable endpoints not available")
+
+ mock_request = MagicMock(spec=Request)
+ mock_request.base_url = "https://proxy.litellm.example/"
+ with patch(
+ "litellm.proxy._experimental.mcp_server.discoverable_endpoints._read_request_body",
+ new=AsyncMock(return_value={}),
+ ):
+ result = await register_client(request=mock_request)
+
+ assert result == {
+ "client_id": "dummy_client",
+ "client_secret": "dummy",
+ "redirect_uris": ["https://proxy.litellm.example/callback"],
+ }
+
+
+async def test_register_client_returns_existing_server_credentials():
+ try:
+ from litellm.proxy._experimental.mcp_server.discoverable_endpoints import register_client
+ from litellm.proxy._experimental.mcp_server.mcp_server_manager import global_mcp_server_manager
+ from litellm.types.mcp import MCPAuth
+ from litellm.types.mcp_server.mcp_server_manager import MCPServer
+ from litellm.proxy._types import MCPTransport
+ from fastapi import Request
+ except ImportError:
+ pytest.skip("MCP discoverable endpoints not available")
+
+ global_mcp_server_manager.registry.clear()
+ oauth2_server = MCPServer(
+ server_id="stored_server",
+ name="stored_server",
+ server_name="stored_server",
+ alias="stored_server",
+ transport=MCPTransport.http,
+ auth_type=MCPAuth.oauth2,
+ client_id="existing-client",
+ client_secret="existing-secret",
+ authorization_url="https://provider.example/oauth/authorize",
+ token_url="https://provider.example/oauth/token",
+ )
+ global_mcp_server_manager.registry[oauth2_server.server_id] = oauth2_server
+
+ mock_request = MagicMock(spec=Request)
+ mock_request.base_url = "https://proxy.litellm.example/"
+
+ try:
+ with patch(
+ "litellm.proxy._experimental.mcp_server.discoverable_endpoints._read_request_body",
+ new=AsyncMock(return_value={}),
+ ):
+ result = await register_client(
+ request=mock_request, mcp_server_name=oauth2_server.server_name
+ )
+ finally:
+ global_mcp_server_manager.registry.clear()
+
+ assert result == {
+ "client_id": "existing-client",
+ "client_secret": "existing-secret",
+ "redirect_uris": ["https://proxy.litellm.example/callback"],
+ }
+
+
+async def test_register_client_remote_registration_success():
+ try:
+ from litellm.proxy._experimental.mcp_server.discoverable_endpoints import register_client
+ from litellm.proxy._experimental.mcp_server.mcp_server_manager import global_mcp_server_manager
+ from litellm.types.mcp import MCPAuth
+ from litellm.types.mcp_server.mcp_server_manager import MCPServer
+ from litellm.proxy._types import MCPTransport
+ from fastapi import Request
+ except ImportError:
+ pytest.skip("MCP discoverable endpoints not available")
+
+ global_mcp_server_manager.registry.clear()
+ oauth2_server = MCPServer(
+ server_id="remote_server",
+ name="remote_server",
+ server_name="remote_server",
+ alias="remote_server",
+ transport=MCPTransport.http,
+ auth_type=MCPAuth.oauth2,
+ client_id=None,
+ client_secret=None,
+ authorization_url="https://provider.example/oauth/authorize",
+ token_url="https://provider.example/oauth/token",
+ registration_url="https://provider.example/oauth/register",
+ )
+ global_mcp_server_manager.registry[oauth2_server.server_id] = oauth2_server
+
+ mock_request = MagicMock(spec=Request)
+ mock_request.base_url = "https://proxy.litellm.example/"
+
+ request_payload = {
+ "client_name": "Litellm Proxy",
+ "grant_types": ["authorization_code"],
+ "response_types": ["code"],
+ "token_endpoint_auth_method": "client_secret_post",
+ }
+
+ mock_response = MagicMock()
+ mock_response.json.return_value = {
+ "client_id": "generated-client",
+ "client_secret": "generated-secret",
+ }
+ mock_response.raise_for_status = MagicMock()
+ mock_async_client = MagicMock()
+ mock_async_client.post = AsyncMock(return_value=mock_response)
+
+ try:
+ with patch(
+ "litellm.proxy._experimental.mcp_server.discoverable_endpoints._read_request_body",
+ new=AsyncMock(return_value=request_payload),
+ ), patch(
+ "litellm.proxy._experimental.mcp_server.discoverable_endpoints.get_async_httpx_client",
+ return_value=mock_async_client,
+ ):
+ response = await register_client(
+ request=mock_request, mcp_server_name=oauth2_server.server_name
+ )
+ finally:
+ global_mcp_server_manager.registry.clear()
+
+ import json
+
+ assert response.status_code == 200
+ payload = json.loads(response.body.decode("utf-8"))
+ assert payload == mock_response.json.return_value
+
+ mock_async_client.post.assert_called_once()
+ call_args = mock_async_client.post.call_args
+ assert call_args.args[0] == oauth2_server.registration_url
+ assert call_args.kwargs["headers"] == {
+ "Content-Type": "application/json",
+ "Accept": "application/json",
+ }
+ assert call_args.kwargs["json"]["redirect_uris"] == [
+ "https://proxy.litellm.example/callback"
+ ]
+ assert call_args.kwargs["json"]["grant_types"] == request_payload["grant_types"]
+ assert (
+ call_args.kwargs["json"]["token_endpoint_auth_method"]
+ == request_payload["token_endpoint_auth_method"]
+ )
+
+