Files
config-center/compute/providers/anthropic.json
Yige 5171219a13 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
2026-09-13 22:56:51 -04:00

204 lines
5.4 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"id": "provider-anthropic-001",
"provider": "anthropic",
"label": "Anthropic Claude",
"baseUrl": "https://api.anthropic.com",
"apiFormat": "anthropic-messages",
"apiKeyRef": "anthropic",
"apiKeyVerified": false,
"enabled": false,
"status": "unconfigured",
"priceCurrency": "USD",
"services": [
"chat",
"computer_use"
],
"models": [
{
"modelName": "claude-fable-5-1",
"displayName": "Claude Fable 5.1",
"serviceType": [
"chat"
],
"description": "面向高难推理和长程智能体任务,1M 上下文,始终开启自适应思考",
"contextWindow": 1000000,
"maxOutputTokens": 128000,
"capabilities": [
"chat",
"reasoning",
"code",
"vision",
"tool_use",
"agent",
"long_context"
],
"inputPrice": 10,
"outputPrice": 50,
"extra": {
"thinkingRoundTrip": {
"enabled": true,
"protocol": "anthropic-messages",
"allowEmptySignature": false,
"scope": "active-tool-turn"
},
"thinkingToolTurnValidation": "accepts-thinkless",
"serverSideWebSearch": {
"enabled": true,
"dialect": "anthropic-messages",
"fallbackPriority": 1,
"searchRequestPriceUsd": 0.01,
"toolType": "web_search_20260318"
},
"cachePricing": {
"write5m": 12.5,
"write1h": 20,
"read": 0.25
},
"adaptiveThinking": true,
"reasoning": {
"supportedEfforts": [
"low",
"medium",
"high",
"xhigh",
"max"
],
"defaultEffort": "high"
},
"samplingParametersDeprecated": true,
"forcedToolChoiceUnsupported": true,
"pricingNotes": "Prices are per 1M tokens. Full 1M context is billed at standard pricing.",
"thinkingOnByDefault": true,
"thinkingOnly": true
}
},
{
"modelName": "claude-opus-5",
"displayName": "Claude Opus 5",
"serviceType": [
"chat"
],
"description": "Anthropic Opus 系列当前旗舰,复杂智能体编码与长程任务能力显著强于 Opus 4.8,价格不变,1M 上下文",
"contextWindow": 1000000,
"maxOutputTokens": 128000,
"capabilities": [
"chat",
"reasoning",
"code",
"vision",
"tool_use",
"agent",
"long_context"
],
"inputPrice": 5,
"outputPrice": 25,
"extra": {
"thinkingRoundTrip": {
"enabled": true,
"protocol": "anthropic-messages",
"allowEmptySignature": false,
"scope": "active-tool-turn"
},
"thinkingToolTurnValidation": "accepts-thinkless",
"serverSideWebSearch": {
"enabled": true,
"dialect": "anthropic-messages",
"fallbackPriority": 2,
"searchRequestPriceUsd": 0.01,
"toolType": "web_search_20260318"
},
"cachePricing": {
"write5m": 6.25,
"write1h": 10,
"read": 0.5
},
"promptCacheMinTokens": 512,
"adaptiveThinking": true,
"thinkingOnByDefault": true,
"reasoning": {
"supportedEfforts": [
"low",
"medium",
"high",
"xhigh",
"max"
],
"defaultEffort": "xhigh"
},
"defaultEffort": "xhigh",
"samplingParametersDeprecated": true,
"pricingNotes": "Prices are per 1M tokens. Full 1M context is billed at standard pricing."
}
},
{
"modelName": "claude-sonnet-5",
"displayName": "Claude Sonnet 5",
"serviceType": [
"chat",
"computer_use"
],
"description": "Anthropic Sonnet 5,速度与智能平衡模型,支持电脑使用和长上下文智能体任务",
"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
},
"introductoryPricingUntil": "2026-08-31",
"standardPricingFrom": "2026-09-01",
"standardInputPrice": 3,
"standardOutputPrice": 15,
"adaptiveThinking": true,
"reasoning": {
"supportedEfforts": [
"low",
"medium",
"high",
"xhigh",
"max"
],
"defaultEffort": "xhigh"
},
"defaultEffort": "xhigh",
"samplingParametersDeprecated": true
}
}
],
"tombstones": [
"claude-opus-4-8",
"claude-opus-4-7",
"claude-sonnet-4-6",
"claude-fable-5",
"claude-haiku-4-5",
"claude-haiku-4-5-20251001"
]
}