mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-23 00:35:51 +00:00
添加deepseek-v4-pro支持选择max思考深度 (#365)
Co-authored-by: HitMargin <hitmargin@qq.com> Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -169,7 +169,7 @@ export async function call(
|
|||||||
|
|
||||||
if (COMMON_HELP_ARGS.includes(args)) {
|
if (COMMON_HELP_ARGS.includes(args)) {
|
||||||
onDone(
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,8 @@ export function modelSupportsEffort(model: string): boolean {
|
|||||||
if (
|
if (
|
||||||
m.includes('opus-4-7') ||
|
m.includes('opus-4-7') ||
|
||||||
m.includes('opus-4-6') ||
|
m.includes('opus-4-6') ||
|
||||||
m.includes('sonnet-4-6')
|
m.includes('sonnet-4-6') ||
|
||||||
|
m.includes('deepseek-v4-pro')
|
||||||
) {
|
) {
|
||||||
return true
|
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.
|
// @[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.
|
// 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 {
|
export function modelSupportsMaxEffort(model: string): boolean {
|
||||||
const supported3P = get3PModelCapabilityOverride(model, 'max_effort')
|
const supported3P = get3PModelCapabilityOverride(model, 'max_effort')
|
||||||
if (supported3P !== undefined) {
|
if (supported3P !== undefined) {
|
||||||
return supported3P
|
return supported3P
|
||||||
}
|
}
|
||||||
|
// Support DeepSeek V4 Pro specifically (Anthropic-compatible API)
|
||||||
|
if (model.toLowerCase().includes('deepseek-v4-pro')) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
if (
|
if (
|
||||||
model.toLowerCase().includes('opus-4-7') ||
|
model.toLowerCase().includes('opus-4-7') ||
|
||||||
model.toLowerCase().includes('opus-4-6')
|
model.toLowerCase().includes('opus-4-6')
|
||||||
@@ -267,7 +273,7 @@ export function getEffortLevelDescription(level: EffortLevel): string {
|
|||||||
case 'xhigh':
|
case 'xhigh':
|
||||||
return 'Extended reasoning beyond high, short of max (Opus 4.7 only)'
|
return 'Extended reasoning beyond high, short of max (Opus 4.7 only)'
|
||||||
case 'max':
|
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)'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user