Skip to content

fix(pricing): update Anthropic cost estimates and cache accounting - #581

Merged
zzwong merged 4 commits into
mainfrom
fix/580-claude-cost-estimates
Sep 2, 2026
Merged

fix(pricing): update Anthropic cost estimates and cache accounting#581
zzwong merged 4 commits into
mainfrom
fix/580-claude-cost-estimates

Conversation

@zzwong

@zzwong zzwong commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Correct the API-equivalent cost estimates shown when an adapter reports token usage without a billed cost. The estimator now uses the current Anthropic public rates, distinguishes five-minute and one-hour cache writes, and applies the observed execution speed.

Closes #580.

What changed

  • Replace derived cache multipliers with explicit input, output, cache-read, five-minute write, and one-hour write rates for each supported model.
  • Add current Fable 5.1 and Sonnet 5 pricing, fast Opus pricing, and the dated Haiku 4.5 model ID.
  • Preserve cache-write duration buckets from API responses, CLI result envelopes, and CLI transcripts through task metadata, ledger sessions, review summaries, JSON output, and benchmark metrics.
  • Migrate existing ledgers without removing the aggregate cache-create value.
  • Mark estimated costs and include the dated public-price basis used for the calculation.

Guardrails

Provider-reported cost remains authoritative. An estimate is left unavailable when the model is unknown, a nonzero cache-write total lacks its duration split, the split does not reconcile with the aggregate, or a transcript mixes execution speeds.

For a synthetic Opus usage sample with one million tokens in each billable bucket, the estimator returns $46.75 at standard speed and $93.50 at fast speed. The same sample with an unsplit cache-write total produces no estimate.

Validation

  • make check
  • Focused adapter, pricing, migration, lifecycle reuse, pipeline, benchmark-metrics, and JSON presentation tests
  • Independent adversarial review of the final diff; its mixed-speed underpricing finding was addressed and covered by regression tests

@monit-reviewer monit-reviewer left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated PR Review

Reviewed commit: 549dfc04f771
Profile: public-oss-review - Posting as: monit-reviewer

Summary

Reviewer Findings
go:implementation-tests 0
policies:conventions 0
structure:repo-health 0

Approval Withheld

No blocking or major findings were reported. Approval is withheld because this run did not cover the change:

  • unassigned⚠️ unassigned: changed files were not assigned to a selected reviewer
  • 1 file inspected by no reviewer:
    • BENCHMARKING.md

Re-running the same review reproduces this: a reviewer that declined a file declines it again. Closing the gap means bringing these paths into the remit of a reviewer that will read them, or establishing that they need no review.

Reviewer Coverage

  • go:implementation-tests — complete (broad); inspected 21 assigned files (22 inspected across reviewers): internal/benchmark/metrics.go, internal/benchmark/metrics_test.go, internal/ledger/ledger.go, internal/ledger/ledger_test.go, internal/llm/adapter.go, internal/llmadapters/api.go, internal/llmadapters/api_test.go, internal/llmadapters/claude_transcript.go, internal/llmadapters/claude_transcript_test.go, internal/llmadapters/subprocess.go, internal/llmadapters/subprocess_test.go, internal/llmlifecycle/lifecycle.go, internal/llmlifecycle/lifecycle_test.go, internal/pipeline/pipeline.go, internal/pipeline/pipeline_test.go, internal/pricing/pricing.go, internal/pricing/pricing_test.go, internal/reviewplan/cost_estimate_test.go, internal/reviewplan/summary.go, internal/view/review.go, internal/view/review_test.go; skipped: none; constraints: Inspected the pinned diff and affected Go/test paths with read-only repository tools; did not execute tests.
  • policies:conventions — complete (broad); inspected 6 assigned files (22 inspected across reviewers): docs/llm-task-artifacts.md, internal/ledger/ledger.go, internal/llm/adapter.go, internal/pipeline/pipeline.go, internal/reviewplan/summary.go, internal/view/review.go; skipped: none; constraints: Shared Open CLI Collective standards were not present in the repository context; reviewed against the visible repo-local conventions and changed documentation.
  • structure:repo-health — complete (broad); inspected 6 assigned files (22 inspected across reviewers): internal/benchmark/metrics.go, internal/ledger/ledger.go, internal/llm/adapter.go, internal/llmlifecycle/lifecycle.go, internal/pipeline/pipeline.go, internal/reviewplan/summary.go; skipped: none; constraints: Reviewed assigned changed files and relevant adapter, pricing, lifecycle, migration, documentation, and test context through read-only repository tools; tests were not executed.
  • unassigned⚠️ unassigned; skipped: BENCHMARKING.md; changed files were not assigned to a selected reviewer
