From a752fddd0b8afe4582504380870f0a88a825f4ef Mon Sep 17 00:00:00 2001 From: Yige Date: Sat, 8 Aug 2026 17:59:09 +0800 Subject: [PATCH] =?UTF-8?q?feat(compute):=20=E6=96=B0=E5=A2=9E=20Claude=20?= =?UTF-8?q?Opus=205=20+=20=E8=A1=A5=E9=BD=90=20Claude=20=E7=B3=BB=E5=88=97?= =?UTF-8?q?=20effort=20=E6=A1=A3=E4=BD=8D=EF=BC=8CpresetDataVersion=20?= =?UTF-8?q?=E2=86=92=2085=20(#71)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Opus 5 是 Anthropic Opus 系列当前旗舰(1M 上下文 / 128K 输出 / $5·$25 per MTok, 与 Opus 4.8 同价),此前 config-center 完全缺失,用户在模型选择器里看不到它。 变更: - compute/providers/anthropic.json:新增 claude-opus-5(排在 fable-5 之后、 opus-4-8 之前);serverSideWebSearch.fallbackPriority 顺延重排 - compute/providers/anthropic-claude.json:Claude 订阅 provider 同步新增 claude-opus-5 - compute/model-specs/anthropic.json:补 claude-opus-5 与 claude-sonnet-5 规格 (sonnet-5 此前只有 provider 条目、没有规格) - 补 extra.reasoning.supportedEfforts:客户端 parseReasoningEffortConfig 只读 extra.reasoning,原有的顶层 extra.defaultEffort 不被消费,导致 Claude 模型的 effort 档位在 UI 上始终不可选。按各模型实际支持声明档位(sonnet-4-6 无 xhigh) - __tests__/validate.test.mjs:WebSearch 允许名单登记 claude-opus-5 - manifest.json:presetDataVersion 84 → 85 --- __tests__/validate.test.mjs | 1 + compute/model-specs/anthropic.json | 28 ++++++ compute/providers/anthropic-claude.json | 73 +++++++++++++++ compute/providers/anthropic.json | 112 ++++++++++++++++++++++-- manifest.json | 2 +- 5 files changed, 209 insertions(+), 7 deletions(-) diff --git a/__tests__/validate.test.mjs b/__tests__/validate.test.mjs index 999e048..3b1a324 100644 --- a/__tests__/validate.test.mjs +++ b/__tests__/validate.test.mjs @@ -113,6 +113,7 @@ describe('真实数据全量校验', () => { assert.deepEqual(enabled(anthropic), [ 'claude-fable-5', + 'claude-opus-5', 'claude-opus-4-8', 'claude-sonnet-5', 'claude-opus-4-7', diff --git a/compute/model-specs/anthropic.json b/compute/model-specs/anthropic.json index 8314569..70bc816 100644 --- a/compute/model-specs/anthropic.json +++ b/compute/model-specs/anthropic.json @@ -15,6 +15,20 @@ "description": "Anthropic 最强模型,基于 Mythos 架构,支持自主知识工作" } }, + { + "id": "claude-opus-5", + "displayName": "Claude Opus 5", + "family": "claude-opus", + "match": { "patterns": ["claude-opus-5*"] }, + "spec": { + "contextWindow": 1000000, + "maxOutputTokens": 128000, + "capabilities": ["chat", "reasoning", "code", "vision", "tool_use", "long_context"], + "serviceType": ["chat"], + "supportsReasoning": true, + "description": "Claude Opus 5,Anthropic Opus 系列当前旗舰;思考默认开启,effort 支持到 max" + } + }, { "id": "claude-opus-4-8", "displayName": "Claude Opus 4.8", @@ -44,6 +58,20 @@ "description": "Anthropic 当前最强通用模型,适合复杂推理和智能体编码任务" } }, + { + "id": "claude-sonnet-5", + "displayName": "Claude Sonnet 5", + "family": "claude-sonnet", + "match": { "patterns": ["claude-sonnet-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,速度与智能平衡;思考默认开启,effort 支持到 max" + } + }, { "id": "claude-sonnet-4-6", "displayName": "Claude Sonnet 4.6", diff --git a/compute/providers/anthropic-claude.json b/compute/providers/anthropic-claude.json index 4f909c5..88c06a0 100644 --- a/compute/providers/anthropic-claude.json +++ b/compute/providers/anthropic-claude.json @@ -43,6 +43,53 @@ "agent", "long_context" ], + "extra": { + "adaptiveThinking": true, + "reasoning": { + "supportedEfforts": [ + "low", + "medium", + "high", + "xhigh", + "max" + ], + "defaultEffort": "high" + } + }, + "source": "preset" + }, + { + "modelName": "claude-opus-5", + "displayName": "Claude Opus 5", + "serviceType": [ + "chat" + ], + "description": "Claude 订阅额度计费,Opus 系列当前旗舰,复杂智能体编码与长程任务首选,1M 上下文", + "contextWindow": 1000000, + "maxOutputTokens": 128000, + "capabilities": [ + "chat", + "reasoning", + "code", + "vision", + "tool_use", + "agent", + "long_context" + ], + "extra": { + "adaptiveThinking": true, + "thinkingOnByDefault": true, + "reasoning": { + "supportedEfforts": [ + "low", + "medium", + "high", + "xhigh", + "max" + ], + "defaultEffort": "high" + } + }, "source": "preset" }, { @@ -63,6 +110,19 @@ "agent", "long_context" ], + "extra": { + "adaptiveThinking": true, + "reasoning": { + "supportedEfforts": [ + "low", + "medium", + "high", + "xhigh", + "max" + ], + "defaultEffort": "high" + } + }, "source": "preset" }, { @@ -83,6 +143,19 @@ "agent", "long_context" ], + "extra": { + "adaptiveThinking": true, + "reasoning": { + "supportedEfforts": [ + "low", + "medium", + "high", + "xhigh", + "max" + ], + "defaultEffort": "high" + } + }, "source": "preset" }, { diff --git a/compute/providers/anthropic.json b/compute/providers/anthropic.json index 7427de3..9cb52b7 100644 --- a/compute/providers/anthropic.json +++ b/compute/providers/anthropic.json @@ -48,6 +48,67 @@ "read": 1 }, "adaptiveThinking": true, + "reasoning": { + "supportedEfforts": [ + "low", + "medium", + "high", + "xhigh", + "max" + ], + "defaultEffort": "high" + }, + "samplingParametersDeprecated": true, + "pricingNotes": "Prices are per 1M tokens. Full 1M context is billed at standard pricing." + } + }, + { + "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": { + "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": "high" + }, + "defaultEffort": "high", "samplingParametersDeprecated": true, "pricingNotes": "Prices are per 1M tokens. Full 1M context is billed at standard pricing." } @@ -76,7 +137,7 @@ "serverSideWebSearch": { "enabled": true, "dialect": "anthropic-messages", - "fallbackPriority": 2, + "fallbackPriority": 3, "searchRequestPriceUsd": 0.01, "toolType": "web_search_20260318" }, @@ -86,6 +147,16 @@ "read": 0.5 }, "adaptiveThinking": true, + "reasoning": { + "supportedEfforts": [ + "low", + "medium", + "high", + "xhigh", + "max" + ], + "defaultEffort": "high" + }, "defaultEffort": "high", "samplingParametersDeprecated": true, "pricingNotes": "Prices are per 1M tokens. Full 1M context is billed at standard pricing." @@ -117,7 +188,7 @@ "serverSideWebSearch": { "enabled": true, "dialect": "anthropic-messages", - "fallbackPriority": 3, + "fallbackPriority": 4, "searchRequestPriceUsd": 0.01, "toolType": "web_search_20260318" }, @@ -131,6 +202,16 @@ "standardInputPrice": 3, "standardOutputPrice": 15, "adaptiveThinking": true, + "reasoning": { + "supportedEfforts": [ + "low", + "medium", + "high", + "xhigh", + "max" + ], + "defaultEffort": "high" + }, "defaultEffort": "high", "samplingParametersDeprecated": true } @@ -157,7 +238,7 @@ "serverSideWebSearch": { "enabled": true, "dialect": "anthropic-messages", - "fallbackPriority": 4, + "fallbackPriority": 5, "searchRequestPriceUsd": 0.01, "toolType": "web_search_20260318" }, @@ -166,7 +247,17 @@ "write1h": 10, "read": 0.5 }, - "pricingNotes": "Prices are per 1M tokens. Opus 4.7 includes the full 1M context window at standard pricing." + "pricingNotes": "Prices are per 1M tokens. Opus 4.7 includes the full 1M context window at standard pricing.", + "reasoning": { + "supportedEfforts": [ + "low", + "medium", + "high", + "xhigh", + "max" + ], + "defaultEffort": "high" + } } }, { @@ -194,7 +285,7 @@ "serverSideWebSearch": { "enabled": true, "dialect": "anthropic-messages", - "fallbackPriority": 5, + "fallbackPriority": 6, "searchRequestPriceUsd": 0.01, "toolType": "web_search_20260318" }, @@ -203,7 +294,16 @@ "write1h": 6, "read": 0.3 }, - "pricingNotes": "Prices are per 1M tokens. Sonnet 4.6 includes the full 1M context window at standard pricing." + "pricingNotes": "Prices are per 1M tokens. Sonnet 4.6 includes the full 1M context window at standard pricing.", + "reasoning": { + "supportedEfforts": [ + "low", + "medium", + "high", + "max" + ], + "defaultEffort": "high" + } } }, { diff --git a/manifest.json b/manifest.json index 1eb1703..f064f31 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "version": "1.0.0", - "presetDataVersion": 84, + "presetDataVersion": 85, "updatedAt": "2026-08-08", "description": "DesireCore 官方配置中心" }