diff --git a/packages/core/src/constants.ts b/packages/core/src/constants.ts index b67b92405..bfa0ba31e 100644 --- a/packages/core/src/constants.ts +++ b/packages/core/src/constants.ts @@ -94,6 +94,7 @@ export type AIProviderID = | 'google' | 'openai-compatible' | 'zai' + | 'minimax' | 'anthropic-compatible' export interface ModelOption { @@ -193,6 +194,20 @@ export const AI_PROVIDERS: AIProviderDef[] = [ { id: 'glm-4.5-flash', name: 'GLM-4.5-Flash', tag: 'Free' } ] }, + { + id: 'minimax', + name: 'MiniMax', + keyPlaceholder: 'API key', + keyURL: 'https://platform.minimax.io/user-center/basic-information/interface-key', + defaultModel: 'MiniMax-M2.5', + models: [ + { id: 'MiniMax-M2.5', name: 'MiniMax-M2.5', tag: 'Best' }, + { id: 'MiniMax-M2.5-highspeed', name: 'MiniMax-M2.5 Highspeed', tag: 'Fast' }, + { id: 'MiniMax-M2.1', name: 'MiniMax-M2.1' }, + { id: 'MiniMax-M2.1-highspeed', name: 'MiniMax-M2.1 Highspeed', tag: 'Fast' }, + { id: 'MiniMax-M2', name: 'MiniMax-M2' } + ] + }, { id: 'openai-compatible', name: 'OpenAI-compatible', diff --git a/src/composables/use-chat.ts b/src/composables/use-chat.ts index 864937289..d003972cd 100644 --- a/src/composables/use-chat.ts +++ b/src/composables/use-chat.ts @@ -219,6 +219,13 @@ function createModel(): LanguageModel { }) return zai.chat(effectiveModelID) } + case 'minimax': { + const minimax = createOpenAI({ + apiKey: key, + baseURL: 'https://api.minimax.io/v1' + }) + return minimax.chat(effectiveModelID) + } case 'openai-compatible': { const custom = createOpenAI({ apiKey: key,