From 7832ae26a9a51b0b985e7650016e8655e565a6ef Mon Sep 17 00:00:00 2001 From: Yige Date: Sat, 8 Aug 2026 18:44:57 +0800 Subject: [PATCH] =?UTF-8?q?feat(compute):=20=E4=B8=8B=E7=BA=BF=20Opus=204.?= =?UTF-8?q?8=20/=20Opus=204.7=20/=20Sonnet=204.6=EF=BC=8CpresetDataVersion?= =?UTF-8?q?=20=E2=86=92=2086=20(#72)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Anthropic provider 保留 Fable 5 / Opus 5 / Sonnet 5 / Haiku 4.5;Claude 订阅 provider 保留 Fable 5 / Opus 5 / Sonnet 5 / Haiku 4.5。 三个模型同时写入 provider.tombstones —— 仅从 models 数组删除只会触发 deprecated 软降级(保留本地数据),写入 tombstones 才是真删除,且客户端 resolver 的 resolveMappingModel() 只对 tombstone 模型执行「回退到同 serviceType 的其他可用 模型」,未 tombstone 的缺失模型会原样透传。因此写 tombstones 才能让存量会话平滑 迁移到 Opus 5,而不是继续指向一个已消失的模型名。 model-specs/anthropic.json 中三者的规格条目保留:规格库按 model_name 匹配任意 上游(含 OpenRouter 风格 vendor 前缀),与 provider 清单解耦——该文件本来就有 claude-sonnet-4-5 这类无 provider 条目的规格。删除会让经其他网关访问这些模型的 用户丢失上下文窗口/能力元数据。 用户侧 user-added / synced / ollama-discovery 来源的同名模型不受 tombstones 影响。 --- __tests__/validate.test.mjs | 3 - compute/providers/anthropic-claude.json | 36 +----- compute/providers/anthropic.json | 146 +----------------------- manifest.json | 2 +- 4 files changed, 10 insertions(+), 177 deletions(-) diff --git a/__tests__/validate.test.mjs b/__tests__/validate.test.mjs index 3b1a324..a6aec77 100644 --- a/__tests__/validate.test.mjs +++ b/__tests__/validate.test.mjs @@ -114,10 +114,7 @@ describe('真实数据全量校验', () => { assert.deepEqual(enabled(anthropic), [ 'claude-fable-5', 'claude-opus-5', - 'claude-opus-4-8', 'claude-sonnet-5', - 'claude-opus-4-7', - 'claude-sonnet-4-6', ]) assert.deepEqual(enabled(openai), [ 'gpt-5.5', diff --git a/compute/providers/anthropic-claude.json b/compute/providers/anthropic-claude.json index 88c06a0..f480fce 100644 --- a/compute/providers/anthropic-claude.json +++ b/compute/providers/anthropic-claude.json @@ -92,39 +92,6 @@ }, "source": "preset" }, - { - "modelName": "claude-opus-4-8", - "displayName": "Claude Opus 4.8", - "serviceType": [ - "chat" - ], - "description": "Claude 订阅额度计费,Opus 级复杂智能体编码与企业任务模型,1M 上下文", - "contextWindow": 1000000, - "maxOutputTokens": 128000, - "capabilities": [ - "chat", - "reasoning", - "code", - "vision", - "tool_use", - "agent", - "long_context" - ], - "extra": { - "adaptiveThinking": true, - "reasoning": { - "supportedEfforts": [ - "low", - "medium", - "high", - "xhigh", - "max" - ], - "defaultEffort": "high" - } - }, - "source": "preset" - }, { "modelName": "claude-sonnet-5", "displayName": "Claude Sonnet 5", @@ -175,5 +142,8 @@ ], "source": "preset" } + ], + "tombstones": [ + "claude-opus-4-8" ] } diff --git a/compute/providers/anthropic.json b/compute/providers/anthropic.json index 9cb52b7..0a702f5 100644 --- a/compute/providers/anthropic.json +++ b/compute/providers/anthropic.json @@ -113,55 +113,6 @@ "pricingNotes": "Prices are per 1M tokens. Full 1M context is billed at standard pricing." } }, - { - "modelName": "claude-opus-4-8", - "displayName": "Claude Opus 4.8", - "serviceType": [ - "chat" - ], - "description": "Anthropic Opus 级复杂智能体编码与企业任务模型,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": 3, - "searchRequestPriceUsd": 0.01, - "toolType": "web_search_20260318" - }, - "cachePricing": { - "write5m": 6.25, - "write1h": 10, - "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." - } - }, { "modelName": "claude-sonnet-5", "displayName": "Claude Sonnet 5", @@ -188,7 +139,7 @@ "serverSideWebSearch": { "enabled": true, "dialect": "anthropic-messages", - "fallbackPriority": 4, + "fallbackPriority": 3, "searchRequestPriceUsd": 0.01, "toolType": "web_search_20260318" }, @@ -216,96 +167,6 @@ "samplingParametersDeprecated": true } }, - { - "modelName": "claude-opus-4-7", - "displayName": "Claude Opus 4.7", - "serviceType": [ - "chat" - ], - "description": "Anthropic 当前最强通用模型,适合复杂推理和智能体编码任务", - "contextWindow": 1000000, - "maxOutputTokens": 128000, - "capabilities": [ - "chat", - "reasoning", - "code", - "vision", - "tool_use" - ], - "inputPrice": 5, - "outputPrice": 25, - "extra": { - "serverSideWebSearch": { - "enabled": true, - "dialect": "anthropic-messages", - "fallbackPriority": 5, - "searchRequestPriceUsd": 0.01, - "toolType": "web_search_20260318" - }, - "cachePricing": { - "write5m": 6.25, - "write1h": 10, - "read": 0.5 - }, - "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" - } - } - }, - { - "modelName": "claude-sonnet-4-6", - "displayName": "Claude Sonnet 4.6", - "serviceType": [ - "chat", - "computer_use" - ], - "description": "Anthropic 高智能高速度模型,适合编码、工具使用和智能体任务", - "contextWindow": 1000000, - "maxOutputTokens": 64000, - "capabilities": [ - "chat", - "reasoning", - "code", - "vision", - "tool_use", - "computer_use" - ], - "inputPrice": 3, - "outputPrice": 15, - "defaultTemperature": 1, - "extra": { - "serverSideWebSearch": { - "enabled": true, - "dialect": "anthropic-messages", - "fallbackPriority": 6, - "searchRequestPriceUsd": 0.01, - "toolType": "web_search_20260318" - }, - "cachePricing": { - "write5m": 3.75, - "write1h": 6, - "read": 0.3 - }, - "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" - } - } - }, { "modelName": "claude-haiku-4-5", "displayName": "Claude Haiku 4.5", @@ -335,5 +196,10 @@ "pricingNotes": "Prices are per 1M tokens." } } + ], + "tombstones": [ + "claude-opus-4-8", + "claude-opus-4-7", + "claude-sonnet-4-6" ] } diff --git a/manifest.json b/manifest.json index f064f31..424ba1e 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "version": "1.0.0", - "presetDataVersion": 85, + "presetDataVersion": 86, "updatedAt": "2026-08-08", "description": "DesireCore 官方配置中心" }