fix: disable banned tokens and handle session resets#11
Closed
Biaogo94 wants to merge 1 commit intoQuorinex:mainfrom
Closed
fix: disable banned tokens and handle session resets#11Biaogo94 wants to merge 1 commit intoQuorinex:mainfrom
Biaogo94 wants to merge 1 commit intoQuorinex:mainfrom
Conversation
Author
|
Superseded by #13, which consolidates the live-verified session/reset fixes together with the current Responses compatibility work. |
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
This change hardens token and session handling for current Freebuff behavior.
Changes
403 {"status":"banned"}so it stops participating in prewarm, maintenance, and request rotationsession_model_mismatchas a session/run invalidation signal and retry with a fresh run/sessionWhy
A banned token should not stay in the rotation pool once upstream has already rejected it permanently.
Separately, current upstream behavior can bind a session to a model. When that happens, reusing the same run/session for another model causes
session_model_mismatch, so the proxy needs to rotate both session and run instead of repeatedly retrying the same stale state.Validation
Verified on a live deployment:
disabledin/healthzz-ai/glm-5.1requests continue to succeedsession_model_mismatchnow triggers run/session invalidation instead of looping on the same stale assignmentNotes
I could not run
gofmtlocally in this workspace because the Go toolchain is not installed here, but the patch was deployed and exercised on the running service before opening this PR.