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
fix(ui): keep http and upper-case https skill sources clickable on the detail page
ryan2bb478fb59b9
diff --git a/ui/litellm-dashboard/src/components/claude_code_plugins/helpers.test.ts b/ui/litellm-dashboard/src/components/claude_code_plugins/helpers.test.tsindex 5bf782aabf3..e40e0e0c783 100644--- a/ui/litellm-dashboard/src/components/claude_code_plugins/helpers.test.ts+++ b/ui/litellm-dashboard/src/components/claude_code_plugins/helpers.test.ts@@ -157,6 +157,15 @@ describe("getSourceLink", () => {expect(getSourceLink({ source: "github" })).toBeNull();});+ it("keeps http and upper-case https urls registered through the api clickable", () => {+ expect(getSourceLink({ source: "url", url: "http://git.internal.example/org/repo" })).toBe(+ "http://git.internal.example/org/repo",+ );+ expect(getSourceLink({ source: "git-subdir", url: "HTTPS://gitlab.com/org/repo", path: "sub/dir" })).toBe(+ "HTTPS://gitlab.com/org/repo",+ );+ });+it("returns null for an ssh clone url, which is not browsable", () => {expect(getSourceLink({ source: "url", url: "[email protected]:org/repo.git" })).toBeNull();expect(getSourceLink({ source: "url", url: "ssh://[email protected]/org/repo.git" })).toBeNull();diff --git a/ui/litellm-dashboard/src/components/claude_code_plugins/helpers.ts b/ui/litellm-dashboard/src/components/claude_code_plugins/helpers.tsindex b4d9eab08ec..8cf620d9077 100644--- a/ui/litellm-dashboard/src/components/claude_code_plugins/helpers.ts+++ b/ui/litellm-dashboard/src/components/claude_code_plugins/helpers.ts@@ -37,6 +37,7 @@ const IPV4_HOST_REGEX = /^\d{1,3}(\.\d{1,3}){3}$/;const GITHUB_ORG_REGEX = /^[A-Za-z0-9-]+$/;const GITHUB_REPO_REGEX = /^[A-Za-z0-9._-]+$/;+const BROWSABLE_URL_REGEX = /^https?:\/\//i;const SSH_SCHEME = "ssh://";const SSH_SCP_REGEX = /^([a-z0-9._-]+)@([^:/@]+):(?!\/)(.+)$/i;@@ -316,7 +317,7 @@ export const getSourceLink = (source: PluginSource): string | null => {return `https://github.com/${source.repo}`;}const linksToUrl = source.source === "url" || source.source === "git-subdir" || source.source === "archive";- return linksToUrl && source.url?.startsWith("https://") ? source.url : null;+ return linksToUrl && source.url && BROWSABLE_URL_REGEX.test(source.url) ? source.url : null;};/**