Skip to content

fix(monitoring): price local savings at the reference model - #5931

Merged
dan-petty merged 2 commits into
mainfrom
fix/5914-savings-at-reference-price
Nov 16, 2026
Merged

dan-petty merged 2 commits into
mainfrom
fix/5914-savings-at-reference-price

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The savings panels of ai-spend.json priced local tokens at gpt-4o and read devops-cli's local label, which gave hosted DeepSeek tokens local="true" before #5874. For 6 h to 2026-11-16 01:35Z the 30-day savings were $20,143. Now they are $31.99.

  • Savings read the gateway counters litellm_input/output_tokens_metric_total with api_provider ollama_chat or ollama, at 0.035 and 1.50 USD (chat) and 0.01 USD (embeddings) per million tokens.
  • A test prices the reference models of configmap.example.yaml with the registry of the spend reports and compares the dashboard constant.
  • Hourly savings bars. The bars by backend take the service name from api_base. Embedding deployments have no api_base, so their model names them.
  • Projections take savings from the last 7 days. Spend legend: {{api_provider}}: {{model}}.

The savings queries of #5784 and #2202 are gone.

Closes #5914

Change: openspec/changes/archive/2026-11-16-5914-savings-at-reference-price/

The savings panels of ai-spend.json read the gateway token counters of the in-cluster Ollama deployments and price them at the reference prices of the Service ConfigMap template. The bars by backend name each Kubernetes service, and the spend panel names the provider first.
@dan-petty

Copy link
Copy Markdown
Owner Author

Vet: SAFE. Every savings panel reads the gateway token counters of the local groups only (api_provider ollama_chat = chat, ollama = embeddings), so the old client points that #5867 mislabelled no longer count. The price constant is the reference price of #4241 (0.035 / 1.50 / 0.01 USD per million), and a test fails when it differs from the prices that the template gives the spend reports. The backend panel names each in-cluster service from api_base through a model_id join (the embedding deployments, which have no api_base, share one bar; #5932). The spend panel names the provider first. Live: the 30-day savings projection drops from $13,541 to $32.87, and the 7-day hourly and backend bars add up to $7.62 against $7.66 in range.

@dan-petty
dan-petty merged commit fc58f9f into main Nov 16, 2026
25 checks passed
@dan-petty
dan-petty deleted the fix/5914-savings-at-reference-price branch November 16, 2026 06:01
dan-petty-release Bot added a commit that referenced this pull request Nov 16, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.161.0](v0.160.1...v0.161.0)
(2026-11-16)


### Features

* **roadmap:** a fix-conflict step settles merge conflicts
([#5930](#5930))
([cddb8f3](cddb8f3)),
closes [#5019](#5019)
* **roadmap:** allow bounded path additions in implement plan-request
([#5937](#5937))
([bcb0c5b](bcb0c5b))
* **roadmap:** surface scoped tests in plan reads
([#5938](#5938))
([1a3d2b8](1a3d2b8))


### Bug Fixes

* **k8s:** alternatives returns to DeepSeek
([#5934](#5934))
([dc5e3b6](dc5e3b6))
* **monitoring:** price local savings at the reference model
([#5931](#5931))
([fc58f9f](fc58f9f))
* **roadmap:** implement runs commit hooks on docs and archive
([#5928](#5928))
([6cf45d6](6cf45d6))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/monitoring Grafana, Prometheus, Loki, alerts and dashboards type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(monitoring): price local savings at the reference model

1 participant