diff --git a/components/ConfigManager.vue b/components/ConfigManager.vue
index 6c4259b..5ba9a99 100644
--- a/components/ConfigManager.vue
+++ b/components/ConfigManager.vue
@@ -23,9 +23,20 @@
const aiProviderOptions = computed(() => [
{
label: t('settings.ai.providers.openaiCompatible.title'),
- help: t('settings.ai.providers.openaiCompatible.description'),
+ help: 'settings.ai.providers.openaiCompatible.description',
+ // Only kept for easy reference in i18n Ally
+ _help: t('settings.ai.providers.openaiCompatible.description'),
value: 'openai-compatible',
},
+ {
+ label: t('settings.ai.providers.siliconflow.title'),
+ help: 'settings.ai.providers.siliconflow.description',
+ // Only kept for easy reference in i18n Ally
+ _help: t('settings.ai.providers.siliconflow.description'),
+ value: 'siliconflow',
+ link: 'https://cloud.siliconflow.cn/i/J0NHrrX8',
+ linkText: 'cloud.siliconflow.cn',
+ },
{
label: 'DeepSeek',
value: 'deepseek',
@@ -141,14 +152,26 @@
{{ $t('settings.ai.provider') }}
-
-
- {{ selectedAiProvider.help }}
-
+
+
+
+ {{ selectedAiProvider.linkText || selectedAiProvider.link }}
+
+
diff --git a/composables/useAiProvider.ts b/composables/useAiProvider.ts
index 1e919c8..c13a71c 100644
--- a/composables/useAiProvider.ts
+++ b/composables/useAiProvider.ts
@@ -21,6 +21,7 @@ export const useAiModel = () => {
})
} else if (
config.ai.provider === 'deepseek' ||
+ config.ai.provider === 'siliconflow' ||
// Special case if model name includes 'deepseek'
// This ensures compatibilty with providers like Siliconflow
config.ai.model?.toLowerCase().includes('deepseek')
diff --git a/i18n/en.json b/i18n/en.json
index 248c0fd..de5c60b 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -22,7 +22,11 @@
"providers": {
"openaiCompatible": {
"title": "OpenAI Compatible",
- "description": "e.g. OpenAI, Gemini, Together AI, SiliconCloud, ...\n(Note: DeepSeek, OpenRouter and Ollama now have their own providers.)"
+ "description": "Every provider that is compatible with the OpenAI API. Note: Some providers have their own options for better performance."
+ },
+ "siliconflow": {
+ "title": "SiliconFlow",
+ "description": "Offers ¥14 free credits on register. Get one API key at {0}."
}
}
},
diff --git a/i18n/zh.json b/i18n/zh.json
index 882c14b..d41b8b5 100644
--- a/i18n/zh.json
+++ b/i18n/zh.json
@@ -22,7 +22,11 @@
"providers": {
"openaiCompatible": {
"title": "OpenAI Compatible",
- "description": "如 OpenAI、Gemini、Together AI、SiliconCloud……\n注:DeepSeek、OpenRouter 和 Ollama 现在已经有了独立选项,请切换使用。"
+ "description": "任意兼容 OpenAI 接口格式的供应商。\n注:为了改进兼容性,部分供应商有单独的选项,请展开查看。"
+ },
+ "siliconflow": {
+ "title": "SiliconFlow 硅基流动",
+ "description": "注册赠送 ¥14 元免费额度。在 {0} 生成一个 API key。"
}
}
},
diff --git a/stores/config.ts b/stores/config.ts
index 93d4840..42b944a 100644
--- a/stores/config.ts
+++ b/stores/config.ts
@@ -3,6 +3,7 @@ import type { Locale } from '~/components/LangSwitcher.vue'
export type ConfigAiProvider =
| 'openai-compatible'
+ | 'siliconflow'
| 'openrouter'
| 'deepseek'
| 'ollama'
@@ -62,16 +63,20 @@ export const useConfigStore = defineStore('config', () => {
const isConfigValid = computed(() => validateConfig(config.value))
const aiApiBase = computed(() => {
- if (config.value.ai.provider === 'openrouter') {
- return config.value.ai.apiBase || 'https://openrouter.ai/api/v1'
+ const { ai } = config.value
+ if (ai.provider === 'openrouter') {
+ return ai.apiBase || 'https://openrouter.ai/api/v1'
}
- if (config.value.ai.provider === 'deepseek') {
- return config.value.ai.apiBase || 'https://api.deepseek.com/v1'
+ if (ai.provider === 'deepseek') {
+ return ai.apiBase || 'https://api.deepseek.com/v1'
}
- if (config.value.ai.provider === 'ollama') {
- return config.value.ai.apiBase || 'http://localhost:11434/v1'
+ if (ai.provider === 'ollama') {
+ return ai.apiBase || 'http://localhost:11434/v1'
}
- return config.value.ai.apiBase || 'https://api.openai.com/v1'
+ if (ai.provider === 'siliconflow') {
+ return ai.apiBase || 'https://api.siliconflow.cn/v1'
+ }
+ return ai.apiBase || 'https://api.openai.com/v1'
})
const showConfigManager = ref(false)