fix: align DeepSeek V4 model specs with official profile

Align the shared DeepSeek V4 Pro and Flash specifications with the official 1M context, 384K output, and high/max reasoning profile. Consolidate duplicate specs, add regression coverage, and bump presetDataVersion to 72.
This commit is contained in:
2026-07-10 11:47:40 +08:00
committed by GitHub
parent 6d7a3a70c3
commit 5a9b9c87c4
3 changed files with 51 additions and 19 deletions

View File

@@ -101,6 +101,39 @@ describe('真实数据全量校验', () => {
const result = validateFile(join(ROOT, 'runtimes', 'versions-fallback.json'), validators)
assert.equal(result.ok, true, JSON.stringify(result.errors, null, 2))
})
it('DeepSeek V4 Pro/Flash 应与官方的 1M/384K reasoning profile 一致', () => {
const provider = JSON.parse(readFileSync(join(ROOT, 'compute', 'providers', 'deepseek.json'), 'utf8'))
const specFile = JSON.parse(readFileSync(join(ROOT, 'compute', 'model-specs', 'deepseek.json'), 'utf8'))
const modelIds = ['deepseek-v4-pro', 'deepseek-v4-flash']
for (const modelId of modelIds) {
const model = provider.models.find((item) => item.modelName === modelId)
assert.ok(model, `provider 缺少 ${modelId}`)
assert.equal(model.contextWindow, 1000000)
assert.equal(model.maxOutputTokens, 384000)
assert.ok(model.capabilities.includes('reasoning'))
assert.ok(model.capabilities.includes('deep_thinking'))
assert.ok(model.serviceType.includes('reasoning'))
assert.equal(model.extra.supportsThinking, true)
assert.equal(model.extra.thinkingDefault, true)
assert.deepEqual(model.extra.reasoningEffort, ['high', 'max'])
const specs = specFile.specs.filter((item) => item.id === modelId)
assert.equal(specs.length, 1, `model-specs 中 ${modelId} 应且仅应有一条规格`)
for (const { spec } of specs) {
assert.equal(spec.contextWindow, 1000000)
assert.equal(spec.maxOutputTokens, 384000)
assert.equal(spec.supportsReasoning, true)
assert.ok(spec.capabilities.includes('reasoning'))
assert.ok(spec.capabilities.includes('deep_thinking'))
assert.ok(spec.serviceType.includes('reasoning'))
assert.equal(spec.extra.supportsThinking, true)
assert.equal(spec.extra.thinkingDefault, true)
assert.deepEqual(spec.extra.reasoningEffort, ['high', 'max'])
}
}
})
})
// ==================== Runtime 清单反例 ====================

View File

@@ -7,11 +7,17 @@
"family": "deepseek-v4",
"match": { "exact": ["deepseek-v4-pro"], "patterns": ["deepseek-v4-pro*"] },
"spec": {
"contextWindow": 1048576,
"contextWindow": 1000000,
"maxOutputTokens": 384000,
"capabilities": ["reasoning", "deep_thinking", "code", "math", "science", "multilingual", "tool_use"],
"serviceType": ["reasoning"],
"capabilities": ["chat", "reasoning", "deep_thinking", "code", "math", "science", "multilingual", "tool_use"],
"serviceType": ["chat", "reasoning"],
"defaultTemperature": 1,
"supportsReasoning": true,
"extra": {
"supportsThinking": true,
"thinkingDefault": true,
"reasoningEffort": ["high", "max"]
},
"description": "DeepSeek V4 Pro1.6T MoE 架构100 万上下文"
}
},
@@ -42,30 +48,23 @@
"supportsReasoning": true
}
},
{
"id": "deepseek-v4-pro",
"displayName": "DeepSeek V4 Pro",
"family": "deepseek-v4",
"spec": {
"contextWindow": 1000000,
"maxOutputTokens": 384000,
"capabilities": ["chat", "code", "reasoning", "deep_thinking", "multilingual", "tool_use", "math"],
"serviceType": ["chat", "reasoning"],
"defaultTemperature": 1,
"supportsReasoning": true
}
},
{
"id": "deepseek-v4-flash",
"displayName": "DeepSeek V4 Flash",
"family": "deepseek-v4",
"match": { "exact": ["deepseek-v4-flash"], "patterns": ["deepseek-v4-flash*"] },
"spec": {
"contextWindow": 1000000,
"maxOutputTokens": 384000,
"capabilities": ["chat", "code", "reasoning", "deep_thinking", "multilingual", "tool_use"],
"serviceType": ["chat", "reasoning"],
"defaultTemperature": 1,
"supportsReasoning": true
"supportsReasoning": true,
"extra": {
"supportsThinking": true,
"thinkingDefault": true,
"reasoningEffort": ["high", "max"]
}
}
}
]

View File

@@ -1,6 +1,6 @@
{
"version": "1.0.0",
"presetDataVersion": 71,
"updatedAt": "2026-07-09",
"presetDataVersion": 72,
"updatedAt": "2026-07-10",
"description": "DesireCore 官方配置中心"
}