Inspected files (22)
  • docs/llm-task-artifacts.md
  • internal/benchmark/metrics.go
  • internal/benchmark/metrics_test.go
  • internal/ledger/ledger.go
  • internal/ledger/ledger_test.go
  • internal/llm/adapter.go
  • internal/llmadapters/api.go
  • internal/llmadapters/api_test.go
  • internal/llmadapters/claude_transcript.go
  • internal/llmadapters/claude_transcript_test.go
  • internal/llmadapters/subprocess.go
  • internal/llmadapters/subprocess_test.go
  • internal/llmlifecycle/lifecycle.go
  • internal/llmlifecycle/lifecycle_test.go
  • internal/pipeline/pipeline.go
  • internal/pipeline/pipeline_test.go
  • internal/pricing/pricing.go
  • internal/pricing/pricing_test.go
  • internal/reviewplan/cost_estimate_test.go
  • internal/reviewplan/summary.go
  • internal/view/review.go
  • internal/view/review_test.go

0 PR discussion threads considered. 0 summarized; 0 resolved.


Completed in 2m 38s | $0.13 | openai-codex/gpt-5.6-terra | cr 0.10.295
Field Value
Model openai-codex/gpt-5.6-terra
Reviewers go:implementation-tests, policies:conventions, structure:repo-health
Engine pi_rpc · openai-codex/gpt-5.6-terra
Reviewed by cr · monit-reviewer
Duration 2m 38s wall · 5m 50s compute
Cost $0.13
Tokens 35.1k in / 2.1k out

Per-workstream usage

  • orchestrator-selection — openai-codex/gpt-5.6-terra
    • In: 6.8k
    • Out: 507
    • Cache read: 0
    • Cache create: 0
    • Cost: $0.02
    • Duration: 12s
  • go:implementation-tests — openai-codex/gpt-5.6-terra
    • In: 1.7k
    • Out: 630
    • Cache read: 134.7k
    • Cache create: 0
    • Cost: $0.04
    • Duration: 2m 13s
  • policies:conventions — openai-codex/gpt-5.6-terra
    • In: 20.4k
    • Out: 296
    • Cache read: 0
    • Cache create: 0
    • Cost: $0.04
    • Duration: 1m 35s
  • structure:repo-health — openai-codex/gpt-5.6-terra
    • In: 1.5k
    • Out: 629
    • Cache read: 48.6k
    • Cache create: 0
    • Cost: $0.02
    • Duration: 1m 46s
  • orchestrator-rollup — openai-codex/gpt-5.6-terra
    • In: 4.7k
    • Out: 56
    • Cache read: 0
    • Cache create: 0
    • Cost: $0.01
    • Duration: 3s

@monit-reviewer monit-reviewer left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated PR Review

Reviewed commit: 549dfc04f771
Profile: public-oss-review - Posting as: monit-reviewer

Summary

Reviewer Findings
go:implementation-tests 0
structure:repo-health 1
policies:conventions 0
documentation:docs 0
structure:repo-health (1 finding)

Major - internal/ledger/ledger.go:25

