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
Remove Description Field from LLM Credentials (#16608)
yuneng-jiang6063a751550d
diff --git a/ui/litellm-dashboard/src/components/model_add/credentials.test.tsx b/ui/litellm-dashboard/src/components/model_add/credentials.test.tsxnew file mode 100644index 00000000000..8e356baa12b--- /dev/null+++ b/ui/litellm-dashboard/src/components/model_add/credentials.test.tsx@@ -0,0 +1,50 @@+import { CredentialItem } from "@/components/networking";+import { render, waitFor } from "@testing-library/react";+import { UploadProps } from "antd/es/upload";+import { describe, expect, it, vi } from "vitest";+import CredentialsPanel from "./credentials";++const DEFAULT_UPLOAD_PROPS = {} as UploadProps;++describe("CredentialsPanel", () => {+ it("renders without crashing and fetches credentials when token exists", async () => {+ const fetchCredentials = vi.fn(() => Promise.resolve());++ const { getByRole, getByText } = render(+ <CredentialsPanel+ accessToken="test-token"+ uploadProps={DEFAULT_UPLOAD_PROPS}+ credentialList={[]}+ fetchCredentials={fetchCredentials}+ />,+ );++ await waitFor(() => {+ expect(getByRole("button", { name: /add credential/i })).toBeInTheDocument();+ expect(getByText("Credential Name")).toBeInTheDocument();+ expect(getByText("Provider")).toBeInTheDocument();+ });+ });++ it("displays provided credentials and still calls the fetch helper", async () => {+ const fetchCredentials = vi.fn(() => Promise.resolve());+ const credentials: CredentialItem[] = [+ {+ credential_name: "openai-key",+ credential_values: {},+ credential_info: { custom_llm_provider: "openai" },+ },+ ];++ const { getByText } = render(+ <CredentialsPanel+ accessToken="another-token"+ uploadProps={DEFAULT_UPLOAD_PROPS}+ credentialList={credentials}+ fetchCredentials={fetchCredentials}+ />,+ );++ await waitFor(() => expect(getByText("openai-key")).toBeInTheDocument());+ });+});diff --git a/ui/litellm-dashboard/src/components/model_add/credentials.tsx b/ui/litellm-dashboard/src/components/model_add/credentials.tsxindex 1368796a677..e36a759294b 100644--- a/ui/litellm-dashboard/src/components/model_add/credentials.tsx+++ b/ui/litellm-dashboard/src/components/model_add/credentials.tsx@@ -143,7 +143,6 @@ const CredentialsPanel: React.FC<CredentialsPanelProps> = ({<TableRow><TableHeaderCell>Credential Name</TableHeaderCell><TableHeaderCell>Provider</TableHeaderCell>- <TableHeaderCell>Description</TableHeaderCell></TableRow></TableHead><TableBody>@@ -160,7 +159,6 @@ const CredentialsPanel: React.FC<CredentialsPanelProps> = ({<TableCell>{renderProviderBadge((credential.credential_info?.custom_llm_provider as string) || "-")}</TableCell>- <TableCell>{credential.credential_info?.description || "-"}</TableCell><TableCell><Buttonicon={PencilAltIcon}