@@ -73,6 +73,8 @@ export interface ProviderTypeInfo {
7373 isOAuth ?: boolean ;
7474 supportsApiKey ?: boolean ;
7575 apiKeyUrl ?: string ;
76+ docsUrl ?: string ;
77+ docsUrlZh ?: string ;
7678}
7779
7880export type ProviderAuthMode =
@@ -121,7 +123,15 @@ import { providerIcons } from '@/assets/providers';
121123
122124/** All supported provider types with UI metadata */
123125export const PROVIDER_TYPE_INFO : ProviderTypeInfo [ ] = [
124- { id : 'anthropic' , name : 'Anthropic' , icon : '🤖' , placeholder : 'sk-ant-api03-...' , model : 'Claude' , requiresApiKey : true } ,
126+ {
127+ id : 'anthropic' ,
128+ name : 'Anthropic' ,
129+ icon : '🤖' ,
130+ placeholder : 'sk-ant-api03-...' ,
131+ model : 'Claude' ,
132+ requiresApiKey : true ,
133+ docsUrl : 'https://platform.claude.com/docs/en/api/overview' ,
134+ } ,
125135 {
126136 id : 'openai' ,
127137 name : 'OpenAI' ,
@@ -145,15 +155,26 @@ export const PROVIDER_TYPE_INFO: ProviderTypeInfo[] = [
145155 defaultModelId : 'gemini-3.1-pro-preview' ,
146156 apiKeyUrl : 'https://aistudio.google.com/app/apikey' ,
147157 } ,
148- { id : 'openrouter' , name : 'OpenRouter' , icon : '🌐' , placeholder : 'sk-or-v1-...' , model : 'Multi-Model' , requiresApiKey : true , showModelId : true , modelIdPlaceholder : 'anthropic/claude-opus-4.6' , defaultModelId : 'anthropic/claude-opus-4.6' } ,
149- { id : 'ark' , name : 'ByteDance Ark' , icon : 'A' , placeholder : 'your-ark-api-key' , model : 'Doubao' , requiresApiKey : true , defaultBaseUrl : 'https://ark.cn-beijing.volces.com/api/v3' , showBaseUrl : true , showModelId : true , modelIdPlaceholder : 'ep-20260228000000-xxxxx' } ,
150- { id : 'moonshot' , name : 'Moonshot (CN)' , icon : '🌙' , placeholder : 'sk-...' , model : 'Kimi' , requiresApiKey : true , defaultBaseUrl : 'https://api.moonshot.cn/v1' , defaultModelId : 'kimi-k2.5' } ,
151- { id : 'siliconflow' , name : 'SiliconFlow (CN)' , icon : '🌊' , placeholder : 'sk-...' , model : 'Multi-Model' , requiresApiKey : true , defaultBaseUrl : 'https://api.siliconflow.cn/v1' , showModelId : true , modelIdPlaceholder : 'deepseek-ai/DeepSeek-V3' , defaultModelId : 'deepseek-ai/DeepSeek-V3' } ,
152- { id : 'minimax-portal' , name : 'MiniMax (Global)' , icon : '☁️' , placeholder : 'sk-...' , model : 'MiniMax' , requiresApiKey : false , isOAuth : true , supportsApiKey : true , defaultModelId : 'MiniMax-M2.5' , apiKeyUrl : 'https://intl.minimaxi.com/' } ,
158+ { id : 'openrouter' , name : 'OpenRouter' , icon : '🌐' , placeholder : 'sk-or-v1-...' , model : 'Multi-Model' , requiresApiKey : true , showModelId : true , modelIdPlaceholder : 'openai/gpt-5.4' , defaultModelId : 'openai/gpt-5.4' , docsUrl : 'https://openrouter.ai/models' } ,
153159 { id : 'minimax-portal-cn' , name : 'MiniMax (CN)' , icon : '☁️' , placeholder : 'sk-...' , model : 'MiniMax' , requiresApiKey : false , isOAuth : true , supportsApiKey : true , defaultModelId : 'MiniMax-M2.5' , apiKeyUrl : 'https://platform.minimaxi.com/' } ,
154- { id : 'qwen-portal' , name : 'Qwen' , icon : '☁️' , placeholder : 'sk-...' , model : 'Qwen' , requiresApiKey : false , isOAuth : true , defaultModelId : 'coder-model' } ,
160+ { id : 'moonshot' , name : 'Moonshot (CN)' , icon : '🌙' , placeholder : 'sk-...' , model : 'Kimi' , requiresApiKey : true , defaultBaseUrl : 'https://api.moonshot.cn/v1' , defaultModelId : 'kimi-k2.5' , docsUrl : 'https://platform.moonshot.cn/' } ,
161+ { id : 'siliconflow' , name : 'SiliconFlow (CN)' , icon : '🌊' , placeholder : 'sk-...' , model : 'Multi-Model' , requiresApiKey : true , defaultBaseUrl : 'https://api.siliconflow.cn/v1' , showModelId : true , modelIdPlaceholder : 'deepseek-ai/DeepSeek-V3' , defaultModelId : 'deepseek-ai/DeepSeek-V3' , docsUrl : 'https://docs.siliconflow.cn/cn/userguide/introduction' } ,
162+ { id : 'minimax-portal' , name : 'MiniMax (Global)' , icon : '☁️' , placeholder : 'sk-...' , model : 'MiniMax' , requiresApiKey : false , isOAuth : true , supportsApiKey : true , defaultModelId : 'MiniMax-M2.5' , apiKeyUrl : 'https://intl.minimaxi.com/' } ,
163+ { id : 'qwen-portal' , name : 'Qwen (Global)' , icon : '☁️' , placeholder : 'sk-...' , model : 'Qwen' , requiresApiKey : false , isOAuth : true , defaultModelId : 'coder-model' } ,
164+ { id : 'ark' , name : 'ByteDance Ark' , icon : 'A' , placeholder : 'your-ark-api-key' , model : 'Doubao' , requiresApiKey : true , defaultBaseUrl : 'https://ark.cn-beijing.volces.com/api/v3' , showBaseUrl : true , showModelId : true , modelIdPlaceholder : 'ep-20260228000000-xxxxx' , docsUrl : 'https://www.volcengine.com/' } ,
155165 { id : 'ollama' , name : 'Ollama' , icon : '🦙' , placeholder : 'Not required' , requiresApiKey : false , defaultBaseUrl : 'http://localhost:11434/v1' , showBaseUrl : true , showModelId : true , modelIdPlaceholder : 'qwen3:latest' } ,
156- { id : 'custom' , name : 'Custom' , icon : '⚙️' , placeholder : 'API key...' , requiresApiKey : true , showBaseUrl : true , showModelId : true , modelIdPlaceholder : 'your-provider/model-id' } ,
166+ {
167+ id : 'custom' ,
168+ name : 'Custom' ,
169+ icon : '⚙️' ,
170+ placeholder : 'API key...' ,
171+ requiresApiKey : true ,
172+ showBaseUrl : true ,
173+ showModelId : true ,
174+ modelIdPlaceholder : 'your-provider/model-id' ,
175+ docsUrl : 'https://icnnp7d0dymg.feishu.cn/wiki/BmiLwGBcEiloZDkdYnGc8RWnn6d#Ee1ldfvKJoVGvfxc32mcILwenth' ,
176+ docsUrlZh : 'https://icnnp7d0dymg.feishu.cn/wiki/BmiLwGBcEiloZDkdYnGc8RWnn6d#IWQCdfe5fobGU3xf3UGcgbLynGh' ,
177+ } ,
157178] ;
158179
159180/** Get the SVG logo URL for a provider type, falls back to undefined */
@@ -174,6 +195,21 @@ export function getProviderTypeInfo(type: ProviderType): ProviderTypeInfo | unde
174195 return PROVIDER_TYPE_INFO . find ( ( t ) => t . id === type ) ;
175196}
176197
198+ export function getProviderDocsUrl (
199+ provider : Pick < ProviderTypeInfo , 'docsUrl' | 'docsUrlZh' > | undefined ,
200+ language : string
201+ ) : string | undefined {
202+ if ( ! provider ?. docsUrl ) {
203+ return undefined ;
204+ }
205+
206+ if ( language . startsWith ( 'zh' ) && provider . docsUrlZh ) {
207+ return provider . docsUrlZh ;
208+ }
209+
210+ return provider . docsUrl ;
211+ }
212+
177213export function shouldShowProviderModelId (
178214 provider : Pick < ProviderTypeInfo , 'showModelId' | 'showModelIdInDevModeOnly' > | undefined ,
179215 devModeUnlocked : boolean
0 commit comments