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
(UI) fix - allow editing key alias on Admin UI (#6776)
Ishaan Jaffbb16abc0437e
diff --git a/litellm/proxy/management_endpoints/key_management_endpoints.py b/litellm/proxy/management_endpoints/key_management_endpoints.pyindex e38236e9b59..941fb3b36f7 100644--- a/litellm/proxy/management_endpoints/key_management_endpoints.py+++ b/litellm/proxy/management_endpoints/key_management_endpoints.py@@ -288,11 +288,15 @@ def prepare_key_update_data(non_default_values["expires"] = expiresif "budget_duration" in non_default_values:- duration_s = _duration_in_seconds(- duration=non_default_values["budget_duration"]- )- key_reset_at = datetime.now(timezone.utc) + timedelta(seconds=duration_s)- non_default_values["budget_reset_at"] = key_reset_at+ budget_duration = non_default_values.pop("budget_duration")+ if (+ budget_duration+ and (isinstance(budget_duration, str))+ and len(budget_duration) > 0+ ):+ duration_s = _duration_in_seconds(duration=budget_duration)+ key_reset_at = datetime.now(timezone.utc) + timedelta(seconds=duration_s)+ non_default_values["budget_reset_at"] = key_reset_at_metadata = existing_key_row.metadata or {}diff --git a/ui/litellm-dashboard/src/components/view_key_table.tsx b/ui/litellm-dashboard/src/components/view_key_table.tsxindex 474a308e9f0..b657ed47c63 100644--- a/ui/litellm-dashboard/src/components/view_key_table.tsx+++ b/ui/litellm-dashboard/src/components/view_key_table.tsx@@ -291,6 +291,10 @@ const ViewKeyTable: React.FC<ViewKeyTableProps> = ({><>+ <Form.Item name="key_alias" label="Key Alias">+ <TextInput />+ </Form.Item>+<Form.Item label="Models" name="models" rules={[{validator: (rule, value) => {