From cd7b25842b10c5e38a0db820fe9e1a5e07cc7aba Mon Sep 17 00:00:00 2001 From: joereyna Date: Fri, 13 Mar 2026 19:46:02 -0700 Subject: [PATCH] fix: narrow oauth2_flow type to Literal in NewMCPServerRequest --- litellm/proxy/_types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/proxy/_types.py b/litellm/proxy/_types.py index f4c3a03fb6f..dfc7c3f353c 100644 --- a/litellm/proxy/_types.py +++ b/litellm/proxy/_types.py @@ -1123,7 +1123,7 @@ class NewMCPServerRequest(LiteLLMPydanticObjectBase): authorization_url: Optional[str] = None token_url: Optional[str] = None registration_url: Optional[str] = None - oauth2_flow: Optional[str] = None + oauth2_flow: Optional[Literal["client_credentials", "authorization_code"]] = None allow_all_keys: bool = False available_on_public_internet: bool = True is_byok: bool = False