mirror of
https://git.openapi.site/https://github.com/desirecore/config-center.git
synced 2026-09-05 21:33:40 +08:00
fix(compute): split suffixed model specs (#79)
This commit is contained in:
@@ -105,7 +105,7 @@ describe('真实数据全量校验', () => {
|
||||
if (spec.routing) routed.push(spec)
|
||||
}
|
||||
}
|
||||
assert.equal(routed.length, 37)
|
||||
assert.equal(routed.length, 39)
|
||||
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)
|
||||
})
|
||||
@@ -324,6 +324,35 @@ describe('真实数据全量校验', () => {
|
||||
assert.ok(specs[0].spec.capabilities.includes('vision'))
|
||||
})
|
||||
|
||||
it('基础模型与后缀版本应使用独立精确规格,避免互相误匹配', () => {
|
||||
const qwen = JSON.parse(readFileSync(join(ROOT, 'compute', 'model-specs', 'qwen.json'), 'utf8'))
|
||||
const deepseek = JSON.parse(readFileSync(join(ROOT, 'compute', 'model-specs', 'deepseek.json'), 'utf8'))
|
||||
const specFor = (file, id) => file.specs.find((item) => item.id === id)
|
||||
|
||||
const qwenBase = specFor(qwen, 'qwen3.8-max')
|
||||
const qwenPreview = specFor(qwen, 'qwen3.8-max-preview')
|
||||
const deepseekBase = specFor(deepseek, 'deepseek-v4-pro')
|
||||
const deepseek0813 = specFor(deepseek, 'deepseek-v4-pro-0813')
|
||||
|
||||
for (const [id, modelSpec] of [
|
||||
['qwen3.8-max', qwenBase],
|
||||
['qwen3.8-max-preview', qwenPreview],
|
||||
['deepseek-v4-pro', deepseekBase],
|
||||
['deepseek-v4-pro-0813', deepseek0813],
|
||||
]) {
|
||||
assert.ok(modelSpec, `model-specs 缺少 ${id}`)
|
||||
assert.deepEqual(modelSpec.match.exact, [id])
|
||||
assert.equal(modelSpec.family, id)
|
||||
}
|
||||
|
||||
assert.equal('patterns' in deepseekBase.match, false)
|
||||
assert.equal('patterns' in deepseek0813.match, false)
|
||||
assert.equal(qwenBase.spec.contextWindow, qwenPreview.spec.contextWindow)
|
||||
assert.equal(qwenBase.spec.maxOutputTokens, qwenPreview.spec.maxOutputTokens)
|
||||
assert.equal(deepseekBase.spec.contextWindow, deepseek0813.spec.contextWindow)
|
||||
assert.equal(deepseekBase.spec.maxOutputTokens, deepseek0813.spec.maxOutputTokens)
|
||||
})
|
||||
|
||||
it('所有 Provider 应按供应商归属计价,模型来源不覆盖供应商币种', () => {
|
||||
const expectedCurrencies = {
|
||||
anthropic: 'USD',
|
||||
|
||||
@@ -4,13 +4,10 @@
|
||||
{
|
||||
"id": "deepseek-v4-pro",
|
||||
"displayName": "DeepSeek V4 Pro",
|
||||
"family": "deepseek-v4",
|
||||
"family": "deepseek-v4-pro",
|
||||
"match": {
|
||||
"exact": [
|
||||
"deepseek-v4-pro"
|
||||
],
|
||||
"patterns": [
|
||||
"deepseek-v4-pro*"
|
||||
]
|
||||
},
|
||||
"spec": {
|
||||
@@ -57,6 +54,59 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "deepseek-v4-pro-0813",
|
||||
"displayName": "DeepSeek V4 Pro 0813",
|
||||
"family": "deepseek-v4-pro-0813",
|
||||
"match": {
|
||||
"exact": [
|
||||
"deepseek-v4-pro-0813"
|
||||
]
|
||||
},
|
||||
"spec": {
|
||||
"contextWindow": 1000000,
|
||||
"maxOutputTokens": 384000,
|
||||
"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 Pro 0813 版本,1.6T MoE 架构,100 万上下文"
|
||||
},
|
||||
"routing": {
|
||||
"tier": "flagship",
|
||||
"routingPriority": 30,
|
||||
"eligibleForAgent": true,
|
||||
"defaultReference": false,
|
||||
"reasoning": {
|
||||
"supportedModes": [
|
||||
"auto",
|
||||
"high",
|
||||
"max"
|
||||
],
|
||||
"defaultMode": "high"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "deepseek-chat",
|
||||
"displayName": "DeepSeek Chat",
|
||||
|
||||
@@ -1,10 +1,59 @@
|
||||
{
|
||||
"description": "阿里通义千问 Qwen 系列模型规格。参数来源:config-center compute/providers/dashscope.json。",
|
||||
"specs": [
|
||||
{
|
||||
"id": "qwen3.8-max",
|
||||
"displayName": "Qwen3.8 Max",
|
||||
"family": "qwen3.8-max",
|
||||
"match": {
|
||||
"exact": [
|
||||
"qwen3.8-max"
|
||||
]
|
||||
},
|
||||
"spec": {
|
||||
"contextWindow": 1000000,
|
||||
"maxOutputTokens": 65536,
|
||||
"capabilities": [
|
||||
"chat",
|
||||
"reasoning",
|
||||
"code",
|
||||
"multilingual",
|
||||
"tool_use",
|
||||
"long_context",
|
||||
"agent",
|
||||
"vision"
|
||||
],
|
||||
"serviceType": [
|
||||
"chat"
|
||||
],
|
||||
"defaultTemperature": 0.6,
|
||||
"defaultTopP": 0.95,
|
||||
"supportsReasoning": true,
|
||||
"description": "通义千问 Qwen3.8 Max,100 万上下文,支持视觉理解"
|
||||
},
|
||||
"routing": {
|
||||
"tier": "flagship",
|
||||
"routingPriority": 40,
|
||||
"eligibleForAgent": true,
|
||||
"defaultReference": false,
|
||||
"reasoning": {
|
||||
"supportedModes": [
|
||||
"auto",
|
||||
"off",
|
||||
"minimal",
|
||||
"low",
|
||||
"medium",
|
||||
"high",
|
||||
"xhigh"
|
||||
],
|
||||
"defaultMode": "high"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "qwen3.8-max-preview",
|
||||
"displayName": "Qwen3.8 Max Preview",
|
||||
"family": "qwen3.8",
|
||||
"family": "qwen3.8-max-preview",
|
||||
"match": {
|
||||
"exact": [
|
||||
"qwen3.8-max-preview"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": "1.0.0",
|
||||
"presetDataVersion": 92,
|
||||
"updatedAt": "2026-08-21",
|
||||
"presetDataVersion": 93,
|
||||
"updatedAt": "2026-08-25",
|
||||
"description": "DesireCore 官方配置中心"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user