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]

fix: narrow oauth2_flow type to Literal in NewMCPServerRequest

joereynacd7b25842b10
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