feat(quota): unify OAuth and API balance lookup - #245
Open
starrylistener wants to merge 2 commits into
Open
starrylistener wants to merge 2 commits into
starrylistener wants to merge 2 commits into
Conversation
lzt404
force-pushed
the
dev
branch
2 times, most recently
from
September 11, 2026 08:42
36b4dae to
5f203b6
Compare
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.
Overview
Move quota lookup out of the OAuth sub-navigation into a dedicated top-level page immediately after API Access. The page separates OAuth quota usage from API balances and uses the application's existing credential card and category icon styles.
API balance lookup
Support DeepSeek, StepFun, SiliconFlow, OpenRouter, and Novita credentials from the existing API Access configuration. Each OpenAI-compatible API key has its own quota card.
Opening the page loads credential metadata only. Balance requests run when the user refreshes a credential or selects Refresh All, with bounded concurrency.
Custom balance endpoints
Allow an optional balance query URL in both the API Access create/edit dialog and the quota card settings dialog.
Request and cache correctness
Management API loading
Check management access before sequentially reading enriched provider records with runtime auth-index values.
Authentication or authorization failures stop subsequent reads immediately. Ordinary provider failures are reported while healthy API sources and OAuth credentials remain available. Malformed balance metadata is isolated per record, preserving saved endpoints for other records. Provider write operations continue to require complete configuration reads.
Interface and localization
Verification