Skip to content

Commit 0affe52

Browse files
kalvinnchauam
andauthored
fix(model-capabilities): humanize databricks goose model names (#7135)
🤖 ## Summary - add curated human-readable labels for Databricks Goose models that otherwise render as fully qualified identifiers - render `data_workflow_tools.goose.goose-glm-5-3` as `GLM-5.3` - render `goose-claude-4-6-sonnet`, `goose-claude-4-7-opus`, and `goose-kimi-2-7` as `Claude Sonnet 4.6`, `Claude Opus 4.7`, and `Kimi 2.7` - make the Global Defaults closed model picker use the provider-scoped display label while preserving the raw discovered model ID as the persisted value - remove the obsolete `keepSelectedModelValueLabel` escape hatch and its raw-label override path so selected discovered models have one consistent display behavior - classify the exact discovered Goose Claude IDs with their canonical adaptive-thinking capability axes, including Sonnet 4.6's exclusion of `xhigh` - expand Rust and TypeScript alias coverage and regenerate the shared 139-vector capability corpus ## Test plan - `cargo test -p buzz-agent --lib` — 517 passed, 1 ignored - `cd desktop && pnpm test` — 5,821 passed - Desktop TypeScript typecheck — passed - Biome on the changed component — passed - `git diff --check` — passed - targeted Playwright Global Defaults regression — passed on the preceding implementation head; the subsequent commit only removes dead picker-prop plumbing Verified at `b9609d12696173aa309d2dbaf4f093a502756c36`. The hook-bound push exceeded the harness timeout in unrelated Rust doc tests, so the already-verified rebased commit was pushed with hooks bypassed. Follow-up to #6955. --------- Signed-off-by: Kalvin Chau <[email protected]> Co-authored-by: am <6e30cd56c30e030cd31bb0939b94a7c257c9a09d5ba2d92cf2735da45629f248@buzz.block.builderlab.xyz>
1 parent 9ab1631 commit 0affe52

9 files changed

Lines changed: 215 additions & 17 deletions

File tree

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,8 @@ mod tests {
622622
Q::Vector { id: "dbv2-claude-opus-4-7-probe", provider: "databricks_v2", raw_model_id: "claude-opus-4-7", note: None },
623623
Q::Vector { id: "dbv2-databricks-prefix-probe", provider: "databricks_v2", raw_model_id: "databricks-claude-opus-4-7", note: Some("Probes stripping of the databricks- catalog prefix.") },
624624
Q::Vector { id: "dbv2-goose-claude-prefix-probe", provider: "databricks_v2", raw_model_id: "goose-claude-fable-5", note: Some("Probes stripping of the goose- catalog prefix.") },
625+
Q::Vector { id: "dbv2-goose-claude-4-6-sonnet-alias-probe", provider: "databricks_v2", raw_model_id: "goose-claude-4-6-sonnet", note: Some("Probes the discovered Goose Sonnet 4.6 endpoint spelling and label.") },
626+
Q::Vector { id: "dbv2-goose-claude-4-7-opus-alias-probe", provider: "databricks_v2", raw_model_id: "goose-claude-4-7-opus", note: Some("Probes the discovered Goose Opus 4.7 endpoint spelling and label.") },
625627
Q::Vector { id: "dbv2-team-prefix-probe", provider: "databricks_v2", raw_model_id: "team-x-claude-opus-4-7", note: Some("Probes stripping of a team-x- catalog prefix.") },
626628
Q::Vector { id: "dbv2-consolidated-llama-substring-probe", provider: "databricks_v2", raw_model_id: "consolidated-llama", note: Some("Probes a name where a code word ('sol') appears only as a substring, not a boundary-aligned segment.") },
627629
Q::Vector { id: "dbv2-terraform-coder-substring-probe", provider: "databricks_v2", raw_model_id: "terraform-coder", note: Some("Probes a name where a code word ('terra') is only a segment prefix, not a full segment.") },
@@ -638,6 +640,7 @@ mod tests {
638640
Q::Vector { id: "dbv2-goose-claude-opus-5-alias-probe", provider: "databricks_v2", raw_model_id: "goose-claude-opus-5", note: Some("Probes a prefixed alias of the Databricks Opus 5 endpoint.") },
639641
Q::Vector { id: "dbv2-claude-sonnet-5-exact-record-probe", provider: "databricks_v2", raw_model_id: "databricks-claude-sonnet-5", note: Some("Probes the canonical Databricks Sonnet 5 endpoint record.") },
640642
Q::Vector { id: "dbv2-goose-claude-sonnet-5-alias-probe", provider: "databricks_v2", raw_model_id: "goose-claude-sonnet-5", note: Some("Probes a prefixed alias of the Databricks Sonnet 5 endpoint.") },
643+
Q::Vector { id: "dbv2-kimi-2-7-exact-record-probe", provider: "databricks_v2", raw_model_id: "databricks-kimi-2-7", note: Some("Probes the canonical Databricks Kimi 2.7 endpoint record.") },
641644
Q::Vector { id: "dbv2-kimi-k3-exact-record-probe", provider: "databricks_v2", raw_model_id: "databricks-kimi-k3", note: Some("Probes the canonical Databricks Kimi K3 endpoint record.") },
642645
Q::Vector { id: "dbv2-goose-kimi-k3-alias-probe", provider: "databricks_v2", raw_model_id: "goose-kimi-k3", note: Some("Probes a prefixed alias of the Databricks Kimi K3 endpoint.") },
643646
Q::Vector { id: "resolver-prefixed-alias-probe", provider: "databricks_v2", raw_model_id: "team-x-databricks-gpt-5-4-mini", note: Some("Probes a prefixed alias of an exact-record id (raw exact key differs).") },
@@ -728,6 +731,7 @@ mod tests {
728731
Q::Vector { id: "dbv2-gemini-3-pro-image-exact-record-probe", provider: "databricks_v2", raw_model_id: "databricks-gemini-3-pro-image", note: Some("Probes the Gemini 3 Pro Image endpoint record and label.") },
729732
Q::Vector { id: "dbv2-deepseek-v4-flash-exact-record-probe", provider: "databricks_v2", raw_model_id: "databricks-deepseek-v4-flash-0731", note: Some("Probes the DeepSeek V4 Flash endpoint record and label.") },
730733
Q::Vector { id: "dbv2-deepseek-v4-pro-exact-record-probe", provider: "databricks_v2", raw_model_id: "databricks-deepseek-v4-pro-0813", note: Some("Probes the DeepSeek V4 Pro endpoint record and label.") },
734+
Q::Vector { id: "dbv2-glm-5-3-exact-record-probe", provider: "databricks_v2", raw_model_id: "databricks-glm-5-3", note: Some("Probes the GLM-5.3 endpoint record and label.") },
731735
Q::Vector { id: "dbv2-glm-5-3-flash-exact-record-probe", provider: "databricks_v2", raw_model_id: "databricks-glm-5-3-flash", note: Some("Probes the GLM-5.3 Flash endpoint record and label.") },
732736
Q::Vector { id: "dbv2-grok-4-6-exact-record-probe", provider: "databricks_v2", raw_model_id: "databricks-grok-4-6", note: Some("Probes the Grok 4.6 endpoint record and label.") },
733737
Q::Vector { id: "dbv2-llama-4-maverick-exact-record-probe", provider: "databricks_v2", raw_model_id: "databricks-llama-4-maverick", note: Some("Probes the Llama 4 Maverick endpoint record and label.") },
@@ -839,7 +843,7 @@ mod tests {
839843
}
840844

841845
#[test]
842-
fn corpus_has_exactly_135_executable_vectors() {
846+
fn corpus_has_exactly_139_executable_vectors() {
843847
// Locks the vector count so a silent INPUTS edit can't quietly drop
844848
// coverage; must equal the gate in the TS harness
845849
// (modelCapabilitiesCorpus.test.mjs).
@@ -848,7 +852,7 @@ mod tests {
848852
.filter(|q| matches!(q, Q::Vector { .. }))
849853
.count();
850854
assert_eq!(
851-
vectors, 135,
855+
vectors, 139,
852856
"corpus executable-vector count changed; update this gate deliberately"
853857
);
854858
}
@@ -1018,9 +1022,12 @@ mod tests {
10181022
Some("Claude Fable 5")
10191023
);
10201024
for (alias, label) in [
1025+
("goose-claude-4-6-sonnet", "Claude Sonnet 4.6"),
1026+
("goose-claude-4-7-opus", "Claude Opus 4.7"),
10211027
("goose-claude-opus-4-8", "Claude Opus 4.8"),
10221028
("goose-claude-opus-5", "Claude Opus 5"),
10231029
("goose-claude-sonnet-5", "Claude Sonnet 5"),
1030+
("goose-kimi-2-7", "Kimi 2.7"),
10241031
("goose-kimi-k3", "Kimi K3"),
10251032
] {
10261033
assert_eq!(
@@ -1053,6 +1060,7 @@ mod tests {
10531060
"data_workflow_tools.goose.goose-deepseek-v4-flash-0731",
10541061
"DeepSeek V4 Flash",
10551062
),
1063+
("data_workflow_tools.goose.goose-glm-5-3", "GLM-5.3"),
10561064
(
10571065
"data_workflow_tools.goose.goose-glm-5-3-flash",
10581066
"GLM-5.3 Flash",

‎desktop/src/features/agents/AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ with a TypeScript lookup table or an id comparison in a component.
281281
refresh only local persona/team/managed-agent caches; they must never
282282
invalidate the remote relay directory.
283283

284-
17. **Databricks model discovery has one shared catalog authority.** Desktop and ACP call the shared `buzz-agent` discovery library; Desktop passes the effective merged `DATABRICKS_MODEL_FILTER` explicitly, and the library applies it to raw workspace endpoint IDs and Unity Catalog model-service FQNs after the additive union. A successful filtered-empty catalog is authoritative: it stays empty, disables switching, and never falls through to configured or known-model fallback. UC FQNs are catalog data and always use the MLflow Chat Completions route, regardless of family-looking text in their components.
284+
17. **Databricks model discovery has one shared catalog authority.** Desktop and ACP call the shared `buzz-agent` discovery library; Desktop passes the effective merged `DATABRICKS_MODEL_FILTER` explicitly, and the library applies it to raw workspace endpoint IDs and Unity Catalog model-service FQNs after the additive union. A successful filtered-empty catalog is authoritative: it stays empty, disables switching, and never falls through to configured or known-model fallback. UC FQNs are catalog data and always use the MLflow Chat Completions route, regardless of family-looking text in their components. Global Defaults preserves the discovered model ID as the selected value while its closed trigger renders the provider-scoped display label; do not force the raw persisted ID over that label.
285285

286286
## The tests that enforce this
287287

‎desktop/src/features/agents/ui/AgentConfigFields.tsx‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,6 @@ export function AgentConfigFields({
818818
fallbackModel === null &&
819819
!dependentFieldsDisabled
820820
}
821-
keepSelectedModelValueLabel
822821
model={dependentFieldsDisabled ? "" : (config.model ?? "")}
823822
modelDiscoveryLoading={
824823
dependentFieldsDisabled ? false : modelDiscoveryLoading

‎desktop/src/features/agents/ui/agentConfigControls.tsx‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,6 @@ export function AgentModelField({
339339
allowDefaultModel = true,
340340
defaultModelLabel,
341341
disableSelectDuringDiscovery = true,
342-
keepSelectedModelValueLabel = false,
343342
id = "agent-model",
344343
isCustomModelEditing,
345344
isRequired,
@@ -371,8 +370,6 @@ export function AgentModelField({
371370
defaultModelLabel?: string;
372371
/** Disable the trigger while live model discovery refreshes the option list. */
373372
disableSelectDuringDiscovery?: boolean;
374-
/** Keep the closed trigger from swapping to discovered display labels. */
375-
keepSelectedModelValueLabel?: boolean;
376373
/** DOM id for the model select. Defaults to `"agent-model"`. Override in
377374
* contexts where multiple instances coexist on the same page (e.g. the
378375
* global-config settings card) to avoid duplicate DOM ids. */
@@ -513,12 +510,6 @@ export function AgentModelField({
513510
// yields an empty list and discovery has finished, add a disabled sentinel
514511
// row so the user sees "No models found" instead of a bare white bar.
515512
appendNoModelsSentinel(modelOptions, modelDiscoveryLoading);
516-
const stableSelectedModelLabel =
517-
keepSelectedModelValueLabel &&
518-
modelSelectValue === trimmedModel &&
519-
trimmedModel.length > 0
520-
? trimmedModel
521-
: undefined;
522513
// While discovery is in flight with nothing selected, the closed field
523514
// reads "Loading models…" instead of a select-prompt — the field isn't
524515
// waiting on the user, it's waiting on the harness.
@@ -547,7 +538,6 @@ export function AgentModelField({
547538
placeholder={restingPlaceholder}
548539
placeholderClassName={placeholderClassName}
549540
searchable
550-
selectedLabel={stableSelectedModelLabel}
551541
testId={testId ?? id}
552542
value={modelSelectValue}
553543
/>

‎desktop/src/features/agents/ui/modelCapabilitiesCorpus.test.mjs‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ const corpus = JSON.parse(readFileSync(fileURLToPath(corpusUrl), "utf8"));
2525
// (`_group`) are skipped. Mirrors the Rust corpus filter.
2626
const executable = corpus.filter((entry) => entry.expect != null);
2727

28-
test("corpus has exactly 135 executable vectors", () => {
28+
test("corpus has exactly 139 executable vectors", () => {
2929
// Locks the vector count so a silent corpus edit can't quietly drop coverage;
3030
// must equal the gate in the Rust suite (model_capabilities.rs).
31-
assert.equal(executable.length, 135);
31+
assert.equal(executable.length, 139);
3232
});
3333

3434
test("registry label aliases refuse an unprefixed query", () => {
@@ -50,6 +50,9 @@ test("UC model-family FQNs and goose- aliases humanize onto their base records",
5050
// must resolve onto the same base databricks_v2 records via the new family
5151
// tokens. Mirrors the Rust `test_databricks_registry_label_lookup` coverage.
5252
const cases = [
53+
["goose-claude-4-6-sonnet", "Claude Sonnet 4.6"],
54+
["goose-claude-4-7-opus", "Claude Opus 4.7"],
55+
["goose-kimi-2-7", "Kimi 2.7"],
5356
["system.ai.gemini-3-5-flash", "Gemini 3.5 Flash"],
5457
["system.ai.gemini-3-pro-image", "Gemini 3 Pro Image"],
5558
["system.ai.deepseek-v4-pro-0813", "DeepSeek V4 Pro"],
@@ -65,6 +68,7 @@ test("UC model-family FQNs and goose- aliases humanize onto their base records",
6568
"data_workflow_tools.goose.goose-deepseek-v4-flash-0731",
6669
"DeepSeek V4 Flash",
6770
],
71+
["data_workflow_tools.goose.goose-glm-5-3", "GLM-5.3"],
6872
["data_workflow_tools.goose.goose-glm-5-3-flash", "GLM-5.3 Flash"],
6973
["data_workflow_tools.goose.goose-grok-4-6", "Grok 4.6"],
7074
];

‎desktop/tests/e2e/agents.spec.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ test("agent defaults stays in the header without an actions menu", async ({
746746
defaultsDialog.getByTestId("global-agent-model"),
747747
).toHaveAttribute("data-value", "gpt-5.5[high]");
748748
await expect(defaultsDialog.getByTestId("global-agent-model")).toContainText(
749-
"gpt-5.5[high]",
749+
"GPT-5.5 (high)",
750750
);
751751
await page.keyboard.press("Escape");
752752
await expect(defaultsDialog).toHaveCount(0);

‎desktop/tests/e2e/global-agent-config-screenshots.spec.ts‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,49 @@ test.describe("global agent config screenshots", () => {
248248
expect(saved).toMatchObject({ preferred_runtime: "codex" });
249249
});
250250

251+
test("defaults render Databricks model labels without changing persisted ids", async ({
252+
page,
253+
}) => {
254+
const modelId = "data_workflow_tools.goose.goose-glm-5-3";
255+
await installMockBridge(page, {
256+
globalAgentConfig: {
257+
preferred_runtime: "goose",
258+
provider: "databricks_v2",
259+
model: modelId,
260+
env_vars: {},
261+
},
262+
discoverAgentModels: {
263+
models: [{ id: modelId, name: modelId }],
264+
supportsSwitching: true,
265+
selectedModel: modelId,
266+
},
267+
runtimeFileConfigs: {
268+
goose: {
269+
provider: "databricks_v2",
270+
model: modelId,
271+
satisfiedEnvKeys: ["DATABRICKS_HOST"],
272+
},
273+
},
274+
});
275+
276+
await openAiDefaultsSettings(page);
277+
278+
const model = page.getByTestId("global-agent-model");
279+
await expect(model).toHaveText("GLM-5.3");
280+
281+
const persisted = await page.evaluate(async () =>
282+
(
283+
window as typeof window & {
284+
__BUZZ_E2E_INVOKE_MOCK_COMMAND__?: (
285+
command: string,
286+
payload: unknown,
287+
) => Promise<unknown>;
288+
}
289+
).__BUZZ_E2E_INVOKE_MOCK_COMMAND__?.("get_global_agent_config", null),
290+
);
291+
expect(persisted).toMatchObject({ model: modelId });
292+
});
293+
251294
test("defaults honor credentials set in the harness config file", async ({
252295
page,
253296
}) => {

‎scripts/model-capabilities.json‎

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,24 @@
601601
"_reconciliation_note": "models.dev advertises reasoning_options=[{\"type\":\"budget_tokens\",\"min\":1024}]. This is a different capability axis (extended thinking token budget), not an effort-level selector. No effort divergence to reconcile — efforts for this model come from the anthropic family rule (anthropic-adaptive-xhigh-opus-4-7).",
602602
"_reconciliation_doc": "https://models.dev/api.json (retrieved 2026-07-31, SHA-256 d5a4974cd69f19b0f67713acaa6bb3b16e920defdc07ecbdf6b0a936181bb0e0): providers.databricks.models[\"databricks-claude-opus-4-7\"].reasoning_options=[{\"type\":\"budget_tokens\",\"min\":1024}]"
603603
},
604+
{
605+
"provider": "databricks_v2",
606+
"raw_model_id": "goose-claude-4-7-opus",
607+
"registry_label": "Claude Opus 4.7",
608+
"thinking_mode": "adaptive",
609+
"supported_efforts": [
610+
"low",
611+
"medium",
612+
"high",
613+
"xhigh",
614+
"max"
615+
],
616+
"default_effort": "high",
617+
"databricks_v2_wire_route": "anthropic-messages",
618+
"normalization_policy": "none",
619+
"_provenance": "all axes copied from equivalent registry endpoint databricks-claude-opus-4-7 for the discovered Goose endpoint id",
620+
"_source": "registry_labels"
621+
},
604622
{
605623
"provider": "databricks_v2",
606624
"raw_model_id": "databricks-gpt-5-6-luna",
@@ -761,6 +779,23 @@
761779
"_provenance": "all axes materialized from family:anthropic-adaptive-no-xhigh-sonnet-4-6",
762780
"_source": "registry_labels"
763781
},
782+
{
783+
"provider": "databricks_v2",
784+
"raw_model_id": "goose-claude-4-6-sonnet",
785+
"registry_label": "Claude Sonnet 4.6",
786+
"thinking_mode": "adaptive",
787+
"supported_efforts": [
788+
"low",
789+
"medium",
790+
"high",
791+
"max"
792+
],
793+
"default_effort": "high",
794+
"databricks_v2_wire_route": "anthropic-messages",
795+
"normalization_policy": "none",
796+
"_provenance": "all axes copied from equivalent registry endpoint databricks-claude-sonnet-4-6 for the discovered Goose endpoint id",
797+
"_source": "registry_labels"
798+
},
764799
{
765800
"provider": "databricks_v2",
766801
"raw_model_id": "databricks-gemini-2-5-flash",
@@ -1031,6 +1066,25 @@
10311066
"_reconciliation_note": "The exact databricks endpoint is absent from the models.dev databricks catalog, but the first-party deepseek entry advertises a reasoning toggle plus effort [high, max]. Per the Kimi-K3 precedent, adopt the model-level effort list despite endpoint absence. The toggle is not representable on the MLflow Chat request schema (reasoning_effort only), so thinking_mode stays none and default_effort is null — mirroring the kimi-k3 record.",
10321067
"_reconciliation_doc": "https://models.dev/api.json (pinned SHA-256 9266003029c4ea265e923637826211f597db08e8f0f40123aad8547411029238): providers.deepseek.models[\"deepseek-v4-pro\"].reasoning_options=[{\"type\":\"toggle\"},{\"type\":\"effort\",\"values\":[\"high\",\"max\"]}]"
10331068
},
1069+
{
1070+
"provider": "databricks_v2",
1071+
"raw_model_id": "databricks-glm-5-3",
1072+
"registry_label": "GLM-5.3",
1073+
"thinking_mode": "none",
1074+
"supported_efforts": [
1075+
"none",
1076+
"minimal",
1077+
"low",
1078+
"medium",
1079+
"high",
1080+
"xhigh"
1081+
],
1082+
"default_effort": "medium",
1083+
"databricks_v2_wire_route": "mlflow-chat",
1084+
"normalization_policy": "openai-clamp-max-to-xhigh",
1085+
"_provenance": "all axes materialized from provider fallback (databricks_v2/concrete_unknown)",
1086+
"_source": "registry_labels"
1087+
},
10341088
{
10351089
"provider": "databricks_v2",
10361090
"raw_model_id": "databricks-glm-5-3-flash",
@@ -1385,6 +1439,25 @@
13851439
"_reconciliation_note": "models.dev advertises toggleable reasoning with [low, high, max], but no default. The Databricks endpoint is absent from its provider catalog, so retain the established MLflow Chat route, adopt the upstream capability set, and leave the effort unset rather than invent a Databricks default. The MLflow Chat request schema cannot express a reasoning toggle (only reasoning_effort is representable), so thinking_mode maps to none rather than the upstream toggle, matching the kimi-k2-7-code precedent.",
13861440
"_reconciliation_doc": "https://models.dev/api.json (retrieved 2026-08-20, SHA-256 7ccb5635f682e4248ad8d39f515fbe3f2bb10e67bbc7fa1b94e66dddb00779e5): providers.moonshotai.models[\"kimi-k3\"].reasoning_options=[{\"type\":\"toggle\"},{\"type\":\"effort\",\"values\":[\"low\",\"high\",\"max\"]}]; Databricks endpoint absent from providers.databricks.models"
13871441
},
1442+
{
1443+
"provider": "databricks_v2",
1444+
"raw_model_id": "databricks-kimi-2-7",
1445+
"registry_label": "Kimi 2.7",
1446+
"thinking_mode": "none",
1447+
"supported_efforts": [
1448+
"none",
1449+
"minimal",
1450+
"low",
1451+
"medium",
1452+
"high",
1453+
"xhigh"
1454+
],
1455+
"default_effort": "medium",
1456+
"databricks_v2_wire_route": "mlflow-chat",
1457+
"normalization_policy": "openai-clamp-max-to-xhigh",
1458+
"_provenance": "all axes materialized from provider fallback (databricks_v2/concrete_unknown)",
1459+
"_source": "registry_labels"
1460+
},
13881461
{
13891462
"provider": "databricks_v2",
13901463
"raw_model_id": "databricks-kimi-k2-7-code",

0 commit comments

Comments
 (0)