Skip to content

feat(codex): report models with missing pricing - #1750

Merged
ryoppippi merged 3 commits into
mainfrom
codex/fix/json-missing-pricing
Sep 17, 2026
Merged

ryoppippi merged 3 commits into
mainfrom
codex/fix/json-missing-pricing

Conversation

@ryoppippi

@ryoppippi ryoppippi commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

Summary

  • expose unknown pricing in JSON totals through unpricedModels
  • mark affected model breakdowns with missingPricing: true
  • preserve the metadata with --no-cost while omitting empty/false fields
  • document the additive JSON fields and their command coverage

This carries forward the implementation from #1737 by @ravsau on top of current main. Saurav Sharma is credited as a co-author on the commit.

Fixes #1736.

Validation

  • cargo fmt --manifest-path rust/Cargo.toml --all --check
  • focused tests for ccusage-core, ccusage-adapter-all, and ccusage-adapter-codex
  • just test
  • just typecheck
  • cargo clippy --manifest-path rust/Cargo.toml --workspace --all-targets -- -D warnings
  • just docs::typecheck
  • just hawk
  • pre-push hooks: clippy, treefmt, gitleaks, cargo test

Summary by cubic

Adds totals.unpricedModels and missingPricing: true to JSON reports so dashboards can tell "free" from "unknown" pricing. Fixes #1736.

Behavior details

  • Detection follows cost mode: only entries where cost was calculated from tokens and no price was found are reported; display mode and auto mode with a stored cost report nothing.
  • unpricedModels is sorted, deduplicated, and present only when unpriced usage was detected.
  • --no-cost keeps these fields because they describe pricing availability, not amounts.
  • Covered: daily, weekly, monthly, session for all agents, including --instances, --sections, --by-agent. Not covered: blocks and session --id.

Written for commit 6707f93. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • New Features
    • JSON reports identify models without available pricing through totals.unpricedModels.
    • Affected model breakdowns include missingPricing: true; priced models omit this field.
    • Unpriced model names are sorted and deduplicated, and the totals field appears only when applicable.
    • Usage from models without pricing continues to show a cost of 0.
    • Pricing indicators remain available with --no-cost and are omitted when pricing checks are not performed.
  • Documentation
    • Added guidance explaining unpriced-model fields and pricing-mode behavior in JSON output.

Expose unpriced models in JSON totals and mark affected model breakdowns so consumers can distinguish unknown pricing from a real zero cost.

Co-authored-by: Saurav Sharma <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: f71fedc1-d66a-40dc-890f-293b314c720e

📥 Commits

Reviewing files that changed from the base of the PR and between fe31750 and 6707f93.

📒 Files selected for processing (3)
  • rust/adapters/codex/src/report.rs
  • rust/crates/ccusage-adapter-all/src/loader.rs
  • rust/crates/ccusage-adapter-all/src/tests.rs

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The change exposes missing pricing in JSON reports. Affected model entries include missingPricing: true, and totals include sorted, deduplicated unpricedModels when applicable. Detection follows CostMode across core, Codex, unified reports, tests, and documentation.

Changes

JSON Pricing Availability Signals

