Conversation
… Vibe Code Token totals now count consumed units (value, falling back to value_paid) across completion, chat, and vibe_code.completion; spend keeps counting billed units (value_paid, falling back to value). Other categories stay cost-only. Checked-overflow behavior applies across all three categories.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
|
Thermo-nuclear review Reviewed by Codex gpt-6-luna (xhigh); verified and validated by Claude Head reviewed: cc07049 Findings: none. The change matches the upstream 0.67.0 "mistral-plan-tokens" item: Le Chat ( Nothing needed fixing, so no follow-up commit was pushed. Validation commands were not re-run because no files changed. |
|
Validated 2026-10-02 at cc07049 (PR head):
Chain note: this PR gates #657 (Mistral plan detail) and through it #702/#717/#718; after #657 merges this head the chain is unblocked. |
Summary
Mistral token totals now count consumed units, while spend keeps counting billed units, so plan-covered usage (Le Chat, Vibe Code, included API allowance) is no longer reported as zero tokens.
BillingResponsegainschatandvibe_code.completion(JSON keyvibe_code).completion,chat, andvibe_code.completion; each model entry counts once towardmodel_count.value.or(value_paid); cost usesvalue_paid.or(value)times the price index.TokenCounts::add_lane/adderrors surface across all three categories.Upstream reference
v0.67.0) sources:Sources/CodexBarCore/Providers/Mistral/MistralModels.swift(chat,vibeCode,MistralVibeCodeUsageCategory),MistralUsageFetcher.swift(parseResponse,aggregateModel),docs/mistral.md; testsMistralTokenArithmeticTests.swift.Ported / Deferred
fixturemodel at price 0.25, value/value_paid fallback, paid-zero not hiding overflow, checked overflow across API/chat/Vibe categories, cost-only categories not summing token lanes).daily,last30DaysTokens); Win-CodexBar's Mistral provider has no daily buckets.model_countfollows the upstream loop (one increment per model entry per category), so a model name that appears in two categories is counted twice.Validation
cargo +1.98.0 fmt --all: cleancargo +1.98.0 test -p codexbar mistral -- --test-threads=4: 17 passed, 0 failed (6 new)cargo +1.98.0 clippy -p codexbar --all-targets -- -D warnings: cleancargo +1.98.0 clippy --workspace --all-targets -- -D warnings: not completed. The Tauri crate build script failed on a stale plugin-permissions path outside this worktree (...\cargo-target\cursor-cost-403\...\app_hide.toml); the Tauri crate is not touched by this PR.Affected areas
rust/src/providers/mistral/mod.rs)UI proof
Not applicable