mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-25 13:45:03 +08:00
feat(presets): migrate all aggregator and Bedrock presets to Claude Opus 4.7
- OpenClaw: replace opus-4-6 with opus-4-7 across 17 aggregator presets (id, name, primary, modelCatalog); AWS Bedrock entry rewritten to new SKU anthropic.claude-opus-4-7 (drops -v1 and dated suffix per official 4.7 model card) and pricing corrected to $5/$25/$0.50/$6.25 during the SKU swap, aligning with schema.rs source of truth - OpenCode: same replacement for 13 aggregators plus OPENCODE_PRESET_MODEL_VARIANTS entries for @ai-sdk/amazon-bedrock and @ai-sdk/anthropic, plus AWS Bedrock provider models map - OpenRouter / TheRouter / GitHub Copilot in claudeProviderPresets use dot-style id; update to anthropic/claude-opus-4.7 (missed by 509d2250) - omo: switch agent/category recommended to opus-4-7; replace key in OMO_BACKGROUND_TASK_PLACEHOLDER priority map - hermes_config.rs: update doc comments and test fixtures to opus-4-7; Hermes ModelPanel placeholder and i18n defaultHint examples follow - i18n unspecifiedHigh category description bumped to 'Claude Opus 4.7 max variant' to match omo recommended - Test fixtures updated: therouter preset assertion and opencode Bedrock variant lookup now check for opus-4-7 - Sonnet 4.6 / Haiku 4.5 untouched - no official 4.7 release for them
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
//!
|
||||
//! ```yaml
|
||||
//! model:
|
||||
//! default: "anthropic/claude-opus-4-6"
|
||||
//! default: "anthropic/claude-opus-4-7"
|
||||
//! provider: "openrouter"
|
||||
//! base_url: "https://openrouter.ai/api/v1"
|
||||
//!
|
||||
@@ -214,7 +214,7 @@ fn find_yaml_section_range(raw: &str, section_key: &str) -> Option<(usize, usize
|
||||
///
|
||||
/// ```yaml
|
||||
/// model:
|
||||
/// default: "anthropic/claude-opus-4-6"
|
||||
/// default: "anthropic/claude-opus-4-7"
|
||||
/// provider: "openrouter"
|
||||
/// ```
|
||||
fn serialize_yaml_section(key: &str, value: &serde_yaml::Value) -> Result<String, AppError> {
|
||||
@@ -902,7 +902,7 @@ agent:
|
||||
let mut m = serde_yaml::Mapping::new();
|
||||
m.insert(
|
||||
serde_yaml::Value::String("default".to_string()),
|
||||
serde_yaml::Value::String("claude-opus-4-6".to_string()),
|
||||
serde_yaml::Value::String("claude-opus-4-7".to_string()),
|
||||
);
|
||||
m.insert(
|
||||
serde_yaml::Value::String("provider".to_string()),
|
||||
@@ -916,7 +916,7 @@ agent:
|
||||
assert!(result.contains("agent:"));
|
||||
assert!(result.contains("max_turns"));
|
||||
// And the model section should be updated
|
||||
assert!(result.contains("claude-opus-4-6"));
|
||||
assert!(result.contains("claude-opus-4-7"));
|
||||
assert!(result.contains("anthropic"));
|
||||
assert!(!result.contains("gpt-4"));
|
||||
assert!(!result.contains("openai"));
|
||||
@@ -1115,7 +1115,7 @@ model:
|
||||
assert!(get_model_config().unwrap().is_none());
|
||||
|
||||
let model = HermesModelConfig {
|
||||
default: Some("anthropic/claude-opus-4-6".to_string()),
|
||||
default: Some("anthropic/claude-opus-4-7".to_string()),
|
||||
provider: Some("openrouter".to_string()),
|
||||
base_url: Some("https://openrouter.ai/api/v1".to_string()),
|
||||
context_length: Some(200000),
|
||||
@@ -1127,7 +1127,7 @@ model:
|
||||
let read_model = get_model_config().unwrap().unwrap();
|
||||
assert_eq!(
|
||||
read_model.default.as_deref(),
|
||||
Some("anthropic/claude-opus-4-6")
|
||||
Some("anthropic/claude-opus-4-7")
|
||||
);
|
||||
assert_eq!(read_model.provider.as_deref(), Some("openrouter"));
|
||||
assert_eq!(read_model.context_length, Some(200000));
|
||||
|
||||
Reference in New Issue
Block a user