Skip to content

Commit cf33c06

Browse files
2228293026HitMarginCopilot
authored
添加deepseek-v4-pro支持选择max思考深度 (#365)
Co-authored-by: HitMargin <hitmargin@qq.com> Co-authored-by: Copilot <copilot@github.com>
1 parent e0ca1d0 commit cf33c06

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

src/commands/effort/effort.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export async function call(
169169

170170
if (COMMON_HELP_ARGS.includes(args)) {
171171
onDone(
172-
'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',
172+
'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',
173173
)
174174
return
175175
}

src/utils/effort.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ export function modelSupportsEffort(model: string): boolean {
3636
if (
3737
m.includes('opus-4-7') ||
3838
m.includes('opus-4-6') ||
39-
m.includes('sonnet-4-6')
39+
m.includes('sonnet-4-6') ||
40+
m.includes('deepseek-v4-pro')
4041
) {
4142
return true
4243
}
@@ -57,11 +58,16 @@ export function modelSupportsEffort(model: string): boolean {
5758

5859
// @[MODEL LAUNCH]: Add the new model to the allowlist if it supports 'max' effort.
5960
// Per API docs, 'max' is Opus 4.6/4.7 only for public models — other models return an error.
61+
// However, DeepSeek V4 Pro also supports max effort when using Anthropic-compatible API.
6062
export function modelSupportsMaxEffort(model: string): boolean {
6163
const supported3P = get3PModelCapabilityOverride(model, 'max_effort')
6264
if (supported3P !== undefined) {
6365
return supported3P
6466
}
67+
// Support DeepSeek V4 Pro specifically (Anthropic-compatible API)
68+
if (model.toLowerCase().includes('deepseek-v4-pro')) {
69+
return true
70+
}
6571
if (
6672
model.toLowerCase().includes('opus-4-7') ||
6773
model.toLowerCase().includes('opus-4-6')
@@ -267,7 +273,7 @@ export function getEffortLevelDescription(level: EffortLevel): string {
267273
case 'xhigh':
268274
return 'Extended reasoning beyond high, short of max (Opus 4.7 only)'
269275
case 'max':
270-
return 'Maximum capability with deepest reasoning (Opus 4.6/4.7 only)'
276+
return 'Maximum capability with deepest reasoning (Opus 4.6/4.7/DeepSeek V4 Pro)'
271277
}
272278
}
273279

0 commit comments

Comments
 (0)