The durable sessions contract now preserves cache TTL buckets but still drops Usage.Speed. LoadStructured rebuilds run-backed cached tasks via SessionDraftFromLedger, so a newly executed fast Opus task is rehydrated with an empty speed; EstimateUsageUSD treats that as standard and can emit a materially underpriced estimate. Persist speed in ledger.Session and the sessions schema/migration, map it in ToLedger and SessionDraftFromLedger, and add a run-backed reuse regression test. Legacy rows without recorded speed should remain unavailable rather than being inferred as standard if the observed-speed guardrail is to hold.

Reviewer Coverage

  • go:implementation-tests — complete (broad); inspected 21 assigned files (23 inspected across reviewers): internal/benchmark/metrics.go, internal/benchmark/metrics_test.go, internal/ledger/ledger.go, internal/ledger/ledger_test.go, internal/llm/adapter.go, internal/llmadapters/api.go, internal/llmadapters/api_test.go, internal/llmadapters/claude_transcript.go, internal/llmadapters/claude_transcript_test.go, internal/llmadapters/subprocess.go, internal/llmadapters/subprocess_test.go, internal/llmlifecycle/lifecycle.go, internal/llmlifecycle/lifecycle_test.go, internal/pipeline/pipeline.go, internal/pipeline/pipeline_test.go, internal/pricing/pricing.go, internal/pricing/pricing_test.go, internal/reviewplan/cost_estimate_test.go, internal/reviewplan/summary.go, internal/view/review.go, internal/view/review_test.go; skipped: none; constraints: Inspected the pinned diff and resulting code; tools are read-only, so I did not execute tests.
  • structure:repo-health — complete (broad); inspected 12 assigned files (23 inspected across reviewers): internal/ledger/ledger.go, internal/ledger/ledger_test.go, internal/llm/adapter.go, internal/llmadapters/api.go, internal/llmadapters/claude_transcript.go, internal/llmadapters/subprocess.go, internal/llmlifecycle/lifecycle.go, internal/llmlifecycle/lifecycle_test.go, internal/pipeline/pipeline.go, internal/pipeline/pipeline_test.go, internal/reviewplan/cost_estimate_test.go, internal/reviewplan/summary.go; skipped: none; constraints: Read-only review; I inspected the pinned diff and assigned source/tests but did not execute tests.
  • policies:conventions — complete (broad); inspected 6 assigned files (23 inspected across reviewers): internal/ledger/ledger.go, internal/ledger/ledger_test.go, internal/reviewplan/cost_estimate_test.go, internal/reviewplan/summary.go, internal/view/review.go, internal/view/review_test.go; skipped: none; constraints: Scope limited to the six assigned changed files, with related artifact documentation inspected from the pinned diff. Shared Open CLI Collective standards were not available in the repository context; review used the provided and repo-local convention guidance.
  • documentation:docs — complete (broad); inspected 2 assigned files (23 inspected across reviewers): BENCHMARKING.md, docs/llm-task-artifacts.md; skipped: none; constraints: Reviewed only the two assigned documentation files and their directly relevant in-repository pricing, lifecycle, presentation, and test context; external Anthropic pricing was not independently verified.
Inspected files (23)
  • BENCHMARKING.md
  • docs/llm-task-artifacts.md
  • internal/benchmark/metrics.go
  • internal/benchmark/metrics_test.go
  • internal/ledger/ledger.go
  • internal/ledger/ledger_test.go
  • internal/llm/adapter.go
  • internal/llmadapters/api.go
  • internal/llmadapters/api_test.go
  • internal/llmadapters/claude_transcript.go
  • internal/llmadapters/claude_transcript_test.go
  • internal/llmadapters/subprocess.go
  • internal/llmadapters/subprocess_test.go
  • internal/llmlifecycle/lifecycle.go
  • internal/llmlifecycle/lifecycle_test.go
  • internal/pipeline/pipeline.go
  • internal/pipeline/pipeline_test.go
  • internal/pricing/pricing.go
  • internal/pricing/pricing_test.go
  • internal/reviewplan/cost_estimate_test.go
  • internal/reviewplan/summary.go
  • internal/view/review.go
  • internal/view/review_test.go

0 PR discussion threads considered. 0 summarized; 0 resolved.


