mirror of
https://git.openapi.site/https://github.com/desirecore/config-center.git
synced 2026-10-21 07:04:11 +08:00
feat(compute): 官方 Anthropic 模型声明接受不含 thinking 的工具轮 (#99)
新增 extra.thinkingToolTurnValidation(requires-thinking / accepts-thinkless),与 thinkingRoundTrip 并列(后者 additionalProperties:false,不能往里加字段)。 anthropic.json 与 anthropic-claude.json 的 Fable 5.1 / Opus 5 / Sonnet 5 声明 accepts-thinkless:官方 adaptive thinking 不要求工具轮以 thinking 开头,模型跳过思考的 工具轮原样回放即合法(mini 真机六轮验证全部 200)。客户端据此不再对这类响应重试、 不再降级为关闭思考。旧客户端忽略该字段,行为不变。 model-spec schema 的 spec.extra 同步禁止 thinkingRoundTrip 与 thinkingToolTurnValidation, 与客户端 Schema 一致,避免写错后新客户端整份拒收规格。 presetDataVersion 113 → 114。
This commit is contained in:
@@ -252,7 +252,7 @@
|
||||
},
|
||||
"extra": {
|
||||
"type": "object",
|
||||
"description": "接入面特定配置:如 TTS 模型音色列表、ASR 支持格式、reasoning effort 与 native thinking 回放能力。这里是兼容扩展面:旧客户端会安全保留并忽略未知子字段。",
|
||||
"description": "接入面特定配置:如 TTS 模型音色列表、ASR 支持格式、reasoning effort、native thinking 回放能力与工具轮 thinking 校验口径。这里是兼容扩展面:旧客户端会安全保留并忽略未知子字段。",
|
||||
"properties": {
|
||||
"thinkingRoundTrip": {
|
||||
"type": "object",
|
||||
@@ -280,6 +280,11 @@
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"thinkingToolTurnValidation": {
|
||||
"type": "string",
|
||||
"enum": ["requires-thinking", "accepts-thinkless"],
|
||||
"description": "接入面对 thinking 工具轨迹中不含 thinking 的工具轮的校验口径,仅在同一模型声明了 thinkingRoundTrip 时生效;缺省视为 requires-thinking。requires-thinking:接入面要求每个工具轮都带可回放 thinking(例如只在首轮返回 thinking、之后会拒绝整条会话的兼容网关),客户端在执行工具前把这类响应判为上游失败并重试,同一会话再次违规时关闭思考。accepts-thinkless:接入面按 Anthropic adaptive thinking 规则校验,模型自行跳过思考的工具轮本身就是合法历史,客户端原样接受,不重试也不降级。只有官方文档或真机回放证明接受此类历史的接入面才能声明 accepts-thinkless;不得由 Provider 名称或 URL 推断。旧客户端忽略该字段并保持 requires-thinking 行为。"
|
||||
},
|
||||
"reasoning": {
|
||||
"type": "object",
|
||||
"description": "当前 Provider 接入面接受哪些 reasoning effort 值——精确档位矩阵。只能写在 provider model 的 extra 里:同一模型经不同网关支持的集合可能不同,因此 model-spec 的 spec.extra 里写本键会被客户端 applySpec 主动丢弃。想表达「这个模型根本关不掉思考」的用 model-spec 的 spec.extra.thinkingOnly,那只回答 off 能否使用、不声明任何深度档位。",
|
||||
|
||||
Reference in New Issue
Block a user