#29261 [Bug]: Interactive OAuth2 MCP server returns 500 instead of 401+WWW-Authenticate when x-litellm-api-key is present but no Google OAuth token exists yet
## Description
When an MCP server is configured with `auth_type: oauth2`, `authorization_url`, and `token_url` (interactive PKCE flow — NOT `delegate_auth_to_upstream`), sending a request with **only** `x-litellm-api-key` (valid LiteLLM key, no `Authorization` header) returns **HTTP 500** instead of a clean **HTTP 401 + `WWW-Authenticate`** header.
This prevents MCP clients (OpenCode, Claude Code) from initiating the OAuth browser flow, because they need a clean 401 with the `authorization_uri` to discover the authorize endpoint. Instead they receive a 500 and fail with `"Error POSTing to endpoint: {"error":"MCP request failed","details":""}"`.
## LiteLLM Version
`1.85.0` (Docker image `docker.io/litellm/litellm:1.85.0`)
## Configuration
```yaml mcp_servers: Gmail: url: "https://gmailmcp.googleapis.com/mcp/v1" transport: "http" auth_type: "oauth2" client_id: "<google-oauth-client-id>" client_secret: "<google-oauth-client-secret>" authorization_url: "https://accounts.google.com/o/oauth2/v2/auth" token_url: "https://oauth2.googleapis.com/token" scopes: - "https://www.googleapis.com/auth/gmail.modify" - "https://www.googleapis.com/au…