From 5f0bef313346644d37b779ae9ed1b212eb5e1d91 Mon Sep 17 00:00:00 2001 From: Darien Kindlund Date: Sat, 21 Feb 2026 16:51:56 -0500 Subject: [PATCH] fix(ui): preserve logging_settings in key metadata on update The logging_settings condition used a bare truthiness check which failed when the form field was undefined or not properly synced from the EditLoggingSettings component. Changed to explicit Array.isArray() check consistent with the tags field pattern. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../src/components/templates/key_info_view.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/litellm-dashboard/src/components/templates/key_info_view.tsx b/ui/litellm-dashboard/src/components/templates/key_info_view.tsx index 0a8a8c45df7..f2a12c90875 100644 --- a/ui/litellm-dashboard/src/components/templates/key_info_view.tsx +++ b/ui/litellm-dashboard/src/components/templates/key_info_view.tsx @@ -203,7 +203,7 @@ export default function KeyInfoView({ ...parsedMetadata, ...(Array.isArray(formValues.tags) && formValues.tags.length > 0 ? { tags: formValues.tags } : {}), ...(formValues.guardrails?.length > 0 ? { guardrails: formValues.guardrails } : {}), - ...(formValues.logging_settings ? { logging: formValues.logging_settings } : {}), + ...(Array.isArray(formValues.logging_settings) && formValues.logging_settings.length > 0 ? { logging: formValues.logging_settings } : {}), ...(formValues.disabled_callbacks?.length > 0 ? { litellm_disabled_callbacks: mapDisplayToInternalNames(formValues.disabled_callbacks), @@ -222,7 +222,7 @@ export default function KeyInfoView({ ...rest, ...(Array.isArray(formValues.tags) && formValues.tags.length > 0 ? { tags: formValues.tags } : {}), ...(formValues.guardrails?.length > 0 ? { guardrails: formValues.guardrails } : {}), - ...(formValues.logging_settings ? { logging: formValues.logging_settings } : {}), + ...(Array.isArray(formValues.logging_settings) && formValues.logging_settings.length > 0 ? { logging: formValues.logging_settings } : {}), ...(formValues.disabled_callbacks?.length > 0 ? { litellm_disabled_callbacks: mapDisplayToInternalNames(formValues.disabled_callbacks),