diff --git a/webview-ui/src/components/settings/ModelInfoView.tsx b/webview-ui/src/components/settings/ModelInfoView.tsx index 138a55feba..9e0f321741 100644 --- a/webview-ui/src/components/settings/ModelInfoView.tsx +++ b/webview-ui/src/components/settings/ModelInfoView.tsx @@ -102,12 +102,20 @@ export const ModelInfoView = ({ const infoItems = shouldShowTierPricingTable ? baseInfoItems : [...baseInfoItems, ...priceInfoItems] + // Localize provider-specific model descriptions when available + const zaiDescKey = `settings:providers.zaiModels.${selectedModelId}.description` + const zaiLocalizedDesc = apiProvider === "zai" ? t(zaiDescKey) : undefined + const descriptionToUse = + apiProvider === "zai" && zaiLocalizedDesc && zaiLocalizedDesc !== zaiDescKey + ? zaiLocalizedDesc + : modelInfo?.description + return ( <> - {modelInfo?.description && ( + {descriptionToUse && ( diff --git a/webview-ui/src/components/settings/providers/ZAi.tsx b/webview-ui/src/components/settings/providers/ZAi.tsx index 1e76091945..cc6fec58f9 100644 --- a/webview-ui/src/components/settings/providers/ZAi.tsx +++ b/webview-ui/src/components/settings/providers/ZAi.tsx @@ -38,9 +38,10 @@ export const ZAi = ({ apiConfiguration, setApiConfigurationField }: ZAiProps) => className={cn("w-full")}> {zaiApiLineSchema.options.map((zaiApiLine) => { const config = zaiApiLineConfigs[zaiApiLine] + const label = t(`settings:providers.zaiEntrypointOptions.${zaiApiLine}`) return ( - {config.name} ({config.baseUrl}) + {label} ({config.baseUrl}) ) })} diff --git a/webview-ui/src/i18n/locales/en/settings.json b/webview-ui/src/i18n/locales/en/settings.json index 1be824b37e..1f94844245 100644 --- a/webview-ui/src/i18n/locales/en/settings.json +++ b/webview-ui/src/i18n/locales/en/settings.json @@ -294,6 +294,18 @@ "getZaiApiKey": "Get Z AI API Key", "zaiEntrypoint": "Z AI Entrypoint", "zaiEntrypointDescription": "Please select the appropriate API entrypoint based on your location. If you are in China, choose open.bigmodel.cn. Otherwise, choose api.z.ai.", + "zaiEntrypointOptions": { + "international": "International", + "china": "China" + }, + "zaiModels": { + "glm-4.5": { + "description": "GLM-4.5 is Zhipu's latest featured model. Its comprehensive capabilities in reasoning, coding, and agent reach the state-of-the-art (SOTA) level among open-source models, with a context length of up to 128k." + }, + "glm-4.5-air": { + "description": "GLM-4.5-Air is the lightweight version of GLM-4.5. It balances performance and cost-effectiveness, and can flexibly switch to hybrid thinking models." + } + }, "geminiApiKey": "Gemini API Key", "getGroqApiKey": "Get Groq API Key", "groqApiKey": "Groq API Key", diff --git a/webview-ui/src/i18n/locales/zh-CN/settings.json b/webview-ui/src/i18n/locales/zh-CN/settings.json index 51db19562a..59f64f3a45 100644 --- a/webview-ui/src/i18n/locales/zh-CN/settings.json +++ b/webview-ui/src/i18n/locales/zh-CN/settings.json @@ -295,6 +295,18 @@ "getZaiApiKey": "获取 Z AI API 密钥", "zaiEntrypoint": "Z AI 服务站点", "zaiEntrypointDescription": "请根据您的位置选择适当的 API 服务站点。如果您在中国,请选择 open.bigmodel.cn。否则,请选择 api.z.ai。", + "zaiEntrypointOptions": { + "international": "国际", + "china": "中国" + }, + "zaiModels": { + "glm-4.5": { + "description": "GLM-4.5 是智谱最新的旗舰模型。在推理、编程与智能体方面具备领先能力,达到了开源模型的先进水平,支持最长 128k 上下文。" + }, + "glm-4.5-air": { + "description": "GLM-4.5-Air 是 GLM-4.5 的轻量版,在性能与成本之间取得良好平衡,并可灵活切换到混合思维模式。" + } + }, "geminiApiKey": "Gemini API 密钥", "getGroqApiKey": "获取 Groq API 密钥", "groqApiKey": "Groq API 密钥", diff --git a/webview-ui/src/i18n/locales/zh-TW/settings.json b/webview-ui/src/i18n/locales/zh-TW/settings.json index 89d517f5b5..0a01fc243f 100644 --- a/webview-ui/src/i18n/locales/zh-TW/settings.json +++ b/webview-ui/src/i18n/locales/zh-TW/settings.json @@ -295,6 +295,18 @@ "getZaiApiKey": "取得 Z AI API 金鑰", "zaiEntrypoint": "Z AI 服務端點", "zaiEntrypointDescription": "請根據您的位置選擇適當的 API 服務端點。如果您在中國,請選擇 open.bigmodel.cn。否則,請選擇 api.z.ai。", + "zaiEntrypointOptions": { + "international": "國際", + "china": "中國" + }, + "zaiModels": { + "glm-4.5": { + "description": "GLM-4.5 是智譜最新的旗艦模型,在推理、程式設計與智能體方面具備頂尖能力,達到開源模型的先進水準,支援最長 128k 上下文。" + }, + "glm-4.5-air": { + "description": "GLM-4.5‑Air 是 GLM-4.5 的輕量版,在效能與成本之間取得平衡,並可彈性切換至混合思維模式。" + } + }, "geminiApiKey": "Gemini API 金鑰", "getGroqApiKey": "取得 Groq API 金鑰", "groqApiKey": "Groq API 金鑰",