From f7cf6c4c8769d3d3e23919bb88298b07f8e824af Mon Sep 17 00:00:00 2001 From: Gerry Tao Date: Fri, 10 Apr 2026 03:11:11 -0700 Subject: [PATCH] feat: add Z.AI provider to UI dashboard Registers Z.AI in the dashboard's provider dropdown so users can configure Z.AI models from the UI. Backend support for the zai/ prefix already exists in litellm/llms/zai/. - provider_create_fields.json: add ZAI entry with api_key (required) and api_base (optional, defaults to https://api.z.ai/api/paas/v4). The api_base tooltip also notes the alternative GLM Coding Plan endpoint at https://api.z.ai/api/coding/paas/v4 for subscribers. - provider_info_helpers.tsx: register ZAI in Providers enum, provider_map, and providerLogoMap. - zai.svg: sourced from LobeHub icons (https://lobehub.com/icons/zai), matches https://chat.z.ai branding. Follows the pattern of MiniMax PR #18496. Fixes #25482 --- .../provider_create_fields.json | 28 +++++++++++++++++++ .../public/assets/logos/zai.svg | 1 + .../src/components/provider_info_helpers.tsx | 3 ++ 3 files changed, 32 insertions(+) create mode 100644 ui/litellm-dashboard/public/assets/logos/zai.svg diff --git a/litellm/proxy/public_endpoints/provider_create_fields.json b/litellm/proxy/public_endpoints/provider_create_fields.json index 860593a6eab..3efe3810cf7 100644 --- a/litellm/proxy/public_endpoints/provider_create_fields.json +++ b/litellm/proxy/public_endpoints/provider_create_fields.json @@ -3056,6 +3056,34 @@ ], "default_model_placeholder": "gpt-3.5-turbo" }, + { + "provider": "ZAI", + "provider_display_name": "Z.AI", + "litellm_provider": "zai", + "credential_fields": [ + { + "key": "api_key", + "label": "API Key", + "placeholder": "your-zai-api-key", + "tooltip": "Z.AI API Key from https://z.ai/manage-apikey/apikey-list", + "required": true, + "field_type": "password", + "options": null, + "default_value": null + }, + { + "key": "api_base", + "label": "API Base", + "placeholder": "https://api.z.ai/api/paas/v4", + "tooltip": "General: https://api.z.ai/api/paas/v4. GLM Coding Plan: https://api.z.ai/api/coding/paas/v4. Override for self-hosted endpoints.", + "required": false, + "field_type": "text", + "options": null, + "default_value": "https://api.z.ai/api/paas/v4" + } + ], + "default_model_placeholder": "zai/glm-4.6" + }, { "provider": "CURSOR", "provider_display_name": "Cursor", diff --git a/ui/litellm-dashboard/public/assets/logos/zai.svg b/ui/litellm-dashboard/public/assets/logos/zai.svg new file mode 100644 index 00000000000..04ba2d985f2 --- /dev/null +++ b/ui/litellm-dashboard/public/assets/logos/zai.svg @@ -0,0 +1 @@ +Z.ai \ No newline at end of file diff --git a/ui/litellm-dashboard/src/components/provider_info_helpers.tsx b/ui/litellm-dashboard/src/components/provider_info_helpers.tsx index e833d0eb4fb..684e6dbcee2 100644 --- a/ui/litellm-dashboard/src/components/provider_info_helpers.tsx +++ b/ui/litellm-dashboard/src/components/provider_info_helpers.tsx @@ -103,6 +103,7 @@ export enum Providers { WATSONX_TEXT = "Watsonx Text", xAI = "xAI", XINFERENCE = "Xinference", + ZAI = "Z.AI", } export const provider_map: Record = { @@ -210,6 +211,7 @@ export const provider_map: Record = { WATSONX_TEXT: "watsonx_text", xAI: "xai", XINFERENCE: "xinference", + ZAI: "zai", }; const asset_logos_folder = "../ui/assets/logos/"; @@ -299,6 +301,7 @@ export const providerLogoMap: Record = { [Providers.WATSONX_TEXT]: `${asset_logos_folder}watsonx.svg`, [Providers.xAI]: `${asset_logos_folder}xai.svg`, [Providers.XINFERENCE]: `${asset_logos_folder}xinference.svg`, + [Providers.ZAI]: `${asset_logos_folder}zai.svg`, }; export const getProviderLogoAndName = (providerValue: string): { logo: string; displayName: string } => {