Completed in 2m 00s | $0.11 | openai-codex/gpt-5.6-terra | cr 0.10.295
Field Value
Model openai-codex/gpt-5.6-terra
Reviewers go:implementation-tests, structure:repo-health, policies:conventions, documentation:docs
Engine pi_rpc · openai-codex/gpt-5.6-terra
Reviewed by cr · monit-reviewer
Duration 2m 00s wall · 4m 57s compute
Cost $0.11
Tokens 27.0k in / 3.2k out

Per-workstream usage

  • orchestrator-selection — openai-codex/gpt-5.6-terra
    • In: 6.7k
    • Out: 658
    • Cache read: 0
    • Cache create: 0
    • Cost: $0.02
    • Duration: 13s
  • go:implementation-tests — openai-codex/gpt-5.6-terra
    • In: 4.3k
    • Out: 757
    • Cache read: 41.5k
    • Cache create: 0
    • Cost: $0.03
    • Duration: 1m 11s
  • structure:repo-health — openai-codex/gpt-5.6-terra
    • In: 3.4k
    • Out: 1.2k
    • Cache read: 27.1k
    • Cache create: 0
    • Cost: $0.03
    • Duration: 1m 26s
  • policies:conventions — openai-codex/gpt-5.6-terra
    • In: 929
    • Out: 282
    • Cache read: 27.1k
    • Cache create: 0
    • Cost: $0.01
    • Duration: 57s
  • documentation:docs — openai-codex/gpt-5.6-terra
    • In: 6.5k
    • Out: 225
    • Cache read: 14.8k
    • Cache create: 0
    • Cost: $0.02
    • Duration: 1m 04s
  • orchestrator-rollup — openai-codex/gpt-5.6-terra
    • In: 5.2k
    • Out: 74
    • Cache read: 0
    • Cache create: 0
    • Cost: $0.01
    • Duration: 3s

Comment thread internal/ledger/ledger.go
monit-reviewer
monit-reviewer previously approved these changes Sep 2, 2026

@monit-reviewer monit-reviewer left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated PR Review

Reviewed commit: 717acb3b5cc4
Profile: public-oss-review - Posting as: monit-reviewer

Summary

Reviewer Findings
go:implementation-tests 1
structure:repo-health 0
policies:conventions 0
documentation:docs 1
go:implementation-tests (1 finding)

Minor - internal/pricing/pricing.go:72

The aggregate-to-TTL reconciliation guard is a stated correctness contract, but no test exercises a nonzero aggregate whose 5m/1h buckets sum to a different value. A regression that removes or inverts this condition would pass the current pricing tests and could emit a wrong estimate. Add a table case with (for example) total 10 and buckets 4+5 and assert ok == false.

documentation:docs (1 finding)

Minor - docs/llm-task-artifacts.md:67

Document the persisted speed telemetry field and its estimation consequence. Task metadata now stores it, and pricing deliberately leaves mixed or unsupported speeds unestimated; omitting it from this otherwise enumerated telemetry contract makes the durable input needed to reproduce an estimate undiscoverable.

