Skip to content

feat(pricing): add gpt-6.1-terra fast/flex multipliers - #1975

Merged
ryoppippi merged 4 commits into
mainfrom
cursor/gpt-6-1-terra-fast-flex-c0f1
Oct 26, 2026
Merged

ryoppippi merged 4 commits into
mainfrom
cursor/gpt-6-1-terra-fast-flex-c0f1

Conversation

@ryoppippi

@ryoppippi ryoppippi commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Adds Fast (2×) and Flex (0.5×) multiplier overrides for gpt-6.1-terra, following #1855 / #1726.

Evidence (OpenAI official docs)

These match the upstream LiteLLM and models.dev values (priority 2×, flex 0.5×).

Changes

  • Added gpt-6.1-terra to fast-multiplier-overrides.json (2.0) and flex-multiplier-overrides.json (0.5).
  • Added terra to the JSON-loaded multiplier tests and to the embedded-snapshot Flex test in pricing.rs. The embedded test relies on the refreshed snapshots on main (LiteLLM dab39d7402cb), which are merged into this branch. This PR doesn't modify flake.lock or the snapshot files itself.
  • Added terra to the Codex guide's Fast model list.

Validation

With CCUSAGE_PRICING_JSON_PATH pointing at LiteLLM dab39d7402cb1e772045c5a702abe74f69f66970:

  • cargo test -p ccusage-core --lib: 189 passed
  • cargo test -p ccusage-adapter-codex: 157 passed
  • cargo fmt --all --check, cargo clippy -p ccusage-core --all-targets -- -D warnings: clean
Open in Web Open in Cursor 

Summary by CodeRabbit

  • New Features
    • Pricing now applies a 2× Fast rate and a 0.5× Flex rate to GPT-6.1 Terra.
  • Documentation
    • Fast-pricing documentation now lists GPT-6.1 Terra among models with a 2× Fast rate.

@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 13dc3aff-b335-4792-a583-a1e76c8867b7
Commits

Reviewing files that changed from the base of the PR and between 09820e5 and e74ddd7.

Files selected for processing: 1
  • rust/crates/ccusage-core/src/pricing.rs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Walkthrough

The pricing overrides now set GPT-6.1 Terra’s Fast multiplier to 2.0 and Flex multiplier to 0.5. Tests check the expected values. The guide lists Terra among models with a documented 2× Fast rate and changes the GPT-6.1 Sol link text.

Changes: GPT-6.1 Terra pricing

