Skip to content

Commit 0e6aacf

Browse files
npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7wpfleger96
andcommitted
fix(buzz-agent): curate display name in configured_model_fallback
Route the display name through databricks_model_name() so that when Databricks discovery fails the picker shows the curated label (e.g. GPT-5.5) rather than the raw model ID — consistent with every other ModelEntry construction site in catalog.rs. Co-authored-by: Will Pfleger <[email protected]> Signed-off-by: Will Pfleger <[email protected]>
1 parent 77c24ef commit 0e6aacf

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

‎crates/buzz-agent/src/lib.rs‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ fn configured_model_fallback(model: &str) -> Vec<ModelEntry> {
332332
let model = model.trim().to_string();
333333
vec![ModelEntry {
334334
id: model.clone(),
335-
name: model,
335+
name: crate::catalog::databricks_model_name(&model).to_string(),
336336
}]
337337
}
338338

@@ -957,12 +957,21 @@ mod tests {
957957

958958
#[test]
959959
fn configured_model_fallback_is_trimmed_and_singular() {
960+
// Non-registry ID: trim works, raw ID passes through as name
960961
assert_eq!(
961962
crate::configured_model_fallback(" configured-model "),
962963
vec![ModelEntry {
963964
id: "configured-model".into(),
964965
name: "configured-model".into(),
965966
}]
966967
);
968+
// Known registry ID: curated name is used
969+
assert_eq!(
970+
crate::configured_model_fallback("databricks-gpt-5-5"),
971+
vec![ModelEntry {
972+
id: "databricks-gpt-5-5".into(),
973+
name: "GPT-5.5".into(),
974+
}]
975+
);
967976
}
968977
}

0 commit comments

Comments
 (0)