feat: add provider preset definitions (Official, DeepSeek, ZhipuGLM, Kimi, MiniMax, Custom)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
程序员阿江(Relakkes) 2026-04-07 11:21:35 +08:00
parent 468a2853e0
commit 08cd15ed1b
2 changed files with 138 additions and 0 deletions

View File

@ -0,0 +1,69 @@
// Provider presets inspired by cc-switch (https://github.com/farion1231/cc-switch)
// Original work by Jason Young, MIT License
export type ModelMapping = {
main: string
haiku: string
sonnet: string
opus: string
}
export type ProviderPreset = {
id: string
name: string
baseUrl: string
defaultModels: ModelMapping
needsApiKey: boolean
websiteUrl: string
}
export const PROVIDER_PRESETS: ProviderPreset[] = [
{
id: 'official',
name: 'Claude Official',
baseUrl: '',
defaultModels: { main: '', haiku: '', sonnet: '', opus: '' },
needsApiKey: false,
websiteUrl: 'https://www.anthropic.com/claude-code',
},
{
id: 'deepseek',
name: 'DeepSeek',
baseUrl: 'https://api.deepseek.com/anthropic',
defaultModels: { main: 'DeepSeek-V3.2', haiku: 'DeepSeek-V3.2', sonnet: 'DeepSeek-V3.2', opus: 'DeepSeek-V3.2' },
needsApiKey: true,
websiteUrl: 'https://platform.deepseek.com',
},
{
id: 'zhipuglm',
name: 'Zhipu GLM',
baseUrl: 'https://open.bigmodel.cn/api/anthropic',
defaultModels: { main: 'glm-5', haiku: 'glm-5', sonnet: 'glm-5', opus: 'glm-5' },
needsApiKey: true,
websiteUrl: 'https://open.bigmodel.cn',
},
{
id: 'kimi',
name: 'Kimi',
baseUrl: 'https://api.moonshot.cn/anthropic',
defaultModels: { main: 'kimi-k2.5', haiku: 'kimi-k2.5', sonnet: 'kimi-k2.5', opus: 'kimi-k2.5' },
needsApiKey: true,
websiteUrl: 'https://platform.moonshot.cn',
},
{
id: 'minimax',
name: 'MiniMax',
baseUrl: 'https://api.minimaxi.com/anthropic',
defaultModels: { main: 'MiniMax-M2.7', haiku: 'MiniMax-M2.7', sonnet: 'MiniMax-M2.7', opus: 'MiniMax-M2.7' },
needsApiKey: true,
websiteUrl: 'https://platform.minimaxi.com',
},
{
id: 'custom',
name: 'Custom',
baseUrl: '',
defaultModels: { main: '', haiku: '', sonnet: '', opus: '' },
needsApiKey: true,
websiteUrl: '',
},
]

View File

@ -0,0 +1,69 @@
// Provider presets inspired by cc-switch (https://github.com/farion1231/cc-switch)
// Original work by Jason Young, MIT License
export type ModelMapping = {
main: string
haiku: string
sonnet: string
opus: string
}
export type ProviderPreset = {
id: string
name: string
baseUrl: string
defaultModels: ModelMapping
needsApiKey: boolean
websiteUrl: string
}
export const PROVIDER_PRESETS: ProviderPreset[] = [
{
id: 'official',
name: 'Claude Official',
baseUrl: '',
defaultModels: { main: '', haiku: '', sonnet: '', opus: '' },
needsApiKey: false,
websiteUrl: 'https://www.anthropic.com/claude-code',
},
{
id: 'deepseek',
name: 'DeepSeek',
baseUrl: 'https://api.deepseek.com/anthropic',
defaultModels: { main: 'DeepSeek-V3.2', haiku: 'DeepSeek-V3.2', sonnet: 'DeepSeek-V3.2', opus: 'DeepSeek-V3.2' },
needsApiKey: true,
websiteUrl: 'https://platform.deepseek.com',
},
{
id: 'zhipuglm',
name: 'Zhipu GLM',
baseUrl: 'https://open.bigmodel.cn/api/anthropic',
defaultModels: { main: 'glm-5', haiku: 'glm-5', sonnet: 'glm-5', opus: 'glm-5' },
needsApiKey: true,
websiteUrl: 'https://open.bigmodel.cn',
},
{
id: 'kimi',
name: 'Kimi',
baseUrl: 'https://api.moonshot.cn/anthropic',
defaultModels: { main: 'kimi-k2.5', haiku: 'kimi-k2.5', sonnet: 'kimi-k2.5', opus: 'kimi-k2.5' },
needsApiKey: true,
websiteUrl: 'https://platform.moonshot.cn',
},
{
id: 'minimax',
name: 'MiniMax',
baseUrl: 'https://api.minimaxi.com/anthropic',
defaultModels: { main: 'MiniMax-M2.7', haiku: 'MiniMax-M2.7', sonnet: 'MiniMax-M2.7', opus: 'MiniMax-M2.7' },
needsApiKey: true,
websiteUrl: 'https://platform.minimaxi.com',
},
{
id: 'custom',
name: 'Custom',
baseUrl: '',
defaultModels: { main: '', haiku: '', sonnet: '', opus: '' },
needsApiKey: true,
websiteUrl: '',
},
]