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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
refactor: Simplify validateMCPServerName to match original ternary style
Milan1d67476ed0ef
diff --git a/ui/litellm-dashboard/src/components/mcp_tools/utils.tsx b/ui/litellm-dashboard/src/components/mcp_tools/utils.tsxindex 1d6ae540434..0039ccc62ba 100644--- a/ui/litellm-dashboard/src/components/mcp_tools/utils.tsx+++ b/ui/litellm-dashboard/src/components/mcp_tools/utils.tsx@@ -47,15 +47,7 @@ export const validateMCPServerUrl = (value: string) => {};export const validateMCPServerName = (value: string) => {- if (!value) return Promise.resolve();-- if (value.includes("-")) {- return Promise.reject("Server name cannot contain '-' (hyphen). Please use '_' (underscore) instead.");- }-- if (value.includes(" ")) {- return Promise.reject("Server name cannot contain spaces. Please use '_' (underscore) instead.");- }-- return Promise.resolve();+ return value && (value.includes("-") || value.includes(" "))+ ? Promise.reject("Server name cannot contain '-' (hyphen) or spaces. Please use '_' (underscore) instead.")+ : Promise.resolve();};