Skip to content

Fix leaderboard savings lookup after provider-key rename (#634 follow-up)#635

Merged
jonsaadfalcon merged 1 commit into
mainfrom
fix-savings-provider-key
Jul 17, 2026
Merged

Fix leaderboard savings lookup after provider-key rename (#634 follow-up)#635
jonsaadfalcon merged 1 commit into
mainfrom
fix-savings-provider-key

Conversation

@jonsaadfalcon

Copy link
Copy Markdown
Collaborator

What

Follow-up fix for a regression introduced by #634.

That PR renamed the Anthropic cost-comparison provider key claude-opus-4.6claude-fable-5 across the backend and most frontend consumers, but missed one: App.tsx computes the leaderboard dollar_savings figure by finding the Anthropic entry by key:

const claudeEntry = data.per_provider.find((p) => p.provider === 'claude-opus-4.6');
const dollarSavings = claudeEntry ? claudeEntry.total_cost : 0;

After the rename that .find() returns undefined, so this path silently submitted dollar_savings = 0 to 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 (dashboard providerMap, PROVIDER_COLORS) already use the new keys.

Verification

  • tsc --noEmit — clean
  • Confirmed no other claude-opus-4.6 / gpt-5.3 string-literal key references remain repo-wide (the claude-opus-4-6 dashed id in CommandPalette.tsx is the real model-selector entry, intentionally unchanged).

🤖 Generated with Claude Code

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>
@jonsaadfalcon
jonsaadfalcon merged commit d5d8fdd into main Jul 17, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant