添加deepseek-v4-pro支持选择max思考深度 (#365)

Co-authored-by: HitMargin <hitmargin@qq.com>
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
HitMargin
2026-04-26 09:00:43 +08:00
committed by GitHub
parent e0ca1d054c
commit cf33c06021
2 changed files with 9 additions and 3 deletions

View File

@@ -169,7 +169,7 @@ export async function call(
if (COMMON_HELP_ARGS.includes(args)) {
onDone(
'Usage: /effort [low|medium|high|max|auto]\n\nEffort levels:\n- low: Quick, straightforward implementation\n- medium: Balanced approach with standard testing\n- high: Comprehensive implementation with extensive testing\n- max: Maximum capability with deepest reasoning (Opus 4.6 only)\n- auto: Use the default effort level for your model',
'Usage: /effort [low|medium|high|max|auto]\n\nEffort levels:\n- low: Quick, straightforward implementation\n- medium: Balanced approach with standard testing\n- high: Comprehensive implementation with extensive testing\n- max: Maximum capability with deepest reasoning (Opus 4.6/4.7, DeepSeek V4 Pro)\n- auto: Use the default effort level for your model',
)
return
}

View File

@@ -36,7 +36,8 @@ export function modelSupportsEffort(model: string): boolean {
if (
m.includes('opus-4-7') ||
m.includes('opus-4-6') ||
m.includes('sonnet-4-6')
m.includes('sonnet-4-6') ||
m.includes('deepseek-v4-pro')
) {
return true
}
@@ -57,11 +58,16 @@ export function modelSupportsEffort(model: string): boolean {
// @[MODEL LAUNCH]: Add the new model to the allowlist if it supports 'max' effort.
// Per API docs, 'max' is Opus 4.6/4.7 only for public models — other models return an error.
// However, DeepSeek V4 Pro also supports max effort when using Anthropic-compatible API.
export function modelSupportsMaxEffort(model: string): boolean {
const supported3P = get3PModelCapabilityOverride(model, 'max_effort')
if (supported3P !== undefined) {
return supported3P
}
// Support DeepSeek V4 Pro specifically (Anthropic-compatible API)
if (model.toLowerCase().includes('deepseek-v4-pro')) {
return true
}
if (
model.toLowerCase().includes('opus-4-7') ||
model.toLowerCase().includes('opus-4-6')
@@ -267,7 +273,7 @@ export function getEffortLevelDescription(level: EffortLevel): string {
case 'xhigh':
return 'Extended reasoning beyond high, short of max (Opus 4.7 only)'
case 'max':
return 'Maximum capability with deepest reasoning (Opus 4.6/4.7 only)'
return 'Maximum capability with deepest reasoning (Opus 4.6/4.7/DeepSeek V4 Pro)'
}
}