Add central auth pool load balancing#14
Draft
zzj3720 wants to merge 2 commits into
Draft
Conversation
Collaborator
Author
|
重新 review 了一遍,先别 merge。两个 sticky/auth blocker:
另外:如果任意端 logout 会 revoke 同一套 auth,refresh Validation: |
Co-authored-by: Peng Xiao <pengxiao@outlook.com>
Collaborator
Author
|
Implemented admin OAuth device-code profile login in Summary:
Validation:
|
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
AuthPoolServicefor Auth Profile selection, sticky session assignment, per-profile refresh singleflight, cooldown state, and atomic profile writeschatgptAuthTokensinjection plusaccount/chatgptAuthTokens/refreshresponse handling so refresh stays centralized in the brokerAUTH_POOL_LB=off|shadow|oninto combined/worker runtimes;onleases a profile before a turn and serializes turns while using the single shared app-server auth stateTests
Note: the targeted vitest invocation ran the full suite in this repo: 33 files / 168 tests passed.