diff --git a/src/renderer/src/config/models/default.ts b/src/renderer/src/config/models/default.ts index abcb38f9b..4fa60ed54 100644 --- a/src/renderer/src/config/models/default.ts +++ b/src/renderer/src/config/models/default.ts @@ -430,6 +430,12 @@ export const SYSTEM_MODELS: Record = } ], anthropic: [ + { + id: 'claude-sonnet-4-5-20250929', + provider: 'anthropic', + name: 'Claude Sonnet 4.5', + group: 'Claude 4.5' + }, { id: 'claude-sonnet-4-20250514', provider: 'anthropic', @@ -698,6 +704,12 @@ export const SYSTEM_MODELS: Record = name: 'GLM-4.5-Flash', group: 'GLM-4.5' }, + { + id: 'glm-4.6', + provider: 'zhipu', + name: 'GLM-4.6', + group: 'GLM-4.6' + }, { id: 'glm-4.5', provider: 'zhipu', diff --git a/src/renderer/src/config/models/reasoning.ts b/src/renderer/src/config/models/reasoning.ts index 545d75936..10cb64156 100644 --- a/src/renderer/src/config/models/reasoning.ts +++ b/src/renderer/src/config/models/reasoning.ts @@ -339,14 +339,20 @@ export const isSupportedReasoningEffortPerplexityModel = (model: Model): boolean export const isSupportedThinkingTokenZhipuModel = (model: Model): boolean => { const modelId = getLowerBaseModelName(model.id, '/') - return modelId.includes('glm-4.5') + return ['glm-4.5', 'glm-4.6'].some((id) => modelId.includes(id)) } export const isDeepSeekHybridInferenceModel = (model: Model) => { const modelId = getLowerBaseModelName(model.id) // deepseek官方使用chat和reasoner做推理控制,其他provider需要单独判断,id可能会有所差别 // openrouter: deepseek/deepseek-chat-v3.1 不知道会不会有其他provider仿照ds官方分出一个同id的作为非思考模式的模型,这里有风险 - return /deepseek-v3(?:\.1|-1-\d+)/.test(modelId) || modelId.includes('deepseek-chat-v3.1') + // Matches: "deepseek-v3" followed by ".digit" or "-digit". + // Optionally, this can be followed by ".alphanumeric_sequence" or "-alphanumeric_sequence" + // until the end of the string. + // Examples: deepseek-v3.1, deepseek-v3-1, deepseek-v3.1.2, deepseek-v3.1-alpha + // Does NOT match: deepseek-v3.123 (missing separator after '1'), deepseek-v3.x (x isn't a digit) + // TODO: move to utils and add test cases + return /deepseek-v3(?:\.\d|-\d)(?:(\.|-)\w+)?$/.test(modelId) || modelId.includes('deepseek-chat-v3.1') } export const isSupportedThinkingTokenDeepSeekModel = isDeepSeekHybridInferenceModel