Conversation
… fallback chains - GeminiProvider: stop adding error ProviderUsage objects to the results list; only successful fetches enter the results. If all accounts fail, return a single CreateUnavailableUsage instead of per-account error cards. Removes the post-loop filter (results.Where(r => r.IsAvailable)) which was there solely to discard the objects we just built. - GeminiProvider: make OAuth client retry explicit. Replaces the implicit 'catch when clientId == CLI' silent retry with ResolveOAuthClientsToTry() + DetectPreferredOAuthClientId() so the fallback order is declared upfront and visible to callers. - ProviderUsageDisplayCatalog: combine the two sequential filter passes (ShouldShowInMainWindow + hidden items) into a single .Where() predicate. - ProviderMetadataCatalog.ResolveDisplayLabel: collapse 7-level fallback chain to 3 clear branches. Canonical providers always use definition; derived providers prefer runtime label unless definition declares overrides; unknown providers fall back to runtime label then providerId. - ProviderUsageProcessingPipeline.NormalizeUsage: enforce PlanType and IsQuotaBased from ProviderDefinition at the pipeline boundary. Definition is now the single source of truth; runtime values are only used when no definition exists (unknown/dynamic providers). - ProviderStatusPresentationCatalog: extract session auth display text resolution into ResolveSessionAuthDisplayText() named method. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Build Performance Report⏱️ Build Time: 12 minutes 📊 Comparison with main branch:
✅ Within acceptable range This is an automated performance check |
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.
Summary
ProviderDefinitionis now enforced as the authority forPlanType,IsQuotaBased, and display names at the pipeline boundary — not just at provider construction timeChanges
GeminiProvider — stop building objects you'll throw away
Error results from failed Gemini account fetches are no longer added to the
resultslist. The post-loop filterresults.Where(r => r.IsAvailable)that discarded them is removed. If all accounts fail, a singleCreateUnavailableUsageis returned.GeminiProvider — explicit OAuth client retry
The
catch when clientId == CLIsilent fallback is replaced byResolveOAuthClientsToTry()+DetectPreferredOAuthClientId(). The retry order is now declared upfront and testable.ProviderUsageDisplayCatalog — single-pass filter
The two sequential passes (
ShouldShowInMainWindowthen hidden items) are merged into one.Where()predicate.ProviderMetadataCatalog.ResolveDisplayLabel — 7 levels → 3
PreferDisplayNameOverridesForDerivedProviderIdsProviderUsageProcessingPipeline — definition enforced at pipeline boundary
PlanTypeandIsQuotaBasednow usedefinition?.PlanType ?? usage.PlanType— the definition wins. Runtime values are only a fallback for dynamic/unknown providers with no registered definition.ProviderStatusPresentationCatalog — named extraction
Session auth display text resolved in
ResolveSessionAuthDisplayText().Test plan
🤖 Generated with Claude Code