feat: add GLM-4.7 and MiniMax-M2.1 model support (#12071)

This commit is contained in:
George·Dong 2025-12-23 12:16:03 +08:00 committed by GitHub
parent d1c93e4eae
commit 6bdaba8a15
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 16 additions and 3 deletions

View File

@ -617,6 +617,12 @@ export const SYSTEM_MODELS: Record<SystemProviderId | 'defaultModel', Model[]> =
name: 'GLM-4.6', name: 'GLM-4.6',
group: 'GLM-4.6' group: 'GLM-4.6'
}, },
{
id: 'glm-4.7',
provider: 'zhipu',
name: 'GLM-4.7',
group: 'GLM-4.7'
},
{ {
id: 'glm-4.5', id: 'glm-4.5',
provider: 'zhipu', provider: 'zhipu',
@ -921,6 +927,12 @@ export const SYSTEM_MODELS: Record<SystemProviderId | 'defaultModel', Model[]> =
provider: 'minimax', provider: 'minimax',
name: 'MiniMax M2 Stable', name: 'MiniMax M2 Stable',
group: 'minimax-m2' group: 'minimax-m2'
},
{
id: 'MiniMax-M2.1',
provider: 'minimax',
name: 'MiniMax M2.1',
group: 'minimax-m2'
} }
], ],
hyperbolic: [ hyperbolic: [

View File

@ -571,7 +571,7 @@ export const isSupportedReasoningEffortPerplexityModel = (model: Model): boolean
export const isSupportedThinkingTokenZhipuModel = (model: Model): boolean => { export const isSupportedThinkingTokenZhipuModel = (model: Model): boolean => {
const modelId = getLowerBaseModelName(model.id, '/') const modelId = getLowerBaseModelName(model.id, '/')
return ['glm-4.5', 'glm-4.6'].some((id) => modelId.includes(id)) return ['glm-4.5', 'glm-4.6', 'glm-4.7'].some((id) => modelId.includes(id))
} }
export const isSupportedThinkingTokenMiMoModel = (model: Model): boolean => { export const isSupportedThinkingTokenMiMoModel = (model: Model): boolean => {
@ -632,7 +632,7 @@ export const isMiniMaxReasoningModel = (model?: Model): boolean => {
return false return false
} }
const modelId = getLowerBaseModelName(model.id, '/') const modelId = getLowerBaseModelName(model.id, '/')
return (['minimax-m1', 'minimax-m2'] as const).some((id) => modelId.includes(id)) return (['minimax-m1', 'minimax-m2', 'minimax-m2.1'] as const).some((id) => modelId.includes(id))
} }
export function isReasoningModel(model?: Model): boolean { export function isReasoningModel(model?: Model): boolean {

View File

@ -22,6 +22,7 @@ export const FUNCTION_CALLING_MODELS = [
'deepseek', 'deepseek',
'glm-4(?:-[\\w-]+)?', 'glm-4(?:-[\\w-]+)?',
'glm-4.5(?:-[\\w-]+)?', 'glm-4.5(?:-[\\w-]+)?',
'glm-4.7(?:-[\\w-]+)?',
'learnlm(?:-[\\w-]+)?', 'learnlm(?:-[\\w-]+)?',
'gemini(?:-[\\w-]+)?', // 提前排除了gemini的嵌入模型 'gemini(?:-[\\w-]+)?', // 提前排除了gemini的嵌入模型
'grok-3(?:-[\\w-]+)?', 'grok-3(?:-[\\w-]+)?',
@ -30,7 +31,7 @@ export const FUNCTION_CALLING_MODELS = [
'kimi-k2(?:-[\\w-]+)?', 'kimi-k2(?:-[\\w-]+)?',
'ling-\\w+(?:-[\\w-]+)?', 'ling-\\w+(?:-[\\w-]+)?',
'ring-\\w+(?:-[\\w-]+)?', 'ring-\\w+(?:-[\\w-]+)?',
'minimax-m2', 'minimax-m2(?:.1)?',
'mimo-v2-flash' 'mimo-v2-flash'
] as const ] as const