Skip to content

Add Claude Mythos 5 and 5.1 pricing - #996

Merged
Finesssee merged 2 commits into
mainfrom
port/claude-mythos-pricing
Oct 23, 2026
Merged

Finesssee merged 2 commits into
mainfrom
port/claude-mythos-pricing

Conversation

@Finesssee

@Finesssee Finesssee commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Port of the pricing part of upstream steipete/CodexBar steipete#4578 (4654968e9) to Win-CodexBar.

Branch: port/claude-mythos-pricing (base 96d5531e4), local commit 7e626fcbb04f6b9e40a416a3fc7070b86cedccdb. Not pushed.

Behavior

  • Adds two rows to the built-in Claude pricing table (rust/src/core/cost_pricing.rs, CLAUDE_PRICING):
    • claude-mythos-5: input 1e-5, output 5e-5, cache write 1.25e-5, cache read 1e-6 (USD per token; $10 / $50 / $12.50 / $1.00 per million).
    • claude-mythos-5-1: same, but cache read 2.5e-7 ($0.25 per million).
  • Mythos is absent from the models.dev catalog, so these built-in rows are what prices it. Other unknown Claude models keep the models.dev snapshot fallback.
  • Local cost scanning of Claude transcripts now prices Mythos usage instead of leaving it unpriced.

Not ported (macOS-specific):

  • Upstream bump of the Claude report semantics version 7 to 8 (tied to the Swift cache mechanism; no Windows equivalent identified).
  • Upstream predecessor parser hash entry (Swift-specific).

Files

  • rust/src/core/cost_pricing.rs
  • rust/src/core/cost_pricing_tests.rs: prices_claude_models extended; claude_pricing_rows snapshot extended.
  • rust/src/cost_scanner/tests/claude_rates.rs: new test claude_mythos_models_price_from_the_builtin_table.

No docs change: no Windows doc lists per-model prices.

Tests

  • claude_mythos_models_price_from_the_builtin_table: cache-read price 1.00 vs 0.25 per million, 20 tokens, both models.
  • prices_claude_models: mythos-5 and mythos-5-1 resolve to 0.035 expected cost.
  • claude_pricing_rows snapshot: both rows pinned.

Checks (local, Windows)

  • cargo fmt --all: clean.
  • cargo clippy --manifest-path rust/Cargo.toml --all-targets -- -D warnings: clean.
  • cargo test --manifest-path rust/Cargo.toml --lib cost_pricing: 41 passed.
  • cargo test --manifest-path rust/Cargo.toml --lib mythos: 1 passed.
  • cargo test --manifest-path rust/Cargo.toml --lib: 5280 passed, 0 failed, 2 ignored.
  • cargo clippy --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml --all-targets -- -D warnings: clean.
  • cargo test --manifest-path apps/desktop-tauri/src-tauri/Cargo.toml: 804 passed, 0 failed.
  • Frontend not touched; pnpm test not run for this branch.

Suggested fake-data proof

Write a local Claude transcript (synthetic) with claude-mythos-5-1 assistant usage rows: 1,000,000 input, 1,000,000 output, 1,000,000 cache-read tokens. Expected cost: $10 + $50 + $0.25 = $60.25. Seeing a non-zero cost in the cost history for that model confirms the built-in row is used.

Summary by CodeRabbit

  • New Features
    • Added built-in pricing support for Claude Mythos 5 and Mythos 5.1, including their input, output, and cache rates.

Add claude-mythos-5 and claude-mythos-5-1 to the built-in Claude pricing table. Both bill input at 10 and output at 50 per million tokens with a 12.50 cache write; Mythos 5.1 cache reads are 0.25 per million, Mythos 5 cache reads are 1.00 per million. Mythos is absent from the models.dev catalog, so the built-in rows are what prices it. Upstream report-semantics version bump and predecessor parser hash are macOS-specific and not ported.
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
📥 Commits

Reviewing files that changed from the base of the PR and between 96d5531 and 130a7db.

📒 Files selected for processing: 3
  • rust/src/core/cost_pricing.rs
  • rust/src/core/cost_pricing_tests.rs
  • rust/src/cost_scanner/tests/claude_rates.rs

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

📝 Walkthrough

The built-in Claude pricing table now includes claude-mythos-5 and claude-mythos-5-1. Tests verify their expected costs and pricing rates, including their different cache-read rates.

Changes: Claude Mythos pricing

Layer / File(s) Summary
Add Mythos rates and verify costs
rust/src/core/cost_pricing.rs, rust/src/core/cost_pricing_tests.rs, rust/src/cost_scanner/tests/claude_rates.rs
The pricing table adds both model IDs with shared input, output, and cache-creation rates and distinct cache-read rates. Tests check expected costs and bundled pricing entries.

Priority: ➖ Normal

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

Change: Feature

Merge Risk: ⚪ Minimal · up to 130a7

No concrete merge-blocking risk is established by this pricing-only change.

Pre-merge checks: Passed 8
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title is a short imperative summary that accurately describes adding pricing for Claude Mythos 5 and 5.1.
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.
Provider Data Stays Siloed Passed The pull request only adds two Claude model pricing rows and related pricing tests. The diff does not add identity, plan, account label, or email handling, and it does not add cross-provider branching…
Secrets Handled Safely Passed The PR changes only pricing code and tests. Added content contains model names, pricing values, expected test data, and a public documentation URL. No token, cookie, API key, OAuth credential, authori…
No Unapproved Dependencies Passed The pull request changes only Rust pricing source and test files. The authoritative diff contains no Cargo.toml, package.json, npm/yarn lockfile, pnpm lockfile, or packageManager changes. Maintainer a…
Ui Changes Include Windows Proof Passed The pull request changes only Rust pricing logic and tests: rust/src/core/cost_pricing.rs, rust/src/core/cost_pricing_tests.rs, and rust/src/cost_scanner/tests/claude_rates.rs. It does not chang…
Full details: Provider Data Stays Siloed

Explanation

The pull request only adds two Claude model pricing rows and related pricing tests. The diff does not add identity, plan, account label, or email handling, and it does not add cross-provider branching or matching on ProviderId values in shared code.

Full details: Secrets Handled Safely

Explanation

The PR changes only pricing code and tests. Added content contains model names, pricing values, expected test data, and a public documentation URL. No token, cookie, API key, OAuth credential, authorization header, logging sink, user-facing error, credential file, or keyring operation was added or modified. The existing secret-model test literals are unchanged context.

Full details: No Unapproved Dependencies

Explanation

The pull request changes only Rust pricing source and test files. The authoritative diff contains no Cargo.toml, package.json, npm/yarn lockfile, pnpm lockfile, or packageManager changes. Maintainer approval is therefore not required.

Full details: Ui Changes Include Windows Proof

Explanation

The pull request changes only Rust pricing logic and tests: rust/src/core/cost_pricing.rs, rust/src/core/cost_pricing_tests.rs, and rust/src/cost_scanner/tests/claude_rates.rs. It does not change Windows UI files, tray rendering, the float bar, settings, or window chrome. Windows screenshots or a fresh-build proof note are not required.

✨ Finishing Touches
📝 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.

@Finesssee

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

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.

@Finesssee

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

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.

@Finesssee
Finesssee merged commit 02a63e1 into main Oct 23, 2026
3 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