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 模型拒绝的采样参数与强制工具选择 (#103)
Claude Opus 4.7+ / Opus 5 / Fable 携带 temperature / top_p / top_k 会被官方 400 (Sonnet 5 非默认值 400),Claude Fable 5.1 对 tool_choice any / tool 回 400。客户端 改为纯按声明在出站删除采样参数、把强制工具选择降级为 auto(desirecore 主仓配套 PR)。 - providers/anthropic.json:claude-fable-5-1 增加 forcedToolChoiceUnsupported - model-specs/anthropic.json:fable-5-1 / opus-5 / opus-4-8 / opus-4-7 / sonnet-5 声明 samplingParametersDeprecated,fable-5-1 声明 forcedToolChoiceUnsupported,供精确命中 补全的动态 Provider 使用;opus-4-7 的 defaultTemperature 由 1 改为 null(不支持温度调节) - schemas:provider model extra 与 ModelSpec spec.extra 声明两个布尔字段(含 description) - 测试:已知拒绝代际必须声明(单向)、布尔类型校验 - presetDataVersion 116 → 117
This commit is contained in:
@@ -268,6 +268,14 @@
|
||||
"properties": {
|
||||
"modelOrigin": { "$ref": "#/definitions/modelOrigin" },
|
||||
"speech": { "$ref": "#/definitions/speechModelProfile" },
|
||||
"samplingParametersDeprecated": {
|
||||
"type": "boolean",
|
||||
"description": "模型是否拒绝采样参数(如 Claude Opus 4.7+ / Opus 5 / Fable / Mythos 携带 temperature、top_p 或 top_k 即 400,Sonnet 5 对非默认值 400)。true 时客户端出站删除请求体顶层的 temperature / top_p / top_k——无论取值来自模型 defaultTemperature、用户覆写、工作流默认值还是父会话继承;false 或缺省时原样发送,客户端不按模型 ID 推断。只描述模型固有属性:精确命中的 ModelSpec 会补全到各接入面的同名模型,family 兜底不继承;作用于 Agent 引擎发出的模型请求,Claude 订阅(claude-oauth)请求由 Claude CLI 自建、不受本字段影响。"
|
||||
},
|
||||
"forcedToolChoiceUnsupported": {
|
||||
"type": "boolean",
|
||||
"description": "模型是否拒绝强制工具选择(如 Claude Fable 5.1 / Mythos 5.1:tool_choice.type 为 any 或 tool 即 400)。true 时客户端把强制工具选择降级为 auto(Anthropic 的 any / tool、OpenAI 的 required / 指定函数),Anthropic 请求保留 disable_parallel_tool_use,none 与 auto 不受影响;false 或缺省时按调用方要求发送,客户端不按模型 ID 推断。只描述模型固有属性:精确命中的 ModelSpec 会补全到各接入面的同名模型,family 兜底不继承;作用于 Agent 引擎发出的模型请求,Claude 订阅(claude-oauth)请求由 Claude CLI 自建、不受本字段影响。"
|
||||
},
|
||||
"thinkingOnly": {
|
||||
"type": "boolean",
|
||||
"description": "模型强制思考、无法关闭(如 GLM-5.3 系列 thinking.type 仅接受 enabled)。true 时客户端把 off 从可选档位移除,并把内部 suppressThinking 降级为 auto,避免发出必然被上游拒绝的关闭参数。只描述模型固有属性,不声明接入面支持哪些深度档位——后者只能写在 provider model 的 extra.reasoning 中。"
|
||||
|
||||
@@ -284,6 +284,14 @@
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"samplingParametersDeprecated": {
|
||||
"type": "boolean",
|
||||
"description": "模型是否拒绝采样参数(如 Claude Opus 4.7+ / Opus 5 / Fable / Mythos 携带 temperature、top_p 或 top_k 即 400,Sonnet 5 对非默认值 400)。true 时客户端出站删除请求体顶层的 temperature / top_p / top_k——无论取值来自模型 defaultTemperature、用户覆写、工作流默认值还是父会话继承;false 或缺省时原样发送,客户端不按模型 ID 推断。只描述模型固有属性:精确命中的 ModelSpec 会补全到各接入面的同名模型,family 兜底不继承;作用于 Agent 引擎发出的模型请求,Claude 订阅(claude-oauth)请求由 Claude CLI 自建、不受本字段影响。"
|
||||
},
|
||||
"forcedToolChoiceUnsupported": {
|
||||
"type": "boolean",
|
||||
"description": "模型是否拒绝强制工具选择(如 Claude Fable 5.1 / Mythos 5.1:tool_choice.type 为 any 或 tool 即 400)。true 时客户端把强制工具选择降级为 auto(Anthropic 的 any / tool、OpenAI 的 required / 指定函数),Anthropic 请求保留 disable_parallel_tool_use,none 与 auto 不受影响;false 或缺省时按调用方要求发送,客户端不按模型 ID 推断。只描述模型固有属性:精确命中的 ModelSpec 会补全到各接入面的同名模型,family 兜底不继承;作用于 Agent 引擎发出的模型请求,Claude 订阅(claude-oauth)请求由 Claude CLI 自建、不受本字段影响。"
|
||||
},
|
||||
"thinkingToolTurnValidation": {
|
||||
"type": "string",
|
||||
"enum": ["requires-thinking", "accepts-thinkless"],
|
||||
|
||||
Reference in New Issue
Block a user