Reviewer Coverage

  • go:implementation-tests — complete (constrained); inspected 21 assigned files (23 inspected across reviewers): internal/benchmark/metrics.go, internal/benchmark/metrics_test.go, internal/ledger/ledger.go, internal/ledger/ledger_test.go, internal/llm/adapter.go, internal/llmadapters/api.go, internal/llmadapters/api_test.go, internal/llmadapters/claude_transcript.go, internal/llmadapters/claude_transcript_test.go, internal/llmadapters/subprocess.go, internal/llmadapters/subprocess_test.go, internal/llmlifecycle/lifecycle.go, internal/llmlifecycle/lifecycle_test.go, internal/pipeline/pipeline.go, internal/pipeline/pipeline_test.go, internal/pricing/pricing.go, internal/pricing/pricing_test.go, internal/reviewplan/cost_estimate_test.go, internal/reviewplan/summary.go, internal/view/review.go, internal/view/review_test.go; skipped: none; constraints: Read-only review; tests were inspected but not executed.
  • structure:repo-health — complete (constrained); inspected 12 assigned files (23 inspected across reviewers): internal/ledger/ledger.go, internal/ledger/ledger_test.go, internal/llm/adapter.go, internal/llmadapters/api.go, internal/llmadapters/claude_transcript.go, internal/llmadapters/subprocess.go, internal/llmlifecycle/lifecycle.go, internal/llmlifecycle/lifecycle_test.go, internal/pipeline/pipeline.go, internal/pipeline/pipeline_test.go, internal/reviewplan/cost_estimate_test.go, internal/reviewplan/summary.go; skipped: none; constraints: Review limited to assigned changed files and pinned diff; no test execution was available.
  • policies:conventions — complete (constrained); inspected 6 assigned files (23 inspected across reviewers): internal/ledger/ledger.go, internal/ledger/ledger_test.go, internal/reviewplan/cost_estimate_test.go, internal/reviewplan/summary.go, internal/view/review.go, internal/view/review_test.go; skipped: none; constraints: Shared CLI convention documentation was not present in the supplied review context; review is limited to visible repo conventions and assigned files.
  • documentation:docs — complete (constrained); inspected 2 assigned files (23 inspected across reviewers): BENCHMARKING.md, docs/llm-task-artifacts.md; skipped: none; constraints: Review limited to the two assigned documentation files; pricing rates were inspected only against local code, not external provider sources.
Inspected files (23)
  • BENCHMARKING.md
  • docs/llm-task-artifacts.md
  • internal/benchmark/metrics.go
  • internal/benchmark/metrics_test.go
  • internal/ledger/ledger.go
  • internal/ledger/ledger_test.go
  • internal/llm/adapter.go
  • internal/llmadapters/api.go
  • internal/llmadapters/api_test.go
  • internal/llmadapters/claude_transcript.go
  • internal/llmadapters/claude_transcript_test.go
  • internal/llmadapters/subprocess.go
  • internal/llmadapters/subprocess_test.go
  • internal/llmlifecycle/lifecycle.go
  • internal/llmlifecycle/lifecycle_test.go
  • internal/pipeline/pipeline.go
  • internal/pipeline/pipeline_test.go
  • internal/pricing/pricing.go
  • internal/pricing/pricing_test.go
  • internal/reviewplan/cost_estimate_test.go
  • internal/reviewplan/summary.go
  • internal/view/review.go
  • internal/view/review_test.go

0 PR discussion threads considered. 0 summarized; 0 resolved.


Completed in 1m 56s | $0.11 | openai-codex/gpt-5.6-terra | cr 0.10.295
Field Value
Model openai-codex/gpt-5.6-terra
Reviewers go:implementation-tests, structure:repo-health, policies:conventions, documentation:docs
Engine pi_rpc · openai-codex/gpt-5.6-terra
Reviewed by cr · monit-reviewer
Duration 1m 56s wall · 5m 15s compute
Cost $0.11
Tokens 30.4k in / 2.8k out

Per-workstream usage

  • go:implementation-tests — openai-codex/gpt-5.6-terra
    • In: 6.2k
    • Out: 992
    • Cache read: 47.6k
    • Cache create: 0
    • Cost: $0.03
    • Duration: 1m 28s
  • structure:repo-health — openai-codex/gpt-5.6-terra
    • In: 18.5k
    • Out: 674
    • Cache read: 9.7k
    • Cache create: 0
    • Cost: $0.05
    • Duration: 1m 16s
  • policies:conventions — openai-codex/gpt-5.6-terra
    • In: 1.3k
    • Out: 389
    • Cache read: 6.7k
    • Cache create: 0
    • Cost: $0.01
    • Duration: 50s
  • documentation:docs — openai-codex/gpt-5.6-terra
    • In: 1.8k
    • Out: 677
    • Cache read: 14.8k
    • Cache create: 0
    • Cost: $0.01
    • Duration: 1m 36s
  • orchestrator-rollup — openai-codex/gpt-5.6-terra
    • In: 2.5k
    • Out: 88
    • Cache read: 2.8k
    • Cache create: 0
    • Cost: $0.01
    • Duration: 3s

