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(ui): expose true_passthrough and oauth_delegate auth types with a no-auth warning

Tinceeb90abdba0
diff --git a/ui/litellm-dashboard/src/components/mcp_tools/TruePassthroughWarning.tsx b/ui/litellm-dashboard/src/components/mcp_tools/TruePassthroughWarning.tsx
new file mode 100644
index 00000000000..b52d3f4c672
--- /dev/null
+++ b/ui/litellm-dashboard/src/components/mcp_tools/TruePassthroughWarning.tsx
@@ -0,0 +1,21 @@
+import React from "react";
+import { Alert } from "antd";
+import { AUTH_TYPE } from "./types";
+
+/**
+ * Warning shown in the create/edit MCP server forms when auth_type
+ * true_passthrough is selected: the gateway performs no admission auth for
+ * that server, so callers reach the upstream without a LiteLLM identity.
+ */
+export default function TruePassthroughWarning({ authType }: { authType?: string | null }) {
+ if (authType !== AUTH_TYPE.TRUE_PASSTHROUGH) return null;
+ return (
+ <Alert
+ type="warning"
+ showIcon
+ className="mb-4 rounded-lg"
+ message="True Passthrough disables LiteLLM authentication for this server"
+ description="Anyone who can reach the gateway can call this server without a LiteLLM key. The caller's Authorization header is forwarded to the upstream verbatim, per-key and per-team rate limits and spend tracking do not apply, and the upstream is fully responsible for authenticating callers. Choose OAuth Delegate instead if callers should still authenticate to LiteLLM."
+ />
+ );
+}
diff --git a/ui/litellm-dashboard/src/components/mcp_tools/create_mcp_server.test.tsx b/ui/litellm-dashboard/src/components/mcp_tools/create_mcp_server.test.tsx
index 36af2f8d9fc..27e6d6a8e3d 100644
--- a/ui/litellm-dashboard/src/components/mcp_tools/create_mcp_server.test.tsx
+++ b/ui/litellm-dashboard/src/components/mcp_tools/create_mcp_server.test.tsx
@@ -164,6 +164,31 @@ describe("CreateMCPServer", () => {
});
});
+ it("should warn that LiteLLM auth is disabled when True Passthrough is selected", async () => {
+ await selectHttpTransport();
+
+ await selectAntOption("Authentication", "True Passthrough (no LiteLLM auth)");
+
+ await waitFor(() => {
+ expect(
+ screen.getByText("True Passthrough disables LiteLLM authentication for this server"),
+ ).toBeInTheDocument();
+ });
+ });
+
+ it("should not show the True Passthrough warning when OAuth Delegate is selected", async () => {
+ await selectHttpTransport();
+
+ await selectAntOption("Authentication", "OAuth Delegate (client-supplied upstream token)");
+
+ await waitFor(() => {
+ expect(screen.getAllByText("OAuth Delegate (client-supplied upstream token)").length).toBeGreaterThan(0);
+ });
+ expect(
+ screen.queryByText("True Passthrough disables LiteLLM authentication for this server"),
+ ).not.toBeInTheDocument();
+ });
+
it("should not require auth value when creating a server with API Key auth type", async () => {
await selectHttpTransport();
diff --git a/ui/litellm-dashboard/src/components/mcp_tools/create_mcp_server.tsx b/ui/litellm-dashboard/src/components/mcp_tools/create_mcp_server.tsx
index 10668468c15..1362835f475 100644
--- a/ui/litellm-dashboard/src/components/mcp_tools/create_mcp_server.tsx
+++ b/ui/litellm-dashboard/src/components/mcp_tools/create_mcp_server.tsx
@@ -16,6 +16,7 @@ import {
MCP_OAUTH2_FLOW_INTERACTIVE,
} from "./types";
import OAuthFormFields from "./OAuthFormFields";
+import TruePassthroughWarning from "./TruePassthroughWarning";
import TokenExchangeFormFields from "./TokenExchangeFormFields";
import MCPServerCostConfig from "./mcp_server_cost_config";
import MCPConnectionStatus from "./mcp_connection_status";
@@ -970,9 +971,15 @@ const CreateMCPServer: React.FC<CreateMCPServerProps> = ({
<Select.Option value="oauth2">OAuth</Select.Option>
<Select.Option value="oauth2_token_exchange">OAuth Token Exchange (OBO)</Select.Option>
<Select.Option value="aws_sigv4">AWS SigV4 (Bedrock AgentCore MCPs)</Select.Option>
+ <Select.Option value="true_passthrough">True Passthrough (no LiteLLM auth)</Select.Option>
+ <Select.Option value="oauth_delegate">
+ OAuth Delegate (client-supplied upstream token)
+ </Select.Option>
</Select>
</Form.Item>
+ <TruePassthroughWarning authType={authType} />
+
{shouldShowAuthValueField && (
<Form.Item
label={
diff --git a/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_edit.test.tsx b/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_edit.test.tsx
index a1c21ef56b7..cf07dccea66 100644
--- a/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_edit.test.tsx
+++ b/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_edit.test.tsx
@@ -307,6 +307,45 @@ describe("MCPServerEdit (delegate auth)", () => {
});
});
+describe("MCPServerEdit (true passthrough warning)", () => {
+ beforeEach(() => {
+ vi.clearAllMocks();
+ });
+
+ const renderWithAuthType = (authType: string) =>
+ render(
+ <MCPServerEdit
+ mcpServer={{
+ ...interactiveOAuthServer,
+ auth_type: authType,
+ }}
+ accessToken="access-token"
+ onCancel={vi.fn()}
+ onSuccess={vi.fn()}
+ availableAccessGroups={[]}
+ />,
+ );
+
+ it("warns that LiteLLM auth is disabled for a true_passthrough server", async () => {
+ renderWithAuthType("true_passthrough");
+
+ await waitFor(() => {
+ expect(screen.getByText("True Passthrough disables LiteLLM authentication for this server")).toBeInTheDocument();
+ });
+ });
+
+ it("does not warn for an oauth_delegate server", async () => {
+ renderWithAuthType("oauth_delegate");
+
+ await waitFor(() => {
+ expect(screen.getAllByRole("button", { name: "Save Changes" }).length).toBeGreaterThan(0);
+ });
+ expect(
+ screen.queryByText("True Passthrough disables LiteLLM authentication for this server"),
+ ).not.toBeInTheDocument();
+ });
+});
+
describe("MCPServerEdit (auth type switch)", () => {
beforeEach(() => {
vi.clearAllMocks();
diff --git a/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_edit.tsx b/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_edit.tsx
index 70632b459fc..2c4f674c14b 100644
--- a/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_edit.tsx
+++ b/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_edit.tsx
@@ -18,6 +18,7 @@ import { getToken, isTokenValid, setToken } from "@/utils/mcpTokenStore";
import { buildMcpPassthroughAuthHeader } from "@/utils/mcpHeaderUtils";
import MCPServerCostConfig from "./mcp_server_cost_config";
import MCPPermissionManagement from "./MCPPermissionManagement";
+import TruePassthroughWarning from "./TruePassthroughWarning";
import MCPToolConfiguration from "./mcp_tool_configuration";
import StdioConfiguration from "./StdioConfiguration";
import TokenExchangeFormFields from "./TokenExchangeFormFields";
@@ -874,18 +875,25 @@ const MCPServerEdit: React.FC<MCPServerEditProps> = ({
{/* Authentication - for HTTP, SSE, and OpenAPI */}
{!isStdioTransport && (
- <Form.Item label="Authentication" name="auth_type" rules={[{ required: true }]}>
- <Select>
- <Select.Option value="none">None</Select.Option>
- <Select.Option value="api_key">API Key</Select.Option>
- <Select.Option value="bearer_token">Bearer Token</Select.Option>
- <Select.Option value="token">Token</Select.Option>
- <Select.Option value="basic">Basic Auth</Select.Option>
- <Select.Option value="oauth2">OAuth</Select.Option>
- <Select.Option value="oauth2_token_exchange">OAuth Token Exchange (OBO)</Select.Option>
- <Select.Option value="aws_sigv4">AWS SigV4 (Bedrock AgentCore MCPs)</Select.Option>
- </Select>
- </Form.Item>
+ <>
+ <Form.Item label="Authentication" name="auth_type" rules={[{ required: true }]}>
+ <Select>
+ <Select.Option value="none">None</Select.Option>
+ <Select.Option value="api_key">API Key</Select.Option>
+ <Select.Option value="bearer_token">Bearer Token</Select.Option>
+ <Select.Option value="token">Token</Select.Option>
+ <Select.Option value="basic">Basic Auth</Select.Option>
+ <Select.Option value="oauth2">OAuth</Select.Option>
+ <Select.Option value="oauth2_token_exchange">OAuth Token Exchange (OBO)</Select.Option>
+ <Select.Option value="aws_sigv4">AWS SigV4 (Bedrock AgentCore MCPs)</Select.Option>
+ <Select.Option value="true_passthrough">True Passthrough (no LiteLLM auth)</Select.Option>
+ <Select.Option value="oauth_delegate">
+ OAuth Delegate (client-supplied upstream token)
+ </Select.Option>
+ </Select>
+ </Form.Item>
+ <TruePassthroughWarning authType={authType} />
+ </>
)}
{isStdioTransport && (
diff --git a/ui/litellm-dashboard/src/components/mcp_tools/types.tsx b/ui/litellm-dashboard/src/components/mcp_tools/types.tsx
index 9469d7bd89e..70cc8129bf1 100644
--- a/ui/litellm-dashboard/src/components/mcp_tools/types.tsx
+++ b/ui/litellm-dashboard/src/components/mcp_tools/types.tsx
@@ -41,6 +41,8 @@ export const AUTH_TYPE = {
OAUTH2: "oauth2",
OAUTH2_TOKEN_EXCHANGE: "oauth2_token_exchange",
AWS_SIGV4: "aws_sigv4",
+ TRUE_PASSTHROUGH: "true_passthrough",
+ OAUTH_DELEGATE: "oauth_delegate",
};
export const OAUTH_FLOW = {