Fix leaderboard savings lookup after provider-key rename (#634 follow-up)#635
Merged
Conversation
PR #634 renamed the Anthropic cost-comparison provider key `claude-opus-4.6` -> `claude-fable-5` but missed one consumer: App.tsx looks up the Anthropic entry by that key to compute the `dollar_savings` value submitted to the leaderboard. After the rename `per_provider.find(p => p.provider === 'claude-opus-4.6')` returned undefined, so this path silently submitted dollar_savings = 0. Point the lookup at the new key. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Follow-up fix for a regression introduced by #634.
That PR renamed the Anthropic cost-comparison provider key
claude-opus-4.6→claude-fable-5across the backend and most frontend consumers, but missed one:App.tsxcomputes the leaderboarddollar_savingsfigure by finding the Anthropic entry by key:After the rename that
.find()returnsundefined, so this path silently submitteddollar_savings = 0to the leaderboard. This one-line fix points the lookup at the new key.How it was found
Post-merge exhaustive grep for consumers of the renamed keys (
grep '.provider ===' / 'providerMap[' / per_provider.find). This was the only remaining stale consumer — all other lookups (dashboardproviderMap,PROVIDER_COLORS) already use the new keys.Verification
tsc --noEmit— cleanclaude-opus-4.6/gpt-5.3string-literal key references remain repo-wide (theclaude-opus-4-6dashed id inCommandPalette.tsxis the real model-selector entry, intentionally unchanged).🤖 Generated with Claude Code