fix(cost): add dated model ID for Claude Sonnet 4.6#5591
Conversation
PR #5579 added `claude-sonnet-4-6` but the Anthropic API returns the dated version `claude-sonnet-4-6-20260217`. This caused $0 cost calculations since the exact string match failed. Adds the dated model ID to both the legacy cost lookup and unified models mapping. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
Claude finished @colegottdank's task —— View job PR Review Complete ✅Score: 8/10 - Good to merge, with minor suggestions for improvement AnalysisThis PR fixes a critical issue where Claude Sonnet 4.6 cost calculations were failing because the Anthropic API returns the dated version Code Quality Review✅ Strengths:
Technical Correctness
Security & Performance
Suggestions for Improvement
SummaryThis is a well-implemented fix for a high-priority customer blocking issue. The changes are minimal, correct, and follow established patterns. The fix directly addresses the stated problem without introducing any risks or breaking changes. |
Summary
Problem
PR #5579 added pricing for
claude-sonnet-4-6but the Anthropic API returns the dated versionclaude-sonnet-4-6-20260217. The cost lookup uses exact string matching, so it failed to find the model.Changes
claude-sonnet-4-6-20260217to legacy cost lookupTesting
All cost tests pass.
Priority
HIGH - Blocking customer from going live (ref: Arpit's Slack message)
🤖 Generated with Claude Code