Layer / File(s) Summary
Add and document Terra multipliers
rust/crates/ccusage-core/src/*-multiplier-overrides.json, rust/crates/ccusage-core/src/pricing.rs, docs/guide/codex/index.md
Exact overrides set GPT-6.1 Terra’s Fast multiplier to 2.0 and Flex multiplier to 0.5. Tests check the expected values. The guide lists Terra among models with a documented 2× Fast rate and changes the GPT-6.1 Sol link text.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Feature

Merge Risk: Minimal · up to 3a49a

Merge Risk: ⚪ Minimal · up to 3a49a

The pricing and documentation changes introduce no established merge-blocking risk.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed 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 "feat(pricing): add gpt-6.1-terra fast/flex multipliers" matches the main change. The PR adds Fast (2.0) and Flex (0.5) multiplier overrides for gpt-6.1-terra in the ccusage-core JSON overri…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "feat(pricing): add gpt-6.1-terra fast/flex multipliers" matches the main change. The PR adds Fast (2.0) and Flex (0.5) multiplier overrides for gpt-6.1-terra in the ccusage-core JSON override files, updates pricing.rs tests, and updates the Codex guide's Fast-pricing list. The title names the model, the pricing feature, and both multiplier types, so a teammate scanning history would understand the primary change.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@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 PR #1975 adding Fast and Flex multiplier overrides for gpt-6.1-terra.

  • Fast override — adds gpt-6.1-terra: 2.0 to fast-multiplier-overrides.json, matching the documented Fast rate.
  • Flex override — adds gpt-6.1-terra: 0.5 to flex-multiplier-overrides.json, matching the documented Flex rate.
  • Test coverage — adds terra to the JSON-loaded fast and flex multiplier test tables in pricing.rs.
  • Docs — adds Terra to the Codex guide Fast 2x model list.

The override lookup path (SpeedMultiplierOverrides::multiplier_for with date-suffix stripping) means dated and provider-qualified terra variants inherit the base entry, consistent with sibling models. Dormancy until the LiteLLM snapshot refresh is expected and correctly left to the update-pricing workflow.

Pullfrog  | View workflow run | Using muse-spark-1.3-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 4 files

View guided diff | Turn on auto-fix | Re-trigger cubic

@pkg-pr-new

pkg-pr-new Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

ccusage

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

@ccusage/ccusage-darwin-arm64

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

@ccusage/ccusage-darwin-x64

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

@ccusage/ccusage-linux-arm64

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

@ccusage/ccusage-linux-x64

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

@ccusage/ccusage-win32-x64

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

commit: 3a49a90

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 26, 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 Updated (UTC)
❌ Deployment failed
View logs
ccusage-guide e74ddd7 Oct 26 2026, 07:27 PM

@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 since the prior pullfrog review (09820e5):

  • Embedded flex coverage — added gpt-6.1-terra to embedded_pricing_includes_all_openai_flex_models, asserting the 0.5× Flex multiplier against the embedded snapshot.
  • Main merge — merged main to pick up the refreshed LiteLLM snapshot containing terra, which the new embedded assertion relies on.

Verified the focused test embedded_pricing_includes_all_openai_flex_models passes.

Pullfrog  | View workflow run | Using muse-spark-1.3-contributor (free via Pullfrog for OSS) | 𝕏

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 09820e54d029
Base SHA: 8216c05c6e7f

Performance comparison skipped.

Base package URL was not ready before 300.000s. Fixture performance comparison requires a base package when --base-dir is not provided.

Base package: 8216c05c6e7f

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 09820e54d029
Base SHA: 8216c05c6e7f

Performance comparison skipped.

Base package URL was not ready before 300.000s. Fixture performance comparison requires a base package when --base-dir is not provided.

Base package: 8216c05c6e7f

Co-authored-by: ryoppippi <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 3a49a9082bb7
Base SHA: 8216c05c6e7f

Performance comparison skipped.

Base package URL was not ready before 300.000s. Fixture performance comparison requires a base package when --base-dir is not provided.

Base package: 8216c05c6e7f

@github-actions

Copy link
Copy Markdown
Contributor

ccusage performance comparison

PR SHA: 3a49a9082bb7
Base SHA: 8216c05c6e7f

Performance comparison skipped.

Base package URL was not ready before 300.000s. Fixture performance comparison requires a base package when --base-dir is not provided.

Base package: 8216c05c6e7f

@ryoppippi
ryoppippi merged commit d93c260 into main Oct 26, 2026
45 checks passed
@ryoppippi
ryoppippi deleted the cursor/gpt-6-1-terra-fast-flex-c0f1 branch October 26, 2026 19:56
Buster210 added a commit to Buster210/ccusage that referenced this pull request Nov 6, 2026
Upstream tip: 30b653f (2026-11-06,
chore(pricing): update models.dev snapshot)
Previous fork base: c76874e (the upstream commit this fork was synced to)

Synced 128 upstream commits on top of c76874e: 70 automated pricing
snapshot refreshes and the following meaningful ones:

  b24e7a7 docs: remove LINE MAN sponsor logo (ccusage#1910)
  a93d2fe chore: release v20.0.38 (ccusage#1938)
  d91f296 docs: add ccx to community projects (ccusage#1943)
  aa7c675 chore: release v20.0.39 (ccusage#1944)
  39fefa2 fix(cli): accept --start-of-week on top-level weekly (ccusage#1945)
  600b3c9 chore: release v20.0.40 (ccusage#1946)
  baeb991 fix(antigravity): map model ID 1402 to claude-opus-5-5 (ccusage#1948)
  06347d3 chore: release v20.0.41 (ccusage#1949)
  5649632 test(hermes): derive DeepSeek provider pricing from embedded snapshot (ccusage#1951)
  d0847af chore(deps): update node.js to >=24.22.1 (ccusage#1950)
  91dfe85 chore(deps): update pullfrog/pullfrog action to v0.1.100 (ccusage#1953)
  f335280 chore: release v20.0.42 (ccusage#1952)
  b86527d chore(deps): update rust crate rustls-webpki to 0.103.16 (ccusage#1954)
  5c85ca2 chore(deps): update pullfrog/pullfrog action to v0.1.101 (ccusage#1958)
  f268798 fix(cli): apply source-specific config in unified reports (ccusage#1959)
  37a51da chore: release v20.0.43 (ccusage#1955)
  e302366 chore(deps): update github/codeql-action action to v4.39.1 (ccusage#1960)
  7af0db6 chore(deps): update pnpm to v12.15.0 (ccusage#1961)
  730c336 chore(deps): update rust crate ureq to 3.5.0 (ccusage#1964)
  bd1a21a fix(release): publish platform packages before the wrapper (ccusage#1965)
  ca33842 chore: release v20.0.44 (ccusage#1962)
  b2c8f8b chore: remove unused npm registry gate test (ccusage#1966)
  19e71d0 chore(deps): update songmu/tagpr action to v1.21.4 (ccusage#1969)
  2a84385 fix(codex): count repeated first-response snapshots once (ccusage#1971)
  60227f2 chore(deps): update rust crate smallvec to 1.16.4 (ccusage#1973)
  3e31edd chore(deps): update hustcer/setup-nu action to v3.29 (ccusage#1974)
  d93c260 feat(pricing): add gpt-6.1-terra fast/flex multipliers (ccusage#1975)
  154e13b chore: release v20.0.45 (ccusage#1967)
  f1b50e6 chore(deps): update pullfrog/pullfrog action to v0.1.102 (ccusage#1980)
  4f1f470 perf: speed up CI and local builds (ccusage#1984)
  0bd3d19 refactor(rust): move binary-only report helpers out of ccusage-core (ccusage#1985)
  65c5837 fix(antigravity): skip unreadable conversation databases (ccusage#1992)
  6372cac chore(deps): update dependency vitepress to v2.0.0-alpha.21 (ccusage#1994)
  9a42066 chore(deps): update node.js to >=24.22.2 (ccusage#1995)
  87fa788 chore(deps): update pnpm to v12.16.0 (ccusage#1996)
  8cb2532 fix(codex): price recorded Ultrafast requests at Ultrafast rates (ccusage#1989)
  128d6a0 chore(deps): update pnpm to v12.16.1 (ccusage#1997)
  5aa9d3f chore: release v20.0.46 (ccusage#1982)
  4712880 chore(deps): update rust crate unicode-width to 0.2.3 (ccusage#1998)
  3d59863 chore(deps): update node.js to v26 (ccusage#1999)
  96e98c6 chore(deps): update dependency @types/node to v26.6.6 (ccusage#2002)
  60fac54 chore(deps): update pullfrog/pullfrog action to v0.1.103 (ccusage#2003)
  de83d19 fix(config): let space-form command sections override generic report sections (ccusage#2006)
  72b8ad4 fix(all): count OpenCode Claude Agent turns once in unified reports (ccusage#2007)
  7db7a30 test(pricing): stop the alias-precedence test depending on the LiteLLM snapshot (ccusage#2009)
  e7a7ee4 fix(all): keep sessions last active on the --until day (ccusage#2008)
  4a3da73 chore: release v20.0.47 (ccusage#2001)
  8e56c11 chore(deps): update pullfrog/pullfrog action to v0.1.104 (ccusage#2010)
  e2eddf7 chore(deps): update pullfrog/pullfrog action to v0.1.107 (ccusage#2012)
  e3d2dcb chore(deps): update pullfrog/pullfrog action to v0.1.108 (ccusage#2014)
  8995f3b chore: release v20.0.48 (ccusage#2011)
  3977fd0 chore(deps): update pullfrog/pullfrog action to v0.1.110 (ccusage#2017)
  546ae51 fix(nix): make `nix flake show` work again on nixpkgs 26.11 (ccusage#2019)
  1b5e8cc chore(deps): update kesin11/actions-timeline action to v3.2.1 (ccusage#1983)
  23c5d62 chore(deps): update rust crate jiff to 0.2.39 (ccusage#2024)
  7b7cec0 chore(deps): update rust crate ureq to 3.5.1 (ccusage#2025)
  a1e4a03 chore(deps): update pullfrog/pullfrog action to v0.1.111 (ccusage#2028)
  e84d142 chore(deps): update pnpm to v12.17.0 (ccusage#2029)

Fork wins kept: the SQLite on-disk cache with its per-namespace ledger,
--live-only and clear-cache, the pi adapter with replay suppression and
per-path namespaces, the OpenCode V2 loader (now wrapped as LinkedEntry),
the FxHash/Cow hot paths, parallel per-file loads with their single_thread
seam, the table renderer, the fork CI and tag-only release workflow, and the
pricing freshness, refresh and offline precompute paths.

Hand-resolved conflicts:

  rust/adapters/claude/src/lib.rs: upstream's DedupedEntries/pruned dedupe
    lands beside the fork's collapse_replays and requestless replay rules;
    load_daily_summaries routes through load_daily_summaries_with_detection.
  rust/adapters/opencode/{parser,loader}.rs: upstream's V2 session_message
    parsing is wrapped as the fork's LinkedEntry, and the native Claude
    session link is read from the payload so it survives a cache hit.
  rust/adapters/antigravity/src/loader.rs: upstream's rewrite is taken,
    keeping the fork's per-database outcome reporting and file order.
  rust/crates/ccusage-core/src/pricing.rs: the fork's OnceLock embedded
    loader sits beside upstream's models.dev fallback and alias resolution.
  rust/crates/ccusage/src/main.rs: upstream dispatch plus the fork's
    ClearCache command.
  rust/crates/ccusage-core/src/cache.rs: the ledger is now generic over a
    LedgerPayload trait, so it covers plain entries and OpenCode's
    entry-plus-link pairs alike.
  rust/Cargo.toml: the fork's exact `=` pins stay; jiff 0.2.39,
    smallvec 1.16.4, ureq 3.5.1, unicode-width 0.2.3, rustls-webpki
    0.103.16.
  .github/workflows/{ci,release}.yaml: the fork's design is kept.
  packages/ccusage-*/package.json (6 files) and
  rust/adapters/claude/src/daily.rs: stay deleted.
  rust/crates/ccusage-core/src/{home,last_window}.rs: upstream's crate
    split moved them to ccusage-cli and ccusage-report, with their snapshots.
  apps/ccusage/config-schema.json: regenerated from the merged Rust source
    (32 numeric minimums `0.0` -> `0`, new pi description), plus three
    snapshots regenerated in the fork layout for the codex and qwen tests.

