feat(compute): add GPT-6.1 Sol and Claude Sonnet 5.5 (#109)

This commit is contained in:
2026-10-01 21:41:50 +08:00
committed by GitHub
parent 74f92ac15a
commit dc7d48957e
8 changed files with 307 additions and 6 deletions

View File

@@ -105,7 +105,7 @@ describe('真实数据全量校验', () => {
if (spec.routing) routed.push(spec)
}
}
assert.equal(routed.length, 58)
assert.equal(routed.length, 60)
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)
})
@@ -154,9 +154,11 @@ describe('真实数据全量校验', () => {
'claude-opus-5-5',
'claude-fable-5-1',
'claude-opus-5',
'claude-sonnet-5-5',
'claude-sonnet-5',
])
assert.deepEqual(enabled(openai), [
'gpt-6.1-sol',
'gpt-6-sol',
'gpt-6-luna',
'gpt-6-astra',
@@ -584,6 +586,8 @@ describe('真实数据全量校验', () => {
it('新增主流模型应在官方 Provider 与共享规格中保持 ID、窗口和推理配置一致', () => {
const cases = [
['openai', 'openai', 'gpt-6.1-sol', 1050000, 128000, 2, 10, 'medium'],
['anthropic', 'anthropic', 'claude-sonnet-5-5', 1000000, 128000, 2, 10, 'high'],
['openai', 'openai', 'gpt-6-sol', 1050000, 128000, 2, 10, 'medium'],
['openai', 'openai', 'gpt-6-luna', 1050000, 128000, 0.1, 0.5, 'medium'],
['anthropic', 'anthropic', 'claude-opus-5-5', 1000000, 128000, 4, 20, 'medium'],
@@ -623,7 +627,7 @@ describe('真实数据全量校验', () => {
assert.deepEqual(xai.models.find((item) => item.modelName === 'grok-4.7').extra.reasoning.supportedEfforts, ['low', 'medium', 'high', 'xhigh'])
const codex = JSON.parse(readFileSync(join(ROOT, 'compute', 'providers', 'openai-codex.json'), 'utf8'))
for (const id of ['gpt-6-sol', 'gpt-6-luna']) {
for (const id of ['gpt-6.1-sol', 'gpt-6-sol', 'gpt-6-luna']) {
const model = codex.models.find((item) => item.modelName === id)
assert.ok(model, `Codex 订阅 Provider 缺少 ${id}`)
assert.equal(model.source, 'preset')
@@ -631,6 +635,35 @@ describe('真实数据全量校验', () => {
}
})
it('GPT-6.1 与 Sonnet 5.5 的协议约束在 API、订阅与共享规格中保持一致', () => {
const read = (dir, name) => JSON.parse(readFileSync(join(ROOT, 'compute', dir, `${name}.json`), 'utf8'))
const efforts = ['low', 'medium', 'high', 'xhigh', 'max']
for (const provider of ['openai', 'openai-codex']) {
const model = read('providers', provider).models.find((item) => item.modelName === 'gpt-6.1-sol')
assert.deepEqual(model.extra.reasoning.supportedEfforts, efforts)
if (provider === 'openai') {
assert.equal(model.extra.responsesOnly, true)
assert.equal(model.extra.cachedInputPrice, 0.1)
}
}
const gpt = read('model-specs', 'openai').specs.find((item) => item.id === 'gpt-6.1-sol')
assert.deepEqual(gpt.match.exact, ['gpt-6.1-sol'])
assert.deepEqual(gpt.routing.reasoning.supportedModes, ['auto', ...efforts])
for (const provider of ['anthropic', 'anthropic-claude']) {
const model = read('providers', provider).models.find((item) => item.modelName === 'claude-sonnet-5-5')
assert.equal(model.extra.reasoning.defaultEffort, 'high')
assert.equal(model.extra.forcedToolChoiceUnsupported, true)
assert.equal(model.extra.samplingParametersDeprecated, true)
assert.equal(model.extra.thinkingOnly, undefined)
if (provider === 'anthropic') assert.equal(model.extra.promptCacheMinTokens, 512)
}
const sonnet = read('model-specs', 'anthropic').specs.find((item) => item.id === 'claude-sonnet-5-5')
assert.deepEqual(sonnet.match.exact, ['claude-sonnet-5-5'])
assert.equal(sonnet.spec.extra.forcedToolChoiceUnsupported, true)
assert.equal(sonnet.spec.extra.thinkingOnly, undefined)
assert.equal(sonnet.routing.reasoning.defaultMode, 'high')
})
it('Codex 订阅接入面不声明 none 档:ChatGPT 后端不接受关闭思考', () => {
// OpenAI 下发给 Codex 的模型元数据(models_cache.json#supported_reasoning_levels)里,
// 该接入面没有任何模型支持 none。声明了 none,客户端会在 AI 审批等关闭思考的调用上发
@@ -847,7 +880,7 @@ describe('真实数据全量校验', () => {
// 只做单向断言(已知拒绝的代际必须声明),新代际按官方文档补声明即可,不维护反向代际表。
// 订阅(claude-oauth)请求由 Claude CLI 自建,客户端 compat 层对这两类参数显式 fail closed,不依赖声明。
const samplingRemoved = /^claude-(?:fable|mythos)-|^claude-(?:opus|sonnet)-5(?:$|-)|^claude-opus-4-[78](?:$|-)/
const forcedToolChoiceRemoved = /^claude-(?:fable|mythos)-5-1(?:$|-)|^claude-opus-5-5(?:$|-)/
const forcedToolChoiceRemoved = /^claude-(?:fable|mythos)-5-1(?:$|-)|^claude-(?:opus|sonnet)-5-5(?:$|-)/
const specFile = JSON.parse(readFileSync(join(ROOT, 'compute', 'model-specs', 'anthropic.json'), 'utf8'))
for (const id of ['claude-fable-5-1', 'claude-opus-5-5', 'claude-opus-5', 'claude-opus-4-8', 'claude-opus-4-7', 'claude-sonnet-5']) {

View File

@@ -31,7 +31,8 @@
"thinkingOnly": true,
"samplingParametersDeprecated": true,
"forcedToolChoiceUnsupported": true
}
},
"releasedAt": "2026-09-22"
},
"routing": {
"tier": "flagship",
@@ -235,6 +236,57 @@
"supportsReasoning": true
}
},
{
"id": "claude-sonnet-5-5",
"displayName": "Claude Sonnet 5.5",
"family": "claude-sonnet-5-5",
"match": {
"exact": [
"claude-sonnet-5-5"
]
},
"spec": {
"contextWindow": 1000000,
"maxOutputTokens": 128000,
"capabilities": [
"chat",
"reasoning",
"code",
"vision",
"tool_use",
"computer_use",
"long_context"
],
"serviceType": [
"chat"
],
"supportsReasoning": true,
"description": "Claude Sonnet 5.5,速度与智能平衡,默认 high effort,自适应思考",
"extra": {
"adaptiveThinking": true,
"samplingParametersDeprecated": true,
"forcedToolChoiceUnsupported": true
},
"releasedAt": "2026-09-28"
},
"routing": {
"tier": "balanced",
"routingPriority": 18,
"eligibleForAgent": true,
"defaultReference": false,
"reasoning": {
"supportedModes": [
"auto",
"low",
"medium",
"high",
"xhigh",
"max"
],
"defaultMode": "high"
}
}
},
{
"id": "claude-sonnet-5",
"displayName": "Claude Sonnet 5",

View File

@@ -1,6 +1,51 @@
{
"description": "OpenAI GPT / o 系列模型规格。参数来源:config-center compute/providers/openai.json。注意:gpt-4o / gpt-5 等存在子型号(-mini/-nano),故只用 exact 主键匹配,不使用宽泛 pattern 以防误吞子型号。o 系列 serviceType 由 responses 调整为 reasoning(responses 为 OpenAI 直连专有,对 NewAPI 网关不适用)。",
"specs": [
{
"id": "gpt-6.1-sol",
"displayName": "GPT-6.1 Sol",
"family": "gpt-6.1-sol",
"match": {
"exact": [
"gpt-6.1-sol"
]
},
"spec": {
"contextWindow": 1050000,
"maxOutputTokens": 128000,
"capabilities": [
"chat",
"reasoning",
"code",
"vision",
"long_context",
"tool_use",
"agent"
],
"serviceType": [
"chat"
],
"supportsReasoning": true,
"description": "GPT-6.1 Sol,1.05M 上下文,128K 最大输出;工具调用需要 Responses API,不支持关闭推理"
},
"routing": {
"tier": "balanced",
"routingPriority": 4,
"eligibleForAgent": true,
"defaultReference": false,
"reasoning": {
"supportedModes": [
"auto",
"low",
"medium",
"high",
"xhigh",
"max"
],
"defaultMode": "medium"
}
}
},
{
"id": "gpt-image-2.5-sunburst",
"displayName": "GPT Image 2.5 Sunburst",

View File

@@ -147,6 +147,48 @@
},
"source": "preset"
},
{
"modelName": "claude-sonnet-5-5",
"displayName": "Claude Sonnet 5.5",
"serviceType": [
"chat"
],
"description": "Claude Sonnet 5.5,速度与智能平衡,1M 上下文,默认 high effort,自适应思考",
"contextWindow": 1000000,
"maxOutputTokens": 128000,
"capabilities": [
"chat",
"reasoning",
"code",
"vision",
"tool_use",
"agent",
"long_context"
],
"extra": {
"adaptiveThinking": true,
"reasoning": {
"supportedEfforts": [
"low",
"medium",
"high",
"xhigh",
"max"
],
"defaultEffort": "high"
},
"thinkingRoundTrip": {
"enabled": true,
"protocol": "anthropic-messages",
"allowEmptySignature": false,
"scope": "active-tool-turn"
},
"thinkingToolTurnValidation": "accepts-thinkless",
"samplingParametersDeprecated": true,
"forcedToolChoiceUnsupported": true
},
"source": "preset"
},
{
"modelName": "claude-sonnet-5",
"displayName": "Claude Sonnet 5",

View File

@@ -186,6 +186,65 @@
"pricingNotes": "Prices are per 1M tokens. Full 1M context is billed at standard pricing."
}
},
{
"modelName": "claude-sonnet-5-5",
"displayName": "Claude Sonnet 5.5",
"serviceType": [
"chat",
"computer_use"
],
"description": "Claude Sonnet 5.5,速度与智能平衡,1M 上下文,默认 high effort,自适应思考",
"contextWindow": 1000000,
"maxOutputTokens": 128000,
"capabilities": [
"chat",
"reasoning",
"code",
"vision",
"tool_use",
"computer_use",
"agent",
"long_context"
],
"inputPrice": 2,
"outputPrice": 10,
"extra": {
"thinkingRoundTrip": {
"enabled": true,
"protocol": "anthropic-messages",
"allowEmptySignature": false,
"scope": "active-tool-turn"
},
"thinkingToolTurnValidation": "accepts-thinkless",
"serverSideWebSearch": {
"enabled": true,
"dialect": "anthropic-messages",
"fallbackPriority": 3,
"searchRequestPriceUsd": 0.01,
"toolType": "web_search_20260318"
},
"cachePricing": {
"write5m": 2.5,
"write1h": 4,
"read": 0.2
},
"adaptiveThinking": true,
"reasoning": {
"supportedEfforts": [
"low",
"medium",
"high",
"xhigh",
"max"
],
"defaultEffort": "high"
},
"defaultEffort": "xhigh",
"samplingParametersDeprecated": true,
"forcedToolChoiceUnsupported": true,
"promptCacheMinTokens": 512
}
},
{
"modelName": "claude-sonnet-5",
"displayName": "Claude Sonnet 5",

View File

@@ -24,6 +24,38 @@
"reasoning"
],
"models": [
{
"modelName": "gpt-6.1-sol",
"displayName": "GPT-6.1 Sol",
"serviceType": [
"chat"
],
"description": "GPT-6.1 Sol,面向复杂编程、电脑使用和专业工作,1.05M 上下文;工具调用使用 Responses API",
"contextWindow": 1050000,
"maxOutputTokens": 128000,
"capabilities": [
"chat",
"reasoning",
"code",
"vision",
"ultra_long_context",
"tool_use",
"agent"
],
"extra": {
"reasoning": {
"supportedEfforts": [
"low",
"medium",
"high",
"xhigh",
"max"
],
"defaultEffort": "medium"
}
},
"source": "preset"
},
{
"modelName": "gpt-6-sol",
"displayName": "GPT-6 Sol",

View File

@@ -24,6 +24,44 @@
"translation"
],
"models": [
{
"modelName": "gpt-6.1-sol",
"displayName": "GPT-6.1 Sol",
"serviceType": [
"chat",
"responses"
],
"contextWindow": 1050000,
"maxOutputTokens": 128000,
"capabilities": [
"chat",
"reasoning",
"code",
"vision",
"ultra_long_context",
"tool_use",
"agent"
],
"description": "GPT-6.1 Sol,面向复杂编程、电脑使用和专业工作,1.05M 上下文;工具调用使用 Responses API",
"inputPrice": 2,
"outputPrice": 10,
"extra": {
"serverSideWebSearch": {
"enabled": true,
"dialect": "openai-responses",
"fallbackPriority": 2,
"searchRequestPriceUsd": 0.01,
"toolType": "web_search"
},
"cachedInputPrice": 0.1,
"reasoning": {
"supportedEfforts": ["low", "medium", "high", "xhigh", "max"],
"defaultEffort": "medium"
},
"pricingNotes": "Prices are per 1M tokens. Cache writes $2.50/M. Above 272K input tokens, input and cache rates are 2x and output rates are 1.5x for the full request. Fast mode is 2x; Batch and Flex are 50% lower. Tool calling requires Responses API; none/minimal reasoning are unsupported.",
"responsesOnly": true
}
},
{
"modelName": "gpt-image-2.5-sunburst",
"displayName": "GPT Image 2.5 Sunburst",

View File

@@ -1,6 +1,6 @@
{
"version": "1.0.0",
"presetDataVersion": 122,
"updatedAt": "2026-09-26",
"presetDataVersion": 123,
"updatedAt": "2026-10-01",
"description": "DesireCore 官方配置中心"
}