Files
claw-code/rust/crates/rusty-claude-cli
Yeachan-Heo 6fe404329d Make Rust cost reporting aware of the active model
This replaces the single default pricing assumption with a small model-aware pricing table for Sonnet, Opus, and Haiku so CLI usage output better matches the selected model. Unknown models still fall back cleanly with explicit labeling.

The change keeps pricing lightweight and local while improving the usefulness of usage/cost reporting for resumed sessions and live turns.

Constraint: Keep pricing local and dependency-free

Constraint: Preserve graceful fallback behavior for unknown model IDs

Rejected: Add a remote pricing source now | unnecessary coupling and risk for this slice

Confidence: high

Scope-risk: narrow

Reversibility: clean

Directive: If pricing tables expand later, prefer explicit model-family matching and keep fallback labeling visible

Tested: cargo fmt; cargo clippy --all-targets --all-features -- -D warnings; cargo test -q

Not-tested: Validation against live provider billing exports
2026-03-31 19:42:31 +00:00
..