Estimated cost on the dashboard could render empty because team/workflow analytics priced rows using the legacy task.modelProvider/modelId columns, which can be NULL even when a durable tokenUsageModelProvider/tokenUsageModelId snapshot exists on the row.
- Select tokenUsageModelProvider/tokenUsageModelId alongside the legacy model columns in the team-analytics and workflow-analytics task token queries
- Price each row using the token-usage model snapshot first, falling back to the legacy model columns, so cost survives model-resolution drift and empty legacy columns
- Add regression coverage in team-analytics, workflow-analytics, and model-pricing tests, plus a dashboard TaskDetailModal summary-tab test asserting estimated cost renders
- Add a patch changeset documenting the fix for @runfusion/fusion
Files changed:
.changeset/fn-7786-estimated-cost.md | 7 +++++
packages/core/src/__tests__/model-pricing.test.ts | 10 +++++++
packages/core/src/__tests__/team-analytics.test.ts | 34 ++++++++++++++++++++--
.../core/src/__tests__/workflow-analytics.test.ts | 33 +++++++++++++++++++--
packages/core/src/team-analytics.ts | 15 ++++++++--
packages/core/src/workflow-analytics.ts | 15 ++++++++--
.../__tests__/TaskDetailModal.summary-tab.test.tsx | 34 ++++++++++++++++++++++
7 files changed, 140 insertions(+), 8 deletions(-)
Fusion-Task-Id: FN-7786
Fusion-Task-Lineage: dab32809-4bb8-42c0-aed0-a0c1131ec641
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>