feat: add provider usage center#11611
Draft
lambertjosh wants to merge 3 commits into
Draft
Conversation
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 changed
Add a secret-free Provider Usage Center shared by the CLI, TUI, SDK, and VS Code profile. Core owns provider detection, normalization, source-scoped caching, in-flight coalescing, stale fallback, and failure isolation.
The initial sources cover personal Kilo Pass state, personal auto-top-up status, Kilo-managed MiniMax plans through Cloud tRPC, and direct MiniMax coding-plan credentials. The client reuses the existing Cloud
/api/trpcprocedures and exposes cache-aware GET plus explicit refresh through the local CLI backend.Why
Users need one current-state view of plan quota and balances without exposing credentials or coupling clients to provider-specific payloads. Billing history remains in Cloud, organization-scoped Kilo data is skipped, and routing state stays separate from plan/quota state.
Dependency
Requires the Cloud procedure from Kilo-Org/cloud#4220 for managed MiniMax quota.