Skip to content

Add GPT-5.6 pricing#164

Merged
Finesssee merged 2 commits into
mainfrom
finesssee-port-gpt-56-pricing
Jul 11, 2026
Merged

Add GPT-5.6 pricing#164
Finesssee merged 2 commits into
mainfrom
finesssee-port-gpt-56-pricing

Conversation

@Finesssee

@Finesssee Finesssee commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Ports upstream aa40f1eb4 GPT-5.6 Sol, Terra, and Luna standard rates plus >272,000 whole-request long-context rates into the canonical CostUsagePricing map.
  • Normalizes gpt-5.6, openai/gpt-5.6, supported Codex suffixes, and dated aliases to gpt-5.6-sol through one final alias application.
  • Preserves per-token-count JSONL records through CodexUsageRecord, so multiple short requests do not become one incorrectly long-context-priced daily aggregate.

Upstream mapping

Upstream behavior Win-CodexBar implementation/tests
aa40f1eb4: Sol/Terra/Luna standard input, cache-read, output rates CODEX_PRICING; test_gpt56_standard_pricing
aa40f1eb4: whole-request long-context rates over 272k Optional CodexLongContextRates on the same canonical model entry; long-context and threshold tests
aa40f1eb4: gpt-5.6 aliases resolve to Sol Alias tests include combined OpenAI/Codex/date form
Per-request long-context accounting JSONL records retain token-count deltas; two 200k Sol requests total $2.00 instead of one false 400k long-context request
501e95150: stabilization No numeric GPT-5.6 rate change. Models.dev pricing-key and Pi cache invalidation are non-applicable: this port has neither subsystem.

Structural follow-up

  • Retired unused packed day/model state from CodexParseResult and CodexParserState; all four parser tests assert records.
  • Consolidated both parser record appends in record_usage.
  • Long-context rates now live on their canonical model entry. Models with no optional tier explicitly retain standard rates above the threshold.

Unsupported dimensions

  • Cache-write: current Codex JSONL records contain only input, cached-read, and output.
  • Priority: upstream derives it from separate SQLite trace metadata (service_tier and turn IDs); this port has no such scanner or record fields.
  • Pi repricing: no Pi scanner/cache exists under rust/src.
  • No zero-cost fallback was added; usage remains visible when pricing is unavailable.

Validation

  • RED/GREEN: initial GPT-5.6 rate and alias tests failed before implementation; the final-alias path failed during the structural refactor until suffix normalization retained gpt-5.6 for final aliasing.
  • Focused: cargo test --manifest-path rust/Cargo.toml gpt56 --lib (5); cargo test --manifest-path rust/Cargo.toml 'core::jsonl_scanner::tests' --lib (8).
  • Full shared: fmt check; cargo test --manifest-path rust/Cargo.toml (536 library + 1 binary); clippy -D warnings.
  • Full Tauri: fmt check; cargo test --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml (303); clippy -D warnings.
  • git diff --check passed. Frontend validation is not applicable because no frontend or bridge file changed.

Finesssee and others added 2 commits July 11, 2026 14:09
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@Finesssee
Finesssee merged commit b8e3473 into main Jul 11, 2026
2 checks passed
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