Add Claude Fable model tier#131
Conversation
|
@alexesprit is attempting to deploy a commit to the Pacific Systems Team on Vercel. A member of the Team first needs to authorize it. |
|
Warning Review limit reached
Next review available in: 53 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR extends Claude model recognition across shared helpers, usage title generation, UI model labels, and palette mappings to support Fable variants and broader Opus matching. Tests were added for the new model names and the usage submit flow. ChangesClaude Fable Model Support
Estimated code review effort: 2 (Simple) | ~12 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/web/app/api/usage/submit/route.ts`:
- Around line 339-344: The current slug-to-Claude-tier mapping (in
resolveClaudeTitleLabel) labels any slug containing
"fable","opus","sonnet","haiku" as Claude; change it so you only map those
substrings when the same slug also indicates a Claude/Anthropic namespace (e.g.,
contains "claude" or "anthropic"); update the logic that builds slugs
(models.map(...)) and the subsequent checks to require both the namespace check
and the tier substring check per slug before returning "Claude
Fable/Opus/Sonnet/Haiku", otherwise return null.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 6bd6bcc1-ff0e-424e-8a30-bf6cd81843cc
📒 Files selected for processing (4)
apps/web/__tests__/api/usage-submit.test.tsapps/web/__tests__/unit/prettify-model.test.tsapps/web/app/api/usage/submit/route.tspackages/shared/src/models.ts
PR ohong#131 added Fable labeling to the shared prettifyModel/getShareModelLabel helpers and the submit-route auto-title, but three sibling copies of the tier-label logic and both model-color maps were untouched. - post-card-image.tsx: local prettifyModel now maps claude-fable-* -> Claude Fable - recap.ts: MODEL_DISPLAY_NAMES gains claude-fable; opus key relaxed to claude-opus - ActivityCard.tsx: legacy highest-tier fallback ranks Fable above Opus - Dedicated Fable color #C2410C (deep burnt orange, top tier) in the CLI palette (theme.ts) and the web feed model-usage bar (ActivityCard.modelColor) No collection changes: ccusage already prices claude-fable-5 via LiteLLM online mode, so Fable spend flows into daily_usage.cost_usd automatically. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
apps/web/lib/share-assets/post-card-image.tsx (1)
24-38: 📐 Maintainability & Code Quality | 🔵 TrivialConsider consolidating duplicated
prettifyModellogic.This file,
ActivityCard.tsx, andpackages/shared/src/models.tseach maintain their own copy of Claude tier-matching logic. Adding Fable here required editing three separate implementations independently, and they've already drifted (e.g.ActivityCard.tsx's legacy fallback uses.includes("fable")without the/iflag, vs this file's/claude-fable/iregex). Importing the sharedprettifyModelfrompackages/shared/src/models.tswould prevent future divergence.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/web/lib/share-assets/post-card-image.tsx` around lines 24 - 38, The prettifyModel logic is duplicated and has already drifted across implementations, so update this file to reuse the shared prettifyModel from packages/shared/src/models.ts instead of maintaining a local copy. Make the post-card image path call the shared helper from the relevant rendering code, and verify any Claude tier formatting behavior stays consistent with ActivityCard.tsx and the shared models utility.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@apps/web/lib/share-assets/post-card-image.tsx`:
- Around line 24-38: The prettifyModel logic is duplicated and has already
drifted across implementations, so update this file to reuse the shared
prettifyModel from packages/shared/src/models.ts instead of maintaining a local
copy. Make the post-card image path call the shared helper from the relevant
rendering code, and verify any Claude tier formatting behavior stays consistent
with ActivityCard.tsx and the shared models utility.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: a11442a9-fe57-4e43-86bc-b8c5baf84949
📒 Files selected for processing (5)
apps/web/components/app/feed/ActivityCard.tsxapps/web/lib/share-assets/post-card-image.tsxapps/web/lib/utils/recap.tsdocs/CHANGELOG.mdpackages/cli/src/components/theme.ts
✅ Files skipped from review due to trivial changes (1)
- docs/CHANGELOG.md
Summary
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Bug Fixes
Tests