From 2a320b98a63cf38e1a16484cdce5df6fc7388a25 Mon Sep 17 00:00:00 2001 From: Bytechoreographer Date: Thu, 16 Apr 2026 16:49:30 +0800 Subject: [PATCH] fix(ui): AntdSelect null value warning in AddModelForm credential picker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ant Design Select does not accept null as an option value. Change { value: null, label: "None" } → { value: "", label: "None" } and remove initialValue={null} from the Form.Item (no initial selection is correctly represented by undefined, not null). The submit handler already deletes litellm_credential_name from params when absent, so the empty string is handled safely. Co-Authored-By: Claude Sonnet 4 (1M context) --- .../src/components/add_model/AddModelForm.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/litellm-dashboard/src/components/add_model/AddModelForm.tsx b/ui/litellm-dashboard/src/components/add_model/AddModelForm.tsx index f27d9bac4cd..3ccb8b93be3 100644 --- a/ui/litellm-dashboard/src/components/add_model/AddModelForm.tsx +++ b/ui/litellm-dashboard/src/components/add_model/AddModelForm.tsx @@ -234,14 +234,14 @@ const AddModelForm: React.FC = ({ - + (option?.label ?? "").toLowerCase().includes(input.toLowerCase())} options={[ - { value: null, label: "None" }, + { value: "", label: "None" }, ...credentials.map((credential) => ({ value: credential.credential_name, label: credential.credential_name,