fix: recognize Fable 5 model family in usage display#230
Conversation
Usage from claude-fable-5 was falling into the 'Other' bucket of the model usage bar because the family classifier only knew Sonnet, Opus, and Haiku. Pricing already handles Fable; only display classification was behind. Add a Fable family to ModelUsageBar (styled 'highlight', present in all themes) and pass Fable model ids through normalize_model_name lowercased, matching the 4-series behavior.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughAdds Fable model recognition to model-name normalization and usage progress bars, including a dedicated style and tests for case-insensitive normalization and family rendering. ChangesFable model family support
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
ClaimVerifier: blocking findingsThe following file claims in commit messages / PR body were not actually modified on this branch:
Please update the claim or add the missing changes. |
|
The PR body doesn't claim |
Problem
When all usage comes from
claude-fable-5(Anthropic's new Claude 5 family), the model usage bar shows "Other 100%" instead of naming the model family.ModelUsageBar._family_for()only knew Sonnet, Opus, and Haiku, so Fable fell into the "Other" fallback bucket.Pricing already handles Fable (
core/pricing.pyhas afablerate entry); only the display classification was behind.Changes
ui/progress_bars.py: add aFablefamily to_FAMILY_STYLES(styledhighlight, which is defined in all three themes) and matchfablein_family_for().core/models.py: pass Fable model ids throughnormalize_model_name()lowercased, matching the existing 4-series behavior.test_normalize_model_name.Testing
pytest src/tests: 730 passed, 3 skipped. Also verified against live usage data from a Fable 5 session — the bar now showsFable 100.0%.Summary by CodeRabbit
New Features
Bug Fixes