feat(usagereport): utilization-aware status message framing (closes #41)#68
Merged
Conversation
Defilan
force-pushed
the
feat/break-even-calculator
branch
from
June 4, 2026 06:54
08855c0 to
9f654b0
Compare
Defilan
force-pushed
the
feat/utilization-aware-status
branch
from
June 4, 2026 07:01
0eee282 to
a99f842
Compare
Rewrites the UsageReport Ready-condition message (and adds a matching section to `infercost status`) so the headline number is never shown without context. A flat "Period: $0.0660 across 3,993 tokens" reads as "$16/MTok, worse than every cloud"; the new framing surfaces the amortized rate WITH utilization, the marginal rate, and the break-even comparison: Period 2026-04-23: $0.0660 across 3,993 tokens. Amortized: $16.52/MTok at 4% utilization. Marginal: $0.0040/MTok. Break-even with Anthropic/claude-opus-4-6: 142K tokens/day (you served 6K). - internal/report.StatusMessage is a pure, table-tested formatter shared by the controller and CLI so their framing stays identical. Marginal line is omitted when 0 (no energy sampled); break-even line omitted when no targets. - Builds on the break-even work (#39); the break-even line uses status.breakEvenAnalysis. Closes #41 Signed-off-by: Christopher Maher <chris@mahercode.io>
Defilan
force-pushed
the
feat/utilization-aware-status
branch
from
June 4, 2026 07:06
a99f842 to
c3974e8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Rewrites the
UsageReportReady-condition message (and adds a matching section toinfercost status) so the headline cost is never shown without utilization context.Why
Fixes #41
Period 2026-04-23: $0.0660 across 3,993 tokensis correct but misleading — readers divide and conclude "$16/MTok, worse than every cloud." The launch runbook says InferCost's differentiator is honest framing, including when cloud is cheaper; the bare string doesn't live up to that. The new framing puts the amortized number next to the utilization that explains it, plus the marginal rate and the break-even comparison:How
internal/report.StatusMessage(UsageReportStatus)— a pure, table-tested formatter, shared by the controller and CLI so their framing is identical. Marginal line is omitted when 0 (no energy sampled → "$0.0000" would be misleading); break-even line omitted when there are no targets.applyStatusIfChangedsets the Ready message via the formatter.infercost statusgains a "USAGE REPORTS" section printing the same framing per report.Note on stacking
Builds on #39 / PR #67 (the break-even line reads
status.breakEvenAnalysis). This PR is based onfeat/break-even-calculator; merge #67 first (GitHub will retarget this tomain).Checklist
applyStatusIfChangedinfercost statusoutput matchesmake test+make lintpass locally