Skip to content

Port upstream 0.70.0: Codex Sol repricing cutoff, Cyber rates, Daybreak aliases (stacked on #731) - #734

Open
Finesssee wants to merge 4 commits into
port/micro-0.60.4-opencodex-unpricedfrom
port/micro-0.70.0-codex-pricing
Open

Finesssee wants to merge 4 commits into
port/micro-0.60.4-opencodex-unpricedfrom
port/micro-0.70.0-codex-pricing

Conversation

@Finesssee

Copy link
Copy Markdown
Collaborator

Summary

Ports the Codex half of upstream 0.70.0 steipete#4094: GPT-5.6 Sol repricing with a dated cutoff, Cyber rates and the Daybreak aliases. Backend pricing only. Stacked on #731 (port/micro-0.60.4-opencodex-unpriced), which is stacked on #682.

Sol repricing

  • Bundled gpt-5.6-sol now bills $4 input, $0.40 cached input and $20 output per 1M tokens. Above 272K input tokens the whole request bills $8, $0.80 and $30.
  • Dated usage before 2026-08-21 keeps the prior rates: $5, $0.50 and $30, or $10, $1 and $45 above 272K. Undated usage uses the current rates.
  • Terra and Luna keep their existing 2026-07-30 cutoff. All three historical tables now come from one function, codex_historical_pricing, that mirrors upstream codexHistoricalPricing.
  • Historical rates win over the bundled table and the models.dev catalog. Custom pricing overlays are still applied first by their callers.

Cyber and Daybreak

  • gpt-5.6-cyber and gpt-5.5-cyber get bundled rates: $12.50 input, $1.25 cached input and $75 output per 1M tokens, with no long-context tier. gpt-5.6-cyber cache writes bill at $15.625 (1.25x). gpt-5.5-cyber publishes no cache-write rate, so its writes bill at the input rate.
  • gpt-daybreak-blue-latest normalizes to gpt-5.6-sol and gpt-daybreak-red-latest to gpt-5.6-cyber, after the openai/ prefix is stripped. Recorded model names stay unchanged.

Dated pricing for Pi and the workspace index

  • Pi session rows price Codex models at the UTC date of their own timestamp. A row without a timestamp uses the current rates.
  • The Codex workspace index prices each record, and each merged day, at the rates of its local day key. This matches the cost scanners.

Parity fixes found during review

  • GPT-5.6 Sol, Terra and Luna cache writes now bill at 1.25x uncached input in both tiers, like upstream gpt56Pricing. Before, only gpt-6-astra had a cache-write rate and the other models billed writes at the input rate. The Astra-only special case is gone; Astra keeps $12.50 and $25.
  • GPT-5.4 (and gpt-5.4-codex) and GPT-5.5 gain upstream's long-context tier. Above 272K input tokens the whole request bills $5, $0.50 and $22.50 for GPT-5.4, and $10, $1 and $45 for GPT-5.5. Fast mode keeps its 272K cutoff for both. This also gives Claude-routed openai/gpt-5.4 and openai/gpt-5.5 rows the bundled 272K boundary, as upstream does.

docs/PROVIDERS.md gets a "Codex model pricing" section.

Upstream reference

  • Release 0.70.0, Price aliased Antigravity and Codex models steipete/CodexBar#4094 (commit 8466920937), Codex half. The Antigravity half is lane A's port/micro-0.70.0-antigravity-pricing-aliases.
  • Tag-pinned at v0.70.0:
    • Sources/CodexBarCore/Vendored/CostUsage/CostUsagePricing.swift (gpt56Pricing, codexHistoricalPricing, normalizeCodexModel, codexCostUSD(pricing:)).
    • Sources/CodexBarCore/PiSessionCostScanner.swift and Sources/CodexBarCore/CodexLocalProjectUsageIndexer.swift.
    • Tests: CostUsagePricingTests.swift, CodexSolHistoricalPricingTests.swift, CodexAliasedModelPricingTests.swift, PiSessionCostScannerTests.swift.
    • Docs: docs/model-pricing.md and docs/codex.md.

Differences from upstream

  • Day-granular cutoffs. Upstream compares event instants against 1787270400 (Sol) and 1785369600 (Terra and Luna). Windows keys usage by calendar day. The cost scanners and the workspace index compare their local day keys. Pi rows compare the UTC date of their timestamp, which gives the same result as upstream's instant comparison.
  • Bundled rates first. As before, Windows resolves the bundled table before the models.dev catalog.
  • -codex suffix. As before, Windows strips a -codex suffix when the base model is priced.
  • Fast lane. As before, the Windows Fast cost functions take no cache-write tokens.

Not in this PR

  • The gpt-reserve to gpt-5.6-luna alias. It is not on main yet and belongs to the reserve pricing alias backlog item.
  • Upstream's Pi reconstruction of disjoint input counts.

Validation

Windows, toolchain 1.98.0, run at 6f6e9292:

  • cargo fmt --all --check: pass.
  • cargo clippy --workspace --all-targets -- -D warnings: pass.
  • Focused: cargo test -p codexbar --lib -- cost_pricing codex_costs: 73 passed.
  • cargo test -p codexbar: 2218 passed, 0 failed, 1 ignored.
  • cargo test -p codexbar-desktop-tauri: 462 passed, 1 failed. The failure is bootstrap_payload_exposes_every_provider_variant. It reads host settings and fails the same way on main; Make the bootstrap catalog test hermetic (#684) #711 fixes it.
  • New and updated tests:
    • cost_pricing_tests.rs:
      • The Sol cutoff on 2026-08-20 and 2026-08-21, dated and undated.
      • Historical Sol beating a models.dev catalog in both tiers and with Fast.
      • The Daybreak and Cyber aliases, with Cyber's bundled fallback.
      • GPT-5.6 cache writes at 1.25x in both tiers.
      • The GPT-5.4 and GPT-5.5 tier boundary at 272,000 and 272,001 input tokens.
      • Upstream's updated Sol expectations.
    • pi_session_cost.rs: rows at 2026-08-20T23:59:59Z, 2026-08-21T00:00:00Z and without a timestamp.
    • codex_workspaces/indexer.rs: the same Sol usage on 2026-08-20 and 2026-08-21.
    • codex_costs.rs: GPT-5.5 short-context and long-context costs.

Affected areas

  • Rust backend (Codex pricing, Pi and workspace cost dating)
  • Tauri shell
  • Frontend
  • Tray / float bar / settings chrome
  • Docs

UI proof

Not applicable. No UI code changes. Usage & Spend shows the new values through the existing spend contract.

Port upstream 0.70.0 steipete#4094 (Codex half): Sol drops to $4/$20 with dated
usage before 2026-08-21 keeping the $5/$30 rates, gpt-5.6-cyber and
gpt-5.5-cyber get bundled rates, and the Daybreak blue/red aliases price
as Sol and Cyber. GPT-5.6 entries now carry their 1.25x cache-write rates
like upstream gpt56Pricing, replacing the Astra-only special case.
Upstream prices Pi rows at their timestamp and builds project usage from
the dated cost cache, so pre-repricing usage keeps the rates it was billed
at. Pi rows use their UTC timestamp date; the workspace index uses its
local day keys like the cost scanners.
Upstream prices the whole GPT-5.4 request at $5/$22.50 (cache read $0.50)
and GPT-5.5 at $10/$45 (cache read $1) once input passes 272K tokens.
Fast mode keeps its 272K cutoff for both models.
@coderabbitai

coderabbitai Bot commented Oct 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: b9e2dde5-2eef-40e7-b8e2-e5e2e96a5a51

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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.

Finesssee added a commit that referenced this pull request Oct 2, 2026
Finesssee added a commit that referenced this pull request Oct 2, 2026
Finesssee added a commit that referenced this pull request Oct 2, 2026
Finesssee added a commit that referenced this pull request Oct 2, 2026
…iority assert; update priority-trace Sol expectations to post-#734 repricing rates
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.

1 participant