Label model dimension objects with their catalog name

What does this MR do and why?

The Spend tab's model charts group by the model dimension, which glql!539 (merged) changes from the raw modelUsed string to the catalog metadata object that !256020 (merged) added (name, provider, hosting, isDefault). Chart labels come from a per-typename registry, and objects without an entry render blank by design. This registers DuoWorkflowsModelMetadata, labeling bars with the model's catalog name: Claude Sonnet 4.6 instead of us.anthropic.claude-sonnet-4-6-v1:0.

It also fixes a latent stacked-chart bug this surfaced: buildStackedByDimension wrote cells by assignment, so two rows sharing a primary identity (two hostings of one model resolving to the same name, or two users with the same display name) kept only the last row's value. Cells accumulate now, so same-named rows merge with correct sums.

A model without a name (a flow with no attribution) falls through to the existing empty-value path and renders as Unknown. Both changes are no-ops until the glql release with !539 (merged) ships, so this can merge ahead of that bump; merging it first is what keeps labels from going blank when the bump lands.

References

Screenshots or screen recordings

Before (master) After (this MR + a locally built glql!539 (merged))
fmt_before fmt_after2

Same seed data in both. Note the merges the fix makes correct: claude-sonnet-4-6 and its Vertex twin sum into one 1.4M bar, and Haiku's three id spellings sum into 445.2k, both matching the API totals.

How to set up and validate locally

  1. Check out this branch together with glql!539 (merged) built locally (wasm-pack build --target web && yarn build in the glql repo, copy npm/dist/main.js over node_modules/@gitlab/query-language-rust/npm/dist/main.js, restart vite).
  2. Enable dap_impact_v1 and seed duo_workflows_workflows_enriched rows with model_used values (catalog refs, provider-resolved ids, a self-hosted identifier, empty strings).
  3. Open the DAP Impact Spend view. Model bars read catalog names with same-named rows summed, self-hosted deployments read their configured name, unknown values stay raw, and empty attribution reads Unknown.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist.

Edited by Abhinaba Ghosh

Merge request reports

Loading
Loading