mirror of
https://github.com/block/buzz.git
synced 2026-10-31 22:41:12 +00:00
Add preferred runtime onboarding (#2040)
Signed-off-by: Wes <wesbillman@users.noreply.github.com> Co-authored-by: Pinky <44b8e82baa6e0e254e0208d68f335c283c94e7b78dd1fa10d5a49d3f13dd0435@sprout-oss.stage.blox.sqprod.co>
This commit is contained in:
@@ -63,6 +63,10 @@ pub struct GlobalAgentConfig {
|
||||
/// a model. `None` = no global default.
|
||||
#[serde(default)]
|
||||
pub model: Option<String>,
|
||||
|
||||
/// Preferred ACP runtime for definitions without an explicit runtime.
|
||||
#[serde(default)]
|
||||
pub preferred_runtime: Option<String>,
|
||||
}
|
||||
|
||||
/// Validate a `GlobalAgentConfig` before persisting it.
|
||||
|
||||
@@ -266,6 +266,7 @@ fn roundtrip_serialization() {
|
||||
env_vars: BTreeMap::from([("ANTHROPIC_API_KEY".to_string(), "sk-test".to_string())]),
|
||||
provider: Some("anthropic".to_string()),
|
||||
model: Some("claude-opus-4".to_string()),
|
||||
preferred_runtime: Some("claude".to_string()),
|
||||
};
|
||||
let json = serde_json::to_string(&config).expect("serialize");
|
||||
let back: GlobalAgentConfig = serde_json::from_str(&json).expect("deserialize");
|
||||
@@ -582,6 +583,7 @@ fn populated_global_config_round_trips() {
|
||||
.collect(),
|
||||
provider: Some("anthropic".to_string()),
|
||||
model: Some("claude-opus-4-5".to_string()),
|
||||
preferred_runtime: None,
|
||||
};
|
||||
let json = serde_json::to_string(&original).expect("serialization must not fail");
|
||||
let decoded: GlobalAgentConfig =
|
||||
|
||||
Reference in New Issue
Block a user