fix(channel): align runtime defaults with current model id and test context

This commit is contained in:
Chummy 2026-02-20 11:01:51 +08:00
parent 740eb17d76
commit 5c1d6fcba6

View file

@ -356,7 +356,7 @@ fn resolved_default_model(config: &Config) -> String {
config config
.default_model .default_model
.clone() .clone()
.unwrap_or_else(|| "anthropic/claude-sonnet-4-20250514".to_string()) .unwrap_or_else(|| "anthropic/claude-sonnet-4.6".to_string())
} }
fn runtime_defaults_from_config(config: &Config) -> ChannelRuntimeDefaults { fn runtime_defaults_from_config(config: &Config) -> ChannelRuntimeDefaults {
@ -3405,6 +3405,7 @@ mod tests {
provider_runtime_options: providers::ProviderRuntimeOptions::default(), provider_runtime_options: providers::ProviderRuntimeOptions::default(),
workspace_dir: Arc::new(std::env::temp_dir()), workspace_dir: Arc::new(std::env::temp_dir()),
message_timeout_secs: CHANNEL_MESSAGE_TIMEOUT_SECS, message_timeout_secs: CHANNEL_MESSAGE_TIMEOUT_SECS,
interrupt_on_new_message: false,
multimodal: crate::config::MultimodalConfig::default(), multimodal: crate::config::MultimodalConfig::default(),
}); });
@ -3419,6 +3420,7 @@ mod tests {
timestamp: 3, timestamp: 3,
thread_ts: None, thread_ts: None,
}, },
CancellationToken::new(),
) )
.await; .await;
@ -3487,6 +3489,7 @@ mod tests {
}, },
workspace_dir: Arc::new(std::env::temp_dir()), workspace_dir: Arc::new(std::env::temp_dir()),
message_timeout_secs: CHANNEL_MESSAGE_TIMEOUT_SECS, message_timeout_secs: CHANNEL_MESSAGE_TIMEOUT_SECS,
interrupt_on_new_message: false,
multimodal: crate::config::MultimodalConfig::default(), multimodal: crate::config::MultimodalConfig::default(),
}); });
@ -3501,6 +3504,7 @@ mod tests {
timestamp: 4, timestamp: 4,
thread_ts: None, thread_ts: None,
}, },
CancellationToken::new(),
) )
.await; .await;