mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-30 02:14:43 +08:00
Upgrade default Claude Opus model to 4.8
Bump the default Opus route/model from claude-opus-4-7 to claude-opus-4-8 across provider presets (claude, claudeDesktop, hermes, openclaw, opencode, universal), i18n locales (zh/en/ja/zh-TW), pricing seed data, and the user-manual docs. - Add claude-opus-4-8 pricing row ($5/$25/$0.50/$6.25); keep the 4-7 row for historical usage stats (seeded via INSERT OR IGNORE). - Claude Desktop proxy: accept bidirectional opus 4-7 <-> 4-8 route alias during rollout so previously saved routes keep resolving. - thinking_optimizer: route opus-4-8 through adaptive thinking and normalize dotted model ids (also fixes dotted 4-6/4-7 falling back to legacy). - usage_stats: normalize Bedrock/Vertex/aggregator opus-4-8 ids to base pricing. Also merge role:"system" messages into the Gemini systemInstruction in the Anthropic->Gemini transform.
This commit is contained in:
@@ -3214,6 +3214,11 @@ mod tests {
|
||||
result.is_some(),
|
||||
"Claude Desktop 短路由 claude-haiku-4-5 应能匹配到 claude-haiku-4-5-20251001"
|
||||
);
|
||||
let result = find_model_pricing_row(&conn, "anthropic/claude-opus-4.8")?;
|
||||
assert!(
|
||||
result.is_some(),
|
||||
"聚合商点号格式 anthropic/claude-opus-4.8 应能匹配到 claude-opus-4-8"
|
||||
);
|
||||
|
||||
// Claude Desktop 旧版/异常包装的非 Anthropic route:claude-gpt-5.5 → gpt-5.5
|
||||
let result = find_model_pricing_row(&conn, "claude-gpt-5.5")?;
|
||||
@@ -3229,6 +3234,16 @@ mod tests {
|
||||
result.is_some(),
|
||||
"Bedrock/Vertex 风格 Claude 模型 ID 应能归一化到基础 Claude 模型定价"
|
||||
);
|
||||
let result = find_model_pricing_row(&conn, "global.anthropic.claude-opus-4-8-v1:0")?;
|
||||
assert!(
|
||||
result.is_some(),
|
||||
"Bedrock 风格 Claude Opus 4.8 模型 ID 应能归一化到基础 Claude 模型定价"
|
||||
);
|
||||
let result = find_model_pricing_row(&conn, "claude-opus-4-8@20260527")?;
|
||||
assert!(
|
||||
result.is_some(),
|
||||
"Vertex 风格 Claude Opus 4.8 模型 ID 应能归一化到基础 Claude 模型定价"
|
||||
);
|
||||
|
||||
// Reasoning effort 后缀:没有专门价格时回退到基础模型
|
||||
let result = find_model_pricing_row(&conn, "gpt-5.4@low")?;
|
||||
|
||||
Reference in New Issue
Block a user