diff --git a/ui/litellm-dashboard/src/components/common_components/check_openapi_schema.tsx b/ui/litellm-dashboard/src/components/common_components/check_openapi_schema.tsx index da791541634..1ae2701d684 100644 --- a/ui/litellm-dashboard/src/components/common_components/check_openapi_schema.tsx +++ b/ui/litellm-dashboard/src/components/common_components/check_openapi_schema.tsx @@ -111,6 +111,7 @@ const fieldTooltips: { [key: string]: string } = { key: "Bring your own key value instead of an auto-generated one. Must start with 'sk-' and be at least 16 characters", budget_id: "Attach an existing budget (created via /budget/new) to this key", soft_budget: "Spend threshold that triggers an alert without blocking the key", + spend: "Starting spend in USD recorded for this key. Counts toward its budget", send_invite_email: "Send an invite email to this key's user", max_parallel_requests: "Maximum number of concurrent requests. Requests beyond this limit receive a 429 error", allowed_cache_controls: "Cache control values requests with this key may use, e.g. no-cache, no-store", @@ -160,6 +161,7 @@ const getFieldHelp = (key: string, property: SchemaProperty, type: string): stri const specificHelp: { [key: string]: string } = { max_budget: "Enter maximum budget in USD (e.g., 100.50)", soft_budget: "Enter alert threshold in USD (e.g., 50)", + spend: "Enter starting spend in USD (e.g., 0)", budget_duration: "Select a time period for budget reset", budget_id: "Enter the id of an existing budget", tpm_limit: "Enter maximum tokens per minute (whole number)", diff --git a/ui/litellm-dashboard/src/components/organisms/create_key_button.integration.test.tsx b/ui/litellm-dashboard/src/components/organisms/create_key_button.integration.test.tsx index c2abd51da61..903639b282d 100644 --- a/ui/litellm-dashboard/src/components/organisms/create_key_button.integration.test.tsx +++ b/ui/litellm-dashboard/src/components/organisms/create_key_button.integration.test.tsx @@ -98,6 +98,7 @@ const OPENAPI_SCHEMA = { properties: { key: { type: "string", title: "Key" }, soft_budget: { type: "number", title: "Soft Budget" }, + spend: { anyOf: [{ type: "number" }, { type: "null" }], title: "Spend" }, blocked: { anyOf: [{ type: "boolean" }, { type: "null" }], title: "Blocked" }, max_budget: { type: "number", title: "Max Budget" }, allowed_cache_controls: { anyOf: [{ items: {}, type: "array" }, { type: "null" }] }, @@ -173,6 +174,7 @@ const SECTION_PAYLOAD_ADDITIONS: Record { await openSection(/Optional Settings/i); await openSection(SECTIONS.advanced); await userEvent.type(await screen.findByLabelText("Soft Budget"), "12"); + await userEvent.type(await screen.findByLabelText("Spend"), "5"); await submit(); const payload = await createdPayload(); expect(payload.soft_budget).toBe(12); + expect(payload.spend).toBe(5); expect(payload).toHaveProperty("key"); }); diff --git a/ui/litellm-dashboard/src/components/organisms/create_key_button.tsx b/ui/litellm-dashboard/src/components/organisms/create_key_button.tsx index d47ee1a66c0..a211dddc51b 100644 --- a/ui/litellm-dashboard/src/components/organisms/create_key_button.tsx +++ b/ui/litellm-dashboard/src/components/organisms/create_key_button.tsx @@ -1760,7 +1760,6 @@ const CreateKey: React.FC = ({ team, teams, data, addKey, autoOp "budget_duration", "tpm_limit", "rpm_limit", - "spend", "user_id", "agent_id", "project_id",