-
+
handleInputChange("api_base", e.target.value)}
/>
+ {selectedProvider?.apiBase && formData.api_base === selectedProvider.apiBase && (
+
+
+ Using recommended API endpoint for {selectedProvider.label}
+
+ )}
+ {selectedProvider?.apiBase && !formData.api_base && (
+
+
+ ⚠️ API Base URL is required for {selectedProvider.label}. Click to auto-fill:
+
+
+ )}
{/* Optional Inference Parameters */}
diff --git a/surfsense_web/contracts/enums/llm-providers.ts b/surfsense_web/contracts/enums/llm-providers.ts
index 753276fde..814ea16cf 100644
--- a/surfsense_web/contracts/enums/llm-providers.ts
+++ b/surfsense_web/contracts/enums/llm-providers.ts
@@ -3,6 +3,7 @@ export interface LLMProvider {
label: string;
example: string;
description: string;
+ apiBase?: string; // Default API Base URL for the provider / 提供商的默认 API Base URL
}
export const LLM_PROVIDERS: LLMProvider[] = [
@@ -90,6 +91,35 @@ export const LLM_PROVIDERS: LLMProvider[] = [
example: "gpt-5-mini, claude-sonnet-4-5",
description: "Access 500+ AI models through one unified API",
},
+ // Chinese LLM Providers / 国产 LLM 提供商
+ {
+ value: "DEEPSEEK",
+ label: "DeepSeek",
+ example: "deepseek-chat, deepseek-coder",
+ description: "Chinese high-performance AI models",
+ apiBase: "https://api.deepseek.com",
+ },
+ {
+ value: "ALIBABA_QWEN",
+ label: "Qwen",
+ example: "qwen-max, qwen-plus, qwen-turbo",
+ description: "Alibaba Cloud Qwen LLM",
+ apiBase: "https://dashscope.aliyuncs.com/compatible-mode/v1",
+ },
+ {
+ value: "MOONSHOT",
+ label: "Kimi",
+ example: "moonshot-v1-8k, moonshot-v1-32k, moonshot-v1-128k",
+ description: "Moonshot AI Kimi models",
+ apiBase: "https://api.moonshot.cn/v1",
+ },
+ {
+ value: "ZHIPU",
+ label: "GLM",
+ example: "glm-4, glm-4-flash, glm-3-turbo",
+ description: "Zhipu AI GLM series models",
+ apiBase: "https://open.bigmodel.cn/api/paas/v4",
+ },
{
value: "CUSTOM",
label: "Custom Provider",