mirror of
https://github.com/lWolvesl/claw-code.git
synced 2026-04-02 18:11:52 +08:00
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