Comment thread docs/llm-task-artifacts.md
Comment thread internal/pricing/pricing.go

@monit-reviewer monit-reviewer left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated PR Review

Reviewed commit: 0b93619665cf
Profile: public-oss-review - Posting as: monit-reviewer

Summary

Reviewer Findings
go:implementation-tests 1
structure:repo-health 0
policies:conventions 0
documentation:docs 0
go:implementation-tests (1 finding)

Major - internal/pricing/pricing.go:59

Treating an empty speed as standard defeats the fail-closed cache/restart contract: pre-change task metadata has no speed, and LoadStructured restores that as "", so its token usage is now priced as standard rather than left unavailable. This also contradicts the documented guardrail that legacy metadata without speed is unknown and unpriced. Require an explicit standard speed for estimates (and update the empty-speed test); adapters must emit the observed tier before pricing.

Reviewer Coverage

  • go:implementation-tests — complete (constrained); inspected 21 assigned files (23 inspected across reviewers): internal/benchmark/metrics.go, internal/benchmark/metrics_test.go, internal/ledger/ledger.go, internal/ledger/ledger_test.go, internal/llm/adapter.go, internal/llmadapters/api.go, internal/llmadapters/api_test.go, internal/llmadapters/claude_transcript.go, internal/llmadapters/claude_transcript_test.go, internal/llmadapters/subprocess.go, internal/llmadapters/subprocess_test.go, internal/llmlifecycle/lifecycle.go, internal/llmlifecycle/lifecycle_test.go, internal/pipeline/pipeline.go, internal/pipeline/pipeline_test.go, internal/pricing/pricing.go, internal/pricing/pricing_test.go, internal/reviewplan/cost_estimate_test.go, internal/reviewplan/summary.go, internal/view/review.go, internal/view/review_test.go; skipped: none; constraints: Read-only review; I inspected the assigned implementation and test code but could not execute tests.
  • structure:repo-health — complete (constrained); inspected 12 assigned files (23 inspected across reviewers): internal/ledger/ledger.go, internal/ledger/ledger_test.go, internal/llm/adapter.go, internal/llmadapters/api.go, internal/llmadapters/claude_transcript.go, internal/llmadapters/subprocess.go, internal/llmlifecycle/lifecycle.go, internal/llmlifecycle/lifecycle_test.go, internal/pipeline/pipeline.go, internal/pipeline/pipeline_test.go, internal/reviewplan/cost_estimate_test.go, internal/reviewplan/summary.go; skipped: none; constraints: Review limited to the assigned changed files; pricing behavior was inspected only as needed to trace the pipeline contract.
  • policies:conventions — complete (constrained); inspected 6 assigned files (23 inspected across reviewers): internal/ledger/ledger.go, internal/ledger/ledger_test.go, internal/reviewplan/cost_estimate_test.go, internal/reviewplan/summary.go, internal/view/review.go, internal/view/review_test.go; skipped: none; constraints: Review limited to assigned changed files and conventions visible in the provided review context; shared external convention sources were not available locally.
  • documentation:docs — complete (constrained); inspected 2 assigned files (23 inspected across reviewers): BENCHMARKING.md, docs/llm-task-artifacts.md; skipped: none; constraints: Review limited to assigned documentation and static verification against relevant implementation; no commands were executed.
Inspected files (23)
  • BENCHMARKING.md
  • docs/llm-task-artifacts.md
  • internal/benchmark/metrics.go
  • internal/benchmark/metrics_test.go
  • internal/ledger/ledger.go
  • internal/ledger/ledger_test.go
  • internal/llm/adapter.go
  • internal/llmadapters/api.go
  • internal/llmadapters/api_test.go
  • internal/llmadapters/claude_transcript.go
  • internal/llmadapters/claude_transcript_test.go
  • internal/llmadapters/subprocess.go
  • internal/llmadapters/subprocess_test.go
  • internal/llmlifecycle/lifecycle.go
  • internal/llmlifecycle/lifecycle_test.go
  • internal/pipeline/pipeline.go
  • internal/pipeline/pipeline_test.go
  • internal/pricing/pricing.go
  • internal/pricing/pricing_test.go
  • internal/reviewplan/cost_estimate_test.go
  • internal/reviewplan/summary.go
  • internal/view/review.go
  • internal/view/review_test.go

