feat(model): support step models (#8853)

feat(模型配置): 添加对Step系列模型的支持

添加Step-1o和Step-1v到视觉允许模型列表
新增isStepReasoningModel函数判断Step系列推理模型
This commit is contained in:
Phantom 2025-08-06 09:58:54 +08:00 committed by GitHub
parent 87e603af31
commit 281c545a8f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -191,7 +191,9 @@ const visionAllowedModels = [
`gemma3(?:-[\\w-]+)`,
'kimi-vl-a3b-thinking(?:-[\\w-]+)?',
'llama-guard-4(?:-[\\w-]+)?',
'llama-4(?:-[\\w-]+)?'
'llama-4(?:-[\\w-]+)?',
'step-1o(?:.*vision)?',
'step-1v(?:-[\\w-]+)?'
]
const visionExcludedModels = [
@ -2589,6 +2591,7 @@ export function isOpenAIWebSearchModel(model: Model): boolean {
)
}
/** 用于判断是否支持控制思考但不一定以reasoning_effort的方式 */
export function isSupportedThinkingTokenModel(model?: Model): boolean {
if (!model) {
return false
@ -2801,6 +2804,14 @@ export const isZhipuReasoningModel = (model?: Model): boolean => {
return isSupportedThinkingTokenZhipuModel(model) || model.id.toLowerCase().includes('glm-z1')
}
export const isStepReasoningModel = (model?: Model): boolean => {
if (!model) {
return false
}
const baseName = getLowerBaseModelName(model.id)
return baseName.includes('step-3') || baseName.includes('step-r1-v-mini')
}
export function isReasoningModel(model?: Model): boolean {
if (!model || isEmbeddingModel(model) || isRerankModel(model) || isTextToImageModel(model)) {
return false
@ -2828,6 +2839,7 @@ export function isReasoningModel(model?: Model): boolean {
isHunyuanReasoningModel(model) ||
isPerplexityReasoningModel(model) ||
isZhipuReasoningModel(model) ||
isStepReasoningModel(model) ||
model.id.toLowerCase().includes('magistral') ||
model.id.toLowerCase().includes('minimax-m1') ||
model.id.toLowerCase().includes('pangu-pro-moe')