Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,14 @@ export function updateCapability(apiKey, modelKey, ok, reason = '') {
if (ok && (account.tier === 'free' || account.tier === 'unknown')) {
registerDiscoveredFreeModel(modelKey);
}
account.tier = inferTier(account.capabilities);
// Only infer tier when we have no authoritative source. GetUserStatus
// (userStatusLastFetched) and manual override (tierManual) are both
// authoritative; inferTier only looks at canary model capabilities and
// would otherwise demote a Pro/Trial account back to 'free' as soon as
// a non-premium model (e.g. gemini-2.5-flash, gpt-4o-mini) succeeds.
if (!account.tierManual && !account.userStatusLastFetched) {
account.tier = inferTier(account.capabilities);
}
saveAccounts();
}

Expand Down