Add MiniMax AI provider support
This commit is contained in:
parent
c4db9ec165
commit
509520f273
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue