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. |
📝 WalkthroughWalkthroughThis PR extends Claude model recognition across the codebase to support Fable variants. Core model prettification functions now use case-insensitive regex matching for Fable and Opus models, the usage submit endpoint has a dedicated auto-title resolution helper, and tests cover the new variants at both unit and integration levels. ChangesClaude Fable Model Support
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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
Summary
Summary by CodeRabbit
New Features
Bug Fixes
Tests