Layer / File(s) Summary
JSON contract and pricing detection
rust/crates/ccusage-core/src/types.rs, rust/crates/ccusage-core/src/output.rs, rust/crates/ccusage-core/src/cost.rs, rust/crates/ccusage-core/src/lib.rs
missingPricing serializes only when true. JSON totals add sorted, deduplicated unpricedModels only when present. Tests cover unknown pricing, zero-rate pricing, stored costs, display mode, and cost stripping.
Report adapter integration
rust/adapters/codex/src/*.rs, rust/crates/ccusage-adapter-all/src/*.rs
Codex and unified reports propagate CostMode and attach missing-pricing indicators to model entries and totals. Tests cover report, agent, section, and display-mode behavior.
JSON output documentation
docs/guide/json-output.md
The guide documents unpricedModels, missingPricing, cost-mode detection, --no-cost behavior, and supported report types.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature · Severity of issue fixed: Medium

Sequence Diagram(s)

sequenceDiagram
  participant ReportAdapter
  participant PricingDetection
  participant JSONReport
  ReportAdapter->>PricingDetection: evaluate model usage and cost mode
  PricingDetection-->>ReportAdapter: missing pricing status
  ReportAdapter->>JSONReport: serialize missingPricing and totals
  JSONReport-->>ReportAdapter: JSON report with conditional unpricedModels
Loading

Merge Risk: ⚪ Minimal · up to 6707f

The JSON pricing signals and cost-mode behavior are consistent across the supported report paths, with no material merge risk identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 57.89% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 38 functions across 9 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the primary feature: JSON reporting for models with missing pricing. The codex scope is narrower than the full changeset, which also updates shared reporting and unified …
Linked Issues check ✅ Passed The pull request satisfies the coding requirements in issue #1736. It adds sorted and deduplicated totals.unpricedModels and omits it when empty. It serializes missingPricing: true for affected mo…
Out of Scope Changes check ✅ Passed The changed source, tests, and documentation remain within issue #1736. Cost-mode propagation, Codex handling, unified report support, and validation tests implement the required JSON pricing metadata…
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix/json-missing-pricing

Warning

Some tools did not complete. Review the errors below.

🔧 Clippy (1.98.0)

Clippy execution failed


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ryoppippi

Copy link
Copy Markdown
Member Author

@coderabbitai review

@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai review

@cubic-dev-ai review

@ryoppippi I have started the AI code review. It will take a few minutes to complete.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
ccusage-guide 6707f93 Commit Preview URL

Branch Preview URL
Sep 17 2026, 11:58 AM

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 issue found across 8 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="rust/adapters/codex/src/report.rs">

<violation number="1" location="rust/adapters/codex/src/report.rs:27">
P2: When Codex runs with `--mode display`, this unconditional attachment still adds `totals.unpricedModels` and `missingPricing` because the report path never receives or checks `SharedArgs.mode`. Pass the cost mode through the report path and suppress both fields in display mode (and in auto mode when a stored cost is available).</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread rust/adapters/codex/src/report.rs Resolved
@pkg-pr-new

pkg-pr-new Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

ccusage

npx https://pkg.pr.new/ccusage@1750

@ccusage/ccusage-darwin-arm64

npx https://pkg.pr.new/@ccusage/ccusage-darwin-arm64@1750

@ccusage/ccusage-darwin-x64

npx https://pkg.pr.new/@ccusage/ccusage-darwin-x64@1750

@ccusage/ccusage-linux-arm64

npx https://pkg.pr.new/@ccusage/ccusage-linux-arm64@1750

@ccusage/ccusage-linux-x64

npx https://pkg.pr.new/@ccusage/ccusage-linux-x64@1750

@ccusage/ccusage-win32-x64

npx https://pkg.pr.new/@ccusage/ccusage-win32-x64@1750

commit: 6707f93

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: d169b2e72523
Base SHA: 2764d06eafd3

This compares the PR package against the configured base package on the same CI runner.

Package runtime diagnostics

Compares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 363.7ms 2.77 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 349.0ms 2.89 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 128.4ms 7.84 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 104.5ms 9.64 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 39.8ms 35.7ms 1.11x 55.25 MiB 55.00 MiB 1.00x 0.04 MiB/s 0.04 MiB/s
claude session --offline --json 0.00 MiB 34.7ms 31.3ms 1.11x 55.00 MiB 55.25 MiB 1.00x 0.04 MiB/s 0.05 MiB/s
codex daily --offline --json 0.00 MiB 32.3ms 32.3ms 1.00x 54.75 MiB 55.00 MiB 1.00x 0.03 MiB/s 0.03 MiB/s
codex session --offline --json 0.00 MiB 33.0ms 33.6ms 0.98x 55.00 MiB 55.25 MiB 1.00x 0.03 MiB/s 0.03 MiB/s

Large real-world-shaped fixture performance

Generated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 419.5ms 379.2ms 1.11x 953.10 MiB 987.10 MiB 1.04x 2.40 GiB/s 2.65 GiB/s
codex --offline --json 1.01 GiB 127.1ms 132.2ms 0.96x 423.43 MiB 417.41 MiB 0.99x 7.92 GiB/s 7.62 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 20.21 KiB 20.21 KiB +0.00 KiB 1.00x
installed native package binary 4602.97 KiB 4604.47 KiB +1.50 KiB 1.00x

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: d169b2e72523
Base SHA: 2764d06eafd3

This compares the Rust PR release binary against the configured base package on the same CI runner.

Package runtime diagnostics

Compares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 510.4ms 1.97 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 440.4ms 2.29 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 180.4ms 5.58 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 135.7ms 7.42 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published native ccusage binary from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 41.4ms 10.7ms 3.87x 55.00 MiB 20.96 MiB 0.38x 0.04 MiB/s 0.14 MiB/s
claude session --offline --json 0.00 MiB 42.6ms 15.0ms 2.84x 55.00 MiB 20.95 MiB 0.38x 0.04 MiB/s 0.10 MiB/s
codex daily --offline --json 0.00 MiB 54.2ms 14.5ms 3.75x 55.00 MiB 20.96 MiB 0.38x 0.02 MiB/s 0.06 MiB/s
codex session --offline --json 0.00 MiB 55.4ms 14.9ms 3.71x 55.25 MiB 20.96 MiB 0.38x 0.02 MiB/s 0.06 MiB/s

Large real-world-shaped fixture performance

Generated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published native ccusage binary from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 546.4ms 456.7ms 1.20x 927.10 MiB 943.09 MiB 1.02x 1.84 GiB/s 2.20 GiB/s
codex --offline --json 1.01 GiB 186.9ms 133.9ms 1.40x 443.43 MiB 427.42 MiB 0.96x 5.39 GiB/s 7.52 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 20.21 KiB 20.21 KiB +0.00 KiB 1.00x
installed native package binary 4602.97 KiB 4604.47 KiB +1.50 KiB 1.00x

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

@coderabbitai

coderabbitai Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

@ryoppippi I will review the changes in #1750.

⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ No critical issues — one docs wording nit inline.

Reviewed changes — reviewed the full diff for exposing unknown pricing in JSON reports.

  • Added totals.unpricedModels (sorted, deduplicated, present only when non-empty) to generic, unified, and focused Codex totals via shared unpriced_models / attach_unpriced_models helpers.
  • Marked affected breakdowns with missingPricing: true, serialized only when true so priced entries keep their shape.
  • Kept both new fields under --no-cost since they describe pricing availability, not amounts, with test coverage for the stripping behavior.
  • Added mode-aware detection tests (zero-rate pricing counts as priced, zero-token usage ignored, stored costs suppress) plus sorted/dedup and sections-scoping tests.
  • Documented the new JSON fields, cost-mode interaction, and command coverage in docs/guide/json-output.md.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using Muse Spark Contributor (free via Pullfrog for OSS) | 𝕏

Comment thread docs/guide/json-output.md Resolved
@ryoppippi

Copy link
Copy Markdown
Member Author

Fixed the P2 by passing CostMode into Codex JSON report generation and omitting unpricedModels / missingPricing in display mode. Codex records do not carry stored costs, so auto mode still correctly falls back to calculated pricing. Added a display-mode regression test; the Codex adapter test suite and Clippy pass.

@cubic-dev-ai review
@coderabbitai review

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Fixed the P2 by passing CostMode into Codex JSON report generation and omitting unpricedModels / missingPricing in display mode. Codex records do not carry stored costs, so auto mode still correctly falls back to calculated pricing. Added a display-mode regression test; the Codex adapter test suite and Clippy pass.

@cubic-dev-ai review
@coderabbitai review

@ryoppippi I have started the AI code review. It will take a few minutes to complete.

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: fe31750d27d0
Base SHA: 2764d06eafd3

This compares the Rust PR release binary against the configured base package on the same CI runner.

Package runtime diagnostics

Compares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 670.4ms 1.50 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 659.1ms 1.53 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 231.1ms 4.36 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 189.5ms 5.31 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published native ccusage binary from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 39.1ms 17.3ms 2.25x 55.00 MiB 20.96 MiB 0.38x 0.04 MiB/s 0.09 MiB/s
claude session --offline --json 0.00 MiB 49.6ms 16.9ms 2.94x 55.00 MiB 20.96 MiB 0.38x 0.03 MiB/s 0.09 MiB/s
codex daily --offline --json 0.00 MiB 43.1ms 14.7ms 2.92x 55.00 MiB 20.95 MiB 0.38x 0.02 MiB/s 0.06 MiB/s
codex session --offline --json 0.00 MiB 51.6ms 13.2ms 3.92x 55.00 MiB 20.95 MiB 0.38x 0.02 MiB/s 0.07 MiB/s

Large real-world-shaped fixture performance

Generated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published native ccusage binary from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 552.5ms 503.6ms 1.10x 985.10 MiB 962.84 MiB 0.98x 1.82 GiB/s 2.00 GiB/s
codex --offline --json 1.01 GiB 204.4ms 187.8ms 1.09x 437.42 MiB 433.42 MiB 0.99x 4.92 GiB/s 5.36 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 20.21 KiB 20.21 KiB +0.00 KiB 1.00x
installed native package binary 4602.97 KiB 4604.72 KiB +1.75 KiB 1.00x

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: fe31750d27d0
Base SHA: 2764d06eafd3

This compares the PR package against the configured base package on the same CI runner.

Package runtime diagnostics

Compares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 351.3ms 2.87 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 328.9ms 3.06 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 143.7ms 7.00 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 119.3ms 8.44 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 66.3ms 58.7ms 1.13x 55.25 MiB 55.25 MiB 1.00x 0.02 MiB/s 0.03 MiB/s
claude session --offline --json 0.00 MiB 55.2ms 53.7ms 1.03x 55.00 MiB 55.00 MiB 1.00x 0.03 MiB/s 0.03 MiB/s
codex daily --offline --json 0.00 MiB 52.2ms 53.0ms 0.98x 55.00 MiB 55.00 MiB 1.00x 0.02 MiB/s 0.02 MiB/s
codex session --offline --json 0.00 MiB 54.8ms 53.5ms 1.02x 55.25 MiB 54.75 MiB 0.99x 0.02 MiB/s 0.02 MiB/s

Large real-world-shaped fixture performance

Generated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 518.4ms 483.2ms 1.07x 941.10 MiB 903.08 MiB 0.96x 1.94 GiB/s 2.08 GiB/s
codex --offline --json 1.01 GiB 156.7ms 157.6ms 0.99x 425.43 MiB 451.41 MiB 1.06x 6.42 GiB/s 6.39 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 20.21 KiB 20.21 KiB +0.00 KiB 1.00x
installed native package binary 4602.97 KiB 4604.72 KiB +1.75 KiB 1.00x

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 9 files

Re-trigger cubic

@coderabbitai

coderabbitai Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

git diff --name-status HEAD^ HEAD
printf '\n--- diff stat ---\n'
git diff --stat HEAD^ HEAD
printf '\n--- current commit ---\n'
git show -s --format='%H%n%s%n%b' HEAD
printf '\n--- changed diff ---\n'
git diff --find-renames --find-copies --unified=50 HEAD^ HEAD

Length of output: 21701


🏁 Script executed:

#!/bin/bash
set -euo pipefail

base="$(git merge-base HEAD origin/main 2>/dev/null || git merge-base HEAD main)"
printf '%s\n' "--- base: $base ---"
git diff --name-status "$base"...HEAD
printf '%s\n' "--- full diff stat ---"
git diff --stat "$base"...HEAD
printf '%s\n' "--- CostMode definitions and uses ---"
rg -n -C 4 '\benum\s+CostMode\b|\bCostMode::|\bmode:\s*CostMode\b' rust
printf '%s\n' "--- report_from_groups calls ---"
rg -n -C 5 '\breport_from_groups\s*\(' rust
printf '%s\n' "--- outlines ---"
ast-grep outline rust/adapters/codex/src/report.rs --items all --type function --match 'report_from_groups|group_json|codex_missing_pricing_models|totals_json'
ast-grep outline rust/crates/ccusage-core/src/output.rs --items all --type function --match 'unpriced_models|attach_unpriced_models|totals_json|missing_pricing_warnings'
printf '%s\n' "--- complete pull request diff ---"
git diff --find-renames --find-copies --unified=20 "$base"...HEAD

Length of output: 246814


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- summary aggregation and missing-pricing assignments ---'
rg -n -C 8 '\bmissing_pricing\b|ModelBreakdown\s*\{' rust/crates/ccusage-core/src/summary.rs rust/crates/ccusage-core/src rust/adapters/codex/src
printf '%s\n' '--- standard JSON producers ---'
rg -n -C 6 '\b(totals_json|summary_json|session_summary_json|agent_summary_json)\s*\(' rust/crates/ccusage-core/src rust/crates/ccusage-adapter-all/src
printf '%s\n' '--- relevant core output implementations ---'
sed -n '25,170p' rust/crates/ccusage-core/src/output.rs
sed -n '400,455p' rust/crates/ccusage-core/src/output.rs
printf '%s\n' '--- summary aggregation implementation ---'
ast-grep outline rust/crates/ccusage-core/src/summary.rs --items all --type function --match 'summarize|aggregate|model'
printf '%s\n' '--- serialization and sections implementation ---'
ast-grep outline rust/crates/ccusage-adapter-all/src/report.rs --items all --type function --match 'row_json|agent_json|sections_report_json|totals_json'
sed -n '100,235p' rust/crates/ccusage-adapter-all/src/report.rs
printf '%s\n' '--- no-cost stripping implementation ---'
rg -n -A70 -B5 '\bfn strip_cost_json\b' rust
printf '%s\n' '--- changed-line diagnostics ---'
git diff --check "$(git merge-base HEAD origin/main 2>/dev/null || git merge-base HEAD main)"...HEAD

Length of output: 69020


@ryoppippi I reviewed the complete changeset for #1750.

The CostMode propagation now covers the Codex JSON path. display mode omits unpricedModels and missingPricing. auto and calculate modes retain missing-pricing detection for Codex usage. The aggregation preserves the flag across model summaries. The JSON totals are sorted, deduplicated, and omitted when empty. --no-cost preserves the pricing metadata.

I found no actionable issues in the reviewed changes. I did not run repository tests in this inspection environment.


✏️ Learnings added
Learnt from: ryoppippi
URL: https://github.com/ccusage/ccusage/pull/1750

Timestamp: 2026-09-17T11:48:36.209Z
Learning: The Codex adapter has no stored per-record cost. In the Codex JSON report path, `CostMode::Auto` must use calculated pricing, while `CostMode::Display` must omit `totals.unpricedModels` and per-model `missingPricing` metadata because it does not perform pricing lookup.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Important

Focused Codex JSON now respects display mode, but unified reports still flag Codex models as unpriced in display mode.

Reviewed changes — reviewed the delta since the prior pullfrog review (d169b2e7 → fe31750).

  • Threaded CostMode through focused Codex report_from_groups and group_json, suppressing totals.unpricedModels and per-model missingPricing in display mode.
  • Defaulted the hidden report_json helper to CostMode::Calculate and updated its call sites and tests.
  • Added display_mode_omits_missing_pricing_metadata covering the focused-path suppression.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using Muse Spark Contributor (free via Pullfrog for OSS) | 𝕏

Comment thread rust/adapters/codex/src/report.rs Resolved
@ryoppippi

Copy link
Copy Markdown
Member Author

Fixed the unified-path inconsistency in 6707f93a:

  • threaded CostMode into unified Codex row construction
  • suppressed per-model and totals missing-pricing metadata in display mode
  • suppressed focused table missing-pricing warnings in display mode
  • added a unified JSON regression test

Focused adapter tests, Clippy, and pre-push cargo tests pass.

@pullfrog review
@cubic-dev-ai review
@coderabbitai review

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Fixed the unified-path inconsistency in 6707f93a:

  • threaded CostMode into unified Codex row construction
  • suppressed per-model and totals missing-pricing metadata in display mode
  • suppressed focused table missing-pricing warnings in display mode
    ...

@ryoppippi I have started the AI code review. It will take a few minutes to complete.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes — reviewed the delta since the prior pullfrog review (fe31750 → 6707f93).

  • Threaded shared.mode through both load_codex_rows branches into codex_group_row, suppressing missing_pricing in display mode so unified JSON agrees with focused Codex JSON.
  • Gated the Codex table missing-pricing stderr warning on shared.mode != CostMode::Display, matching the JSON metadata suppression.
  • Added display_mode_omits_codex_missing_pricing_from_unified_json covering the unified-path suppression, and updated existing codex_group_row call sites for the new mode parameter.

Pullfrog  | Fix it ➔ | View workflow run | Using Muse Spark Contributor (free via Pullfrog for OSS) | 𝕏

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 6707f93a234d
Base SHA: 2764d06eafd3

This compares the Rust PR release binary against the configured base package on the same CI runner.

Package runtime diagnostics

Compares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 380.1ms 2.65 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 338.1ms 2.98 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 141.0ms 7.14 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 104.3ms 9.66 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published native ccusage binary from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 39.2ms 10.2ms 3.86x 55.00 MiB 20.96 MiB 0.38x 0.04 MiB/s 0.15 MiB/s
claude session --offline --json 0.00 MiB 36.5ms 11.2ms 3.27x 54.75 MiB 20.96 MiB 0.38x 0.04 MiB/s 0.14 MiB/s
codex daily --offline --json 0.00 MiB 31.8ms 10.6ms 3.01x 55.00 MiB 20.96 MiB 0.38x 0.03 MiB/s 0.08 MiB/s
codex session --offline --json 0.00 MiB 34.1ms 9.7ms 3.52x 55.00 MiB 20.96 MiB 0.38x 0.03 MiB/s 0.09 MiB/s

Large real-world-shaped fixture performance

Generated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published native ccusage binary from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 396.3ms 359.3ms 1.10x 985.11 MiB 955.09 MiB 0.97x 2.54 GiB/s 2.80 GiB/s
codex --offline --json 1.01 GiB 128.2ms 106.3ms 1.21x 455.43 MiB 437.42 MiB 0.96x 7.85 GiB/s 9.47 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 20.21 KiB 20.21 KiB +0.00 KiB 1.00x
installed native package binary 4602.97 KiB 4604.72 KiB +1.75 KiB 1.00x

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 6707f93a234d
Base SHA: 2764d06eafd3

This compares the PR package against the configured base package on the same CI runner.

Package runtime diagnostics

Compares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
All rows run --offline --json, measured by hyperfine with 0 warmups and 1 runs. This isolates wrapper overhead from the installed native optional dependency and the workspace release binary built on the runner.

Command Runtime Input Median Throughput Samples
claude --offline --json Package wrapper 1.01 GiB 413.3ms 2.44 GiB/s 1
claude --offline --json Installed native binary 1.01 GiB 365.4ms 2.76 GiB/s 1
codex --offline --json Package wrapper 1.01 GiB 129.0ms 7.81 GiB/s 1
codex --offline --json Installed native binary 1.01 GiB 102.2ms 9.85 GiB/s 1

Committed fixture performance

Committed small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage.

Fixtures: Claude apps/ccusage/test/fixtures/claude (0.00 MiB, 2 files), Codex apps/ccusage/test/fixtures/codex (0.00 MiB, 1 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 2 warmups and 7 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude daily --offline --json 0.00 MiB 41.8ms 38.7ms 1.08x 55.00 MiB 54.75 MiB 1.00x 0.04 MiB/s 0.04 MiB/s
claude session --offline --json 0.00 MiB 38.1ms 38.6ms 0.99x 54.75 MiB 55.00 MiB 1.00x 0.04 MiB/s 0.04 MiB/s
codex daily --offline --json 0.00 MiB 40.5ms 36.1ms 1.12x 55.25 MiB 55.25 MiB 1.00x 0.02 MiB/s 0.02 MiB/s
codex session --offline --json 0.00 MiB 35.0ms 34.4ms 1.02x 55.00 MiB 55.25 MiB 1.00x 0.02 MiB/s 0.02 MiB/s

Large real-world-shaped fixture performance

Generated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures.

Fixtures: Claude /home/runner/_work/_temp/ccusage-large-fixture (1.01 GiB, 2597 files), Codex /home/runner/_work/_temp/ccusage-large-codex-fixture (1.01 GiB, 2597 files)
Base runs the published ccusage package from pkg.pr.new, installed before measurement; PR runs the published ccusage package from pkg.pr.new, installed before measurement. Both run --offline --json, measured by hyperfine with 0 warmups and 1 runs.
Peak RSS is measured separately with /usr/bin/time using 1 runs. Lower RSS ratios are better.

Command Input Base median PR median PR vs base Base peak RSS PR peak RSS PR/base RSS Base throughput PR throughput
claude --offline --json 1.01 GiB 455.0ms 400.1ms 1.14x 967.10 MiB 958.84 MiB 0.99x 2.21 GiB/s 2.52 GiB/s
codex --offline --json 1.01 GiB 133.3ms 131.8ms 1.01x 429.42 MiB 433.41 MiB 1.01x 7.55 GiB/s 7.64 GiB/s

Artifact size

Artifact Base PR Delta Ratio
packed ccusage-*.tgz 20.21 KiB 20.21 KiB +0.00 KiB 1.00x
installed native package binary 4602.97 KiB 4604.72 KiB +1.75 KiB 1.00x

Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes
Reviewed the missing-pricing JSON reporting and display-mode suppression in this run.

  • Unpriced-model JSON fields: totals.unpricedModels plus missingPricing: true on affected breakdowns, with sorted/deduplicated output and absent-when-empty semantics.
  • Codex display-mode suppression: focused Codex JSON, per-model flags, and table warnings now skip missing-pricing metadata in display mode.
  • Unified Codex row fix: CostMode threaded into codex_group_row so unified JSON totals stay consistent with focused reports.
  • Shared helpers and docs: unpriced_models / attach_unpriced_models reuse, --no-cost preservation, and JSON-output guide coverage notes.

Pullfrog  | View workflow run | Using Muse Spark Contributor (free via Pullfrog for OSS) | 𝕏

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 10 files

Re-trigger cubic

@ryoppippi
ryoppippi merged commit 36ba9f0 into main Sep 17, 2026
41 checks passed
@ryoppippi
ryoppippi deleted the codex/fix/json-missing-pricing branch September 17, 2026 12:08
@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base="$(git merge-base HEAD origin/main 2>/dev/null || git merge-base HEAD main)"
printf '%s\n' "--- HEAD ---"
git show -s --format='%H%n%s%n%b' HEAD
printf '%s\n' "--- base ---"
printf '%s\n' "$base"
printf '%s\n' "--- full diff stat ---"
git diff --stat "$base"...HEAD
printf '%s\n' "--- changed files ---"
git diff --name-status "$base"...HEAD
printf '%s\n' "--- latest commit diff ---"
git diff --find-renames --find-copies --unified=30 HEAD^ HEAD
printf '%s\n' "--- full PR diff ---"
git diff --find-renames --find-copies --unified=15 "$base"...HEAD
printf '%s\n' "--- CostMode and Codex row paths ---"
rg -n -C 8 '\b(CostMode|codex_group_row|load_codex_rows|report_from_groups|group_json|missing_pricing|unpricedModels|attach_unpriced_models|unpriced_models)\b' \
  rust/crates/ccusage-adapter-all/src/loader.rs \
  rust/crates/ccusage-adapter-all/src/report.rs \
  rust/crates/ccusage-adapter-all/src/tests.rs \
  rust/adapters/codex/src/lib.rs \
  rust/adapters/codex/src/report.rs \
  rust/crates/ccusage-core/src/output.rs \
  rust/crates/ccusage-core/src/cost.rs \
  rust/crates/ccusage-core/src/types.rs
printf '%s\n' "--- structured outlines ---"
ast-grep outline rust/crates/ccusage-adapter-all/src/loader.rs --items all --type function --match 'load_codex_rows|codex_group_row'
ast-grep outline rust/crates/ccusage-adapter-all/src/report.rs --items all --type function --match 'report_json|totals_json|sections_report_json|row_json'
ast-grep outline rust/adapters/codex/src/report.rs --items all --type function --match 'report_from_groups|group_json|print_table_from_groups'
printf '%s\n' "--- diff diagnostics ---"
git diff --check "$base"...HEAD

Length of output: 196159


@ryoppippi I reviewed commit 6707f93a and the complete PR changes.

The unified Codex path now passes shared.mode into codex_group_row. In CostMode::Display, it does not set missingPricing. Therefore, unified totals.unpricedModels is also absent.

The focused Codex JSON and table paths use the same display-mode behavior. CostMode::Auto and CostMode::Calculate still detect missing pricing for Codex usage. The new focused and unified JSON tests cover the display-mode regression.

git diff --check completed without errors. I found no actionable issues. I did not run repository tests in this inspection environment.


🧠 Learnings used
Learnt from: ryoppippi
URL: https://github.com/ccusage/ccusage/pull/1750

Timestamp: 2026-09-17T11:48:40.617Z
Learning: The Codex adapter has no stored per-record cost. In the Codex JSON report path, `CostMode::Auto` must use calculated pricing, while `CostMode::Display` must omit `totals.unpricedModels` and per-model `missingPricing` metadata because it does not perform pricing lookup.

If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

You are interacting with an AI system.

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.

JSON output gives no signal when a model has no price; cost silently reads as 0

1 participant