Skip to content

fix(monitoring): the ai spend dashboard shows local savings for every range in retention, priced at the reference model that devops ai cost uses #2194

Closed

Description

@dan-petty

What happened

The Grafana dashboard "AI Spend and LLM Usage Telemetry" (k8s/monitoring/dashboards/ai-spend.json, uid ai-spend-telemetry) shows $0 local savings for 2026-10-01 to 2026-10-21, while Prometheus holds the tokens and devops ai cost prices them. Read on 2026-10-24:

What should happen

The savings panels show the local savings of any range in Prometheus' retention, priced at one reference model that the CLI report also uses:

  • The reference model is the owner's choice, gpt-4o: the repository default DEFAULT_AI_REFERENCE_MODEL, the price that the dashboard multiplies by, and devops ai cost agree, and the existing test that checks prices against genai-prices checks all of them.
  • A range that ends before the price series existed is priced too (for example, the price is a constant in the panel query that the same test checks, instead of a join on a recording rule that exists only from its first evaluation). Record the choice in the design.
  • Series from before fix(ai): local savings use one reference price per request kind for every process, and an unknown model or reference warns instead of pricing at $0 #1672 (no local, no operation label) are counted: operation absent means chat, and a series of provider gateway without local is local, because the gateway config serves only local Ollama tiers (check k8s/llm/gateway/config.yaml and say so in the design). This mapping can go when those series leave the retention window; the design says when.

Acceptance criteria

  • A test over the dashboard JSON and the rule file fails when the dashboard's price differs from genai-prices at DEFAULT_AI_REFERENCE_MODEL, or when DEFAULT_AI_REFERENCE_MODEL is not gpt-4o.
  • A test (promtool, as the other rule tests do, or a query test on recorded series) shows that the "Local Cloud Savings in Range" panel gives the priced total for series with and without the local and operation labels, and for a range that ends before the price rule's first sample.
  • After the merge, the panel over 2026-10-01 to 2026-10-21 shows about $423 (a person checks it in Grafana).

Source: #1672

Activity

  1. added
    source/agent
    type/bug
    on Oct 24, 2026
  2. dan-petty commented on Oct 24, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.

    • Type: type/bug. The candidate describes a bug in the AI spend dashboard where incorrect pricing leads to wrong savings values.
    • Priority: P1-High. The dashboard shows incorrect financial data affecting decision making.
    • Value: High. Correct financial reporting is essential for resource planning and cost control.
    • Effort: Medium. Fixing the dashboard requires understanding of Prometheus queries, recording rules, and Grafana panel configurations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    source/agenttype/bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions