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]

test(mcp): extract inline server fixtures so the eslint inline-object budget stays at baseline

Tin9bff278efe47
diff --git a/ui/litellm-dashboard/eslint-metrics.json b/ui/litellm-dashboard/eslint-metrics.json
index 9431c278387..2e204c63a48 100644
--- a/ui/litellm-dashboard/eslint-metrics.json
+++ b/ui/litellm-dashboard/eslint-metrics.json
@@ -1,7 +1,7 @@
{
"@typescript-eslint/no-explicit-any": 1978,
"complexity": 129,
- "local/no-large-inline-object-arg": 514,
+ "local/no-large-inline-object-arg": 512,
"local/no-long-condition-chain": 233,
"max-depth": 59,
"no-console": 15
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 cfd0ec1dfb4..a4668bddfc3 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
@@ -532,7 +532,7 @@ describe("CreateMCPServer", () => {
});
});
- vi.mocked(networking.createMCPServer).mockResolvedValue({
+ const keptAppServer = {
server_id: "kept-app-server",
server_name: "CF_Keep_Server",
alias: "CF_Keep_Server",
@@ -543,7 +543,8 @@ describe("CreateMCPServer", () => {
created_by: "user-1",
updated_at: "2024-01-01T00:00:00Z",
updated_by: "user-1",
- });
+ };
+ vi.mocked(networking.createMCPServer).mockResolvedValue(keptAppServer);
await act(async () => {
fireEvent.click(screen.getByRole("button", { name: "Add MCP Server" }));
@@ -583,7 +584,7 @@ describe("CreateMCPServer", () => {
// into a mode that now persists credentials onto the server row.
await selectAntOption("Authentication", "True Passthrough (no LiteLLM auth)");
- vi.mocked(networking.createMCPServer).mockResolvedValue({
+ const switchedServer = {
server_id: "switched-server",
server_name: "Switch_Server",
alias: "Switch_Server",
@@ -594,7 +595,8 @@ describe("CreateMCPServer", () => {
created_by: "user-1",
updated_at: "2024-01-01T00:00:00Z",
updated_by: "user-1",
- });
+ };
+ vi.mocked(networking.createMCPServer).mockResolvedValue(switchedServer);
await act(async () => {
fireEvent.click(screen.getByRole("button", { name: "Add MCP Server" }));