0 PR discussion threads considered. 0 summarized; 0 resolved.


Completed in 1m 54s | $0.12 | openai-codex/gpt-5.6-terra | cr 0.10.295
Field Value
Model openai-codex/gpt-5.6-terra
Reviewers go:implementation-tests, structure:repo-health, policies:conventions, documentation:docs
Engine pi_rpc · openai-codex/gpt-5.6-terra
Reviewed by cr · monit-reviewer
Duration 1m 54s wall · 4m 38s compute
Cost $0.12
Tokens 15.6k in / 3.6k out

Per-workstream usage

  • go:implementation-tests — openai-codex/gpt-5.6-terra
    • In: 5.5k
    • Out: 1.6k
    • Cache read: 122.4k
    • Cache create: 0
    • Cost: $0.05
    • Duration: 1m 23s
  • structure:repo-health — openai-codex/gpt-5.6-terra
    • In: 642
    • Out: 1.1k
    • Cache read: 44.5k
    • Cache create: 0
    • Cost: $0.02
    • Duration: 1m 28s
  • policies:conventions — openai-codex/gpt-5.6-terra
    • In: 1.4k
    • Out: 245
    • Cache read: 24.1k
    • Cache create: 0
    • Cost: $0.01
    • Duration: 44s
  • documentation:docs — openai-codex/gpt-5.6-terra
    • In: 2.6k
    • Out: 520
    • Cache read: 14.8k
    • Cache create: 0
    • Cost: $0.01
    • Duration: 55s
  • orchestrator-rollup — openai-codex/gpt-5.6-terra
    • In: 5.4k
    • Out: 221
    • Cache read: 0
    • Cache create: 0
    • Cost: $0.01
    • Duration: 6s

Comment thread internal/pricing/pricing.go

@monit-reviewer monit-reviewer left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated PR Review

Reviewed commit: 40431a83bbd1
Profile: public-oss-review - Posting as: monit-reviewer

Summary

Reviewer Findings
go:implementation-tests 0
structure:repo-health 0
policies:conventions 0
documentation:docs 0

Reviewer Coverage

  • go:implementation-tests — complete (constrained); inspected 21 assigned files (23 inspected across reviewers): internal/benchmark/metrics.go, internal/benchmark/metrics_test.go, internal/ledger/ledger.go, internal/ledger/ledger_test.go, internal/llm/adapter.go, internal/llmadapters/api.go, internal/llmadapters/api_test.go, internal/llmadapters/claude_transcript.go, internal/llmadapters/claude_transcript_test.go, internal/llmadapters/subprocess.go, internal/llmadapters/subprocess_test.go, internal/llmlifecycle/lifecycle.go, internal/llmlifecycle/lifecycle_test.go, internal/pipeline/pipeline.go, internal/pipeline/pipeline_test.go, internal/pricing/pricing.go, internal/pricing/pricing_test.go, internal/reviewplan/cost_estimate_test.go, internal/reviewplan/summary.go, internal/view/review.go, internal/view/review_test.go; skipped: none; constraints: Review was limited to pinned diff and repository reads; no tests were executed.
  • structure:repo-health — complete (constrained); inspected 12 assigned files (23 inspected across reviewers): internal/ledger/ledger.go, internal/ledger/ledger_test.go, internal/llm/adapter.go, internal/llmadapters/api.go, internal/llmadapters/claude_transcript.go, internal/llmadapters/subprocess.go, internal/llmlifecycle/lifecycle.go, internal/llmlifecycle/lifecycle_test.go, internal/pipeline/pipeline.go, internal/pipeline/pipeline_test.go, internal/reviewplan/cost_estimate_test.go, internal/reviewplan/summary.go; skipped: none; constraints: Review limited to the assigned changed files and read-only repository tools; tests were not executed.
  • policies:conventions — complete (constrained); inspected 6 assigned files (23 inspected across reviewers): internal/ledger/ledger.go, internal/ledger/ledger_test.go, internal/reviewplan/cost_estimate_test.go, internal/reviewplan/summary.go, internal/view/review.go, internal/view/review_test.go; skipped: none; constraints: Review limited to the six assigned changed files; shared CLI convention source documents were not provided in the review context.
  • documentation:docs — complete (constrained); inspected 2 assigned files (23 inspected across reviewers): BENCHMARKING.md, docs/llm-task-artifacts.md; skipped: none; constraints: Review limited to the two assigned documentation files; implementation was checked only where needed to validate changed claims.
