From 032c9ffdb4a95cf986a4800d98999bb761af063e Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Wed, 1 Jul 2026 06:50:43 +0000 Subject: [PATCH] fix: prevent proxy auth header collision with OAuth token in testMCPToolsListRequest Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- ui/litellm-dashboard/src/components/networking.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ui/litellm-dashboard/src/components/networking.tsx b/ui/litellm-dashboard/src/components/networking.tsx index 4bf8d6a1c88..7be6cbd31f3 100644 --- a/ui/litellm-dashboard/src/components/networking.tsx +++ b/ui/litellm-dashboard/src/components/networking.tsx @@ -6754,11 +6754,13 @@ export const testMCPToolsListRequest = async ( const headers: Record = { "Content-Type": "application/json", }; - if (accessToken) { - headers[globalLitellmHeaderName] = `Bearer ${accessToken}`; - } if (oauthAccessToken) { headers["Authorization"] = `Bearer ${oauthAccessToken}`; + if (accessToken && globalLitellmHeaderName !== "Authorization") { + headers[globalLitellmHeaderName] = `Bearer ${accessToken}`; + } + } else if (accessToken) { + headers[globalLitellmHeaderName] = `Bearer ${accessToken}`; } const response = await fetch(url, {