Fixes made while landing this sync, folded in so the merge stands green:

  fix(rust): decode cache blobs written before `data_session_id`. postcard
    encodes struct fields positionally, so a field added mid-struct made
    every blob the released 20.0.36 binary wrote undecodable. A failed
    decode is not merely slow: it drops the ledger rows of deleted source
    files, which no later run can rebuild. In an isolated fixture the
    released binary still reported 101,570,002 pi tokens after the source
    files were deleted; a warm build without the decoders reported 0.
    LegacyCachedEntry and LegacyLedgerEntry decode the old layout and
    reconstruct `data_session_id` as None; decode_exact requires the whole
    buffer, so a newer blob can no longer "decode" into an older struct as
    garbage. Four regression tests cover both layouts and the tail rule.
  fix(rust): warn once per table when a cached blob decodes as no known
    layout. The files table is rebuildable; the ledger table is not, so the
    warning says to save a copy before clear-cache.
  test(opencode): isolate the Claude-agent pairing test from the developer's
    real cache; it had been writing 'agent'/'plain' ledger rows into the
    opencode-db namespace.

Version: take upstream's 20.0.48 in package.json, apps/ccusage/package.json
and docs/package.json; the Rust workspace keeps version 0.0.0.

DO NOT push a v20.0.48 tag from this fork: release.yaml would publish fork
bytes under upstream identity.
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.

2 participants