Inspected files (23)
  • BENCHMARKING.md
  • docs/llm-task-artifacts.md
  • internal/benchmark/metrics.go
  • internal/benchmark/metrics_test.go
  • internal/ledger/ledger.go
  • internal/ledger/ledger_test.go
  • internal/llm/adapter.go
  • internal/llmadapters/api.go
  • internal/llmadapters/api_test.go
  • internal/llmadapters/claude_transcript.go
  • internal/llmadapters/claude_transcript_test.go
  • internal/llmadapters/subprocess.go
  • internal/llmadapters/subprocess_test.go
  • internal/llmlifecycle/lifecycle.go
  • internal/llmlifecycle/lifecycle_test.go
  • internal/pipeline/pipeline.go
  • internal/pipeline/pipeline_test.go
  • internal/pricing/pricing.go
  • internal/pricing/pricing_test.go
  • internal/reviewplan/cost_estimate_test.go
  • internal/reviewplan/summary.go
  • internal/view/review.go
  • internal/view/review_test.go

0 PR discussion threads considered. 0 summarized; 0 resolved.


Completed in 2m 11s | $0.09 | openai-codex/gpt-5.6-terra | cr 0.10.295
Field Value
Model openai-codex/gpt-5.6-terra
Reviewers go:implementation-tests, structure:repo-health, policies:conventions, documentation:docs
Engine pi_rpc · openai-codex/gpt-5.6-terra
Reviewed by cr · monit-reviewer
Duration 2m 11s wall · 5m 42s compute
Cost $0.09
Tokens 12.0k in / 2.1k out

Per-workstream usage

  • go:implementation-tests — openai-codex/gpt-5.6-terra
    • In: 4.3k
    • Out: 863
    • Cache read: 135.7k
    • Cache create: 0
    • Cost: $0.05
    • Duration: 1m 34s
  • structure:repo-health — openai-codex/gpt-5.6-terra
    • In: 394
    • Out: 480
    • Cache read: 59.9k
    • Cache create: 0
    • Cost: $0.02
    • Duration: 1m 53s
  • policies:conventions — openai-codex/gpt-5.6-terra
    • In: 4.3k
    • Out: 241
    • Cache read: 10.8k
    • Cache create: 0
    • Cost: $0.01
    • Duration: 1m 08s
  • documentation:docs — openai-codex/gpt-5.6-terra
    • In: 986
    • Out: 519
    • Cache read: 13.8k
    • Cache create: 0
    • Cost: $0.01
    • Duration: 1m 02s
  • orchestrator-rollup — openai-codex/gpt-5.6-terra
    • In: 2.1k
    • Out: 38
    • Cache read: 2.8k
    • Cache create: 0
    • Cost: $0.01
    • Duration: 3s

@zzwong
zzwong marked this pull request as ready for review September 2, 2026 15:13
@zzwong
zzwong merged commit a5d4937 into main Sep 2, 2026
10 checks passed
@zzwong
zzwong deleted the fix/580-claude-cost-estimates branch September 2, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make Claude cost estimates current and cache-duration aware

2 participants