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:
2026-09-13 22:56:51 -04:00
committed by GitHub
parent 0be8207e32
commit 5171219a13
6 changed files with 101 additions and 7 deletions

View File

@@ -33,7 +33,9 @@
"extra": {
"adaptiveThinking": true,
"thinkingOnByDefault": true,
"thinkingOnly": true
"thinkingOnly": true,
"samplingParametersDeprecated": true,
"forcedToolChoiceUnsupported": true
}
},
"routing": {
@@ -80,7 +82,8 @@
"supportsReasoning": true,
"description": "Claude Opus 5,Anthropic Opus 系列当前旗舰;思考默认开启,effort 支持到 max",
"extra": {
"adaptiveThinking": true
"adaptiveThinking": true,
"samplingParametersDeprecated": true
}
},
"routing": {
@@ -127,7 +130,8 @@
"supportsReasoning": true,
"description": "Claude Opus 4.8,Anthropic Opus 系列最新旗舰",
"extra": {
"adaptiveThinking": true
"adaptiveThinking": true,
"samplingParametersDeprecated": true
}
}
},
@@ -153,11 +157,12 @@
"serviceType": [
"chat"
],
"defaultTemperature": 1,
"defaultTemperature": null,
"supportsReasoning": true,
"description": "Anthropic 当前最强通用模型,适合复杂推理和智能体编码任务",
"extra": {
"adaptiveThinking": true
"adaptiveThinking": true,
"samplingParametersDeprecated": true
}
}
},
@@ -208,7 +213,8 @@
"supportsReasoning": true,
"description": "Claude Sonnet 5,速度与智能平衡;思考默认开启,effort 支持到 max",
"extra": {
"adaptiveThinking": true
"adaptiveThinking": true,
"samplingParametersDeprecated": true
}
},
"routing": {

View File

@@ -66,6 +66,7 @@
"defaultEffort": "high"
},
"samplingParametersDeprecated": true,
"forcedToolChoiceUnsupported": true,
"pricingNotes": "Prices are per 1M tokens. Full 1M context is billed at standard pricing.",
"thinkingOnByDefault": true,
"thinkingOnly": true