feat(compute): declare GPT-5.6 reasoning efforts (#59)

Declare model-level reasoning effort capabilities for GPT-5.6 Sol, Terra, and Luna, extend validation schema, and bump preset data version.
This commit is contained in:
2026-07-19 20:58:00 +08:00
committed by GitHub
parent d5d0dfafbd
commit 55999ce633
4 changed files with 70 additions and 2 deletions

View File

@@ -298,6 +298,32 @@ describe('provider schema 反例(防 PR #1 重演)', () => {
assert.equal(validate(data), true, JSON.stringify(validate.errors))
})
it('接受 extra.reasoning 能力矩阵,同时保留 extra 其他扩展字段', () => {
const data = makeValidProvider()
data.models[0].extra = {
reasoning: {
supportedEfforts: ['low', 'medium', 'high', 'xhigh', 'max'],
defaultEffort: 'medium',
},
providerSpecificFlag: true,
}
assert.equal(validate(data), true, JSON.stringify(validate.errors))
})
it('拒绝 Ultra 与重复 reasoning effort', () => {
const ultra = makeValidProvider()
ultra.models[0].extra = {
reasoning: { supportedEfforts: ['high', 'ultra'], defaultEffort: 'high' },
}
assert.equal(validate(ultra), false)
const duplicate = makeValidProvider()
duplicate.models[0].extra = {
reasoning: { supportedEfforts: ['high', 'high'], defaultEffort: 'high' },
}
assert.equal(validate(duplicate), false)
})
it('接受 defaultTemperature: 0.7(合法 number', () => {
const data = makeValidProvider()
data.models[0].defaultTemperature = 0.7

View File

@@ -42,6 +42,12 @@
"tool_use",
"agent"
],
"extra": {
"reasoning": {
"supportedEfforts": ["low", "medium", "high", "xhigh", "max"],
"defaultEffort": "low"
}
},
"source": "preset"
},
{
@@ -62,6 +68,12 @@
"tool_use",
"agent"
],
"extra": {
"reasoning": {
"supportedEfforts": ["low", "medium", "high", "xhigh", "max"],
"defaultEffort": "medium"
}
},
"source": "preset"
},
{
@@ -82,6 +94,12 @@
"tool_use",
"fast"
],
"extra": {
"reasoning": {
"supportedEfforts": ["low", "medium", "high", "xhigh", "max"],
"defaultEffort": "medium"
}
},
"source": "preset"
},
{

View File

@@ -1,6 +1,6 @@
{
"version": "1.0.0",
"presetDataVersion": 75,
"presetDataVersion": 76,
"updatedAt": "2026-07-19",
"description": "DesireCore 官方配置中心"
}

View File

@@ -252,7 +252,31 @@
},
"extra": {
"type": "object",
"description": "模型特定配置:如 TTS 模型音色列表、ASR 支持格式",
"description": "模型特定配置:如 TTS 模型音色列表、ASR 支持格式、模型级 reasoning effort 能力等。这里是兼容扩展面:旧客户端会安全保留并忽略未知子字段。",
"properties": {
"reasoning": {
"type": "object",
"required": ["supportedEfforts"],
"properties": {
"supportedEfforts": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "string",
"enum": ["none", "minimal", "low", "medium", "high", "xhigh", "max"]
},
"description": "当前模型与接入面实际接受的 OpenAI reasoning effort。none 在产品层映射为 offUltra 是多 Agent 编排模式,禁止写入。"
},
"defaultEffort": {
"type": "string",
"enum": ["minimal", "low", "medium", "high", "xhigh", "max"],
"description": "当前模型在此接入面的推荐显式默认档位,必须同时存在于 supportedEfforts。"
}
},
"additionalProperties": false
}
},
"additionalProperties": true
},
"apiModelId": {