feat(compute): add DeepSeek V4.1 Flash profile (#101)

This commit is contained in:
2026-09-13 22:05:51 -04:00
committed by GitHub
parent d28297242c
commit 143b567a84
5 changed files with 150 additions and 4 deletions

View File

@@ -105,7 +105,7 @@ describe('真实数据全量校验', () => {
if (spec.routing) routed.push(spec)
}
}
assert.equal(routed.length, 47)
assert.equal(routed.length, 48)
assert.equal(routed.every((spec) => spec.routing.reasoning.supportedModes.includes(spec.routing.reasoning.defaultMode)), true)
assert.equal(routed.every((spec) => Array.isArray(spec.spec.capabilities)), true)
})
@@ -295,6 +295,43 @@ describe('真实数据全量校验', () => {
assert.equal('patterns' in flash.match, false)
})
it('DeepSeek V4.1 Flash 应使用官方模型 ID、视觉能力和分时价格', () => {
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 serviceMap = JSON.parse(readFileSync(join(ROOT, 'compute', 'service-map.json'), 'utf8'))
const modelId = 'deepseek-flash'
const model = provider.models.find((item) => item.modelName === modelId)
const modelSpec = specFile.specs.find((item) => item.id === modelId)
assert.equal(serviceMap.reasoning.modelName, modelId)
assert.ok(model, `provider 缺少 ${modelId}`)
assert.deepEqual(model.serviceType, ['chat', 'reasoning', 'vision'])
assert.equal(model.contextWindow, 1000000)
assert.equal(model.maxOutputTokens, 384000)
assert.ok(model.capabilities.includes('vision'))
assert.equal(model.inputPrice, 1)
assert.equal(model.outputPrice, 4)
assert.equal(model.extra.cacheHitPrice, 0.02)
assert.equal(model.extra.concurrencyLimit, 2500)
assert.deepEqual(model.extra.reasoning, {
supportedEfforts: ['high', 'max'],
defaultEffort: 'high',
})
assert.deepEqual(model.extra.pricingTiers, [
{ condition: 'idle', inputPrice: 1, outputPrice: 4, cacheHitPrice: 0.02 },
{ condition: 'peak', inputPrice: 2, outputPrice: 8, cacheHitPrice: 0.04 },
])
assert.ok(modelSpec, `model-specs 缺少 ${modelId}`)
assert.deepEqual(modelSpec.match.exact, [modelId])
assert.equal(modelSpec.spec.contextWindow, 1000000)
assert.equal(modelSpec.spec.maxOutputTokens, 384000)
assert.ok(modelSpec.spec.capabilities.includes('vision'))
assert.deepEqual(modelSpec.spec.serviceType, ['chat', 'reasoning', 'vision'])
assert.equal(modelSpec.spec.supportsReasoning, true)
assert.deepEqual(modelSpec.routing.reasoning.supportedModes, ['auto', 'high', 'max'])
})
it('MiMo V2.5 ASR 应有独立精确规格,避免回落到 MiMo V2.5 family', () => {
const specFile = JSON.parse(readFileSync(join(ROOT, 'compute', 'model-specs', 'xiaomi.json'), 'utf8'))
const specs = specFile.specs.filter((item) => item.id === 'mimo-v2.5-asr')

View File

@@ -159,6 +159,55 @@
"supportsReasoning": true
}
},
{
"id": "deepseek-flash",
"displayName": "DeepSeek V4.1 Flash",
"family": "deepseek-flash",
"match": {
"exact": [
"deepseek-flash"
]
},
"spec": {
"contextWindow": 1000000,
"maxOutputTokens": 384000,
"capabilities": [
"chat",
"code",
"reasoning",
"deep_thinking",
"vision",
"multilingual",
"tool_use"
],
"serviceType": [
"chat",
"reasoning",
"vision"
],
"defaultTemperature": 1,
"supportsReasoning": true,
"extra": {
"supportsThinking": true,
"thinkingDefault": true
},
"description": "DeepSeek V4.1 Flash,支持文本与图像输入,100 万上下文"
},
"routing": {
"tier": "lightweight",
"routingPriority": 35,
"eligibleForAgent": true,
"defaultReference": false,
"reasoning": {
"supportedModes": [
"auto",
"high",
"max"
],
"defaultMode": "high"
}
}
},
{
"id": "deepseek-v4-flash",
"displayName": "DeepSeek V4 Flash",

View File

@@ -19,6 +19,66 @@
"deepseek-reasoner"
],
"models": [
{
"modelName": "deepseek-flash",
"displayName": "DeepSeek V4.1 Flash",
"serviceType": [
"chat",
"reasoning",
"vision"
],
"description": "DeepSeek V4.1 Flash,支持文本与图像输入,1M 上下文,最大输出 384K,并发上限 2500",
"contextWindow": 1000000,
"maxOutputTokens": 384000,
"capabilities": [
"chat",
"code",
"reasoning",
"deep_thinking",
"vision",
"long_context",
"multilingual",
"tool_use"
],
"inputPrice": 1,
"outputPrice": 4,
"defaultTemperature": 1,
"defaultTopP": 1,
"extra": {
"cacheHitPrice": 0.02,
"concurrencyLimit": 2500,
"supportsThinking": true,
"thinkingDefault": true,
"reasoning": {
"supportedEfforts": [
"high",
"max"
],
"defaultEffort": "high"
},
"pricingTiers": [
{
"condition": "idle",
"inputPrice": 1,
"outputPrice": 4,
"cacheHitPrice": 0.02
},
{
"condition": "peak",
"inputPrice": 2,
"outputPrice": 8,
"cacheHitPrice": 0.04
}
],
"pricingNotes": "空闲时段为北京时间工作日 09:00-12:00、14:00-18:00 之外的时段;高峰时段价格为输入 2 元、输出 8 元、缓存命中输入 0.04 元/百万 tokens。",
"features": {
"jsonOutput": true,
"toolCalls": true,
"chatPrefixCompletion": "beta",
"fimCompletion": "non-thinking-only"
}
}
},
{
"modelName": "deepseek-v4-flash-vision-exp",
"displayName": "DeepSeek V4 Flash Vision Exp",

View File

@@ -4,7 +4,7 @@
"providerId": "provider-openai-001"
},
"reasoning": {
"modelName": "deepseek-v4-flash",
"modelName": "deepseek-flash",
"providerId": "provider-deepseek-001"
},
"fast": {

View File

@@ -1,6 +1,6 @@
{
"version": "1.0.0",
"presetDataVersion": 114,
"updatedAt": "2026-09-13",
"presetDataVersion": 115,
"updatedAt": "2026-09-14",
"description": "DesireCore 官方配置中心"
}