Repository navigation
fix(anthropic): keep pool session affinity across restarts and transient detours #7828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
f065612
76e427b
3958f18
dbaa5ed
8f18f60
f7848f7
b7115c8
fa692c9
7c0b3be
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,9 +28,9 @@ Anthropic 未認可自動帳號池;同一組織的帳號可能共用配額( | |
|
|
||
| 啟用時的營運契約: | ||
|
|
||
| - 上游 **429** 會讓該帳號冷卻(有 `Retry-After` 時使用它,否則用預設 backoff)、清除其 affinity, | ||
| 並可能在同一個請求內輪換到另一個合格帳號(有上限)。 | ||
| - Affinity 是**程序本機**的(proxy 重啟後就會遺失)。 | ||
| - 上游 **429** 會讓該帳號冷卻(有 `Retry-After` 時使用它,否則用預設 backoff), | ||
| 並可能在同一個請求內輪換到另一個合格帳號(有上限)。只有共享配額拒絕會清除 affinity;暫時限流會保留綁定。 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| - Affinity 可在相同設定目錄及提供者實例中跨 proxy 重啟保留(閒置 24 小時,最多 2,000 筆)。快照只存工作階段摘要及登入識別圍欄,不存原始工作階段金鑰或 token。沒有持久登入識別的舊帳號在再次登入前僅保留程序內綁定;一般 token 更新保留綁定,重新登入、移除、暫停、需要重新驗證或執行期間手動選擇帳號則使其失效。暫時限流的替代帳號不會覆寫原綁定。 | ||
| - Token 更新失敗保留既有 `needsReauth` 規則。明確的訂閱或帳號計費 403 可在輸出前切換帳號,冷卻遵循 `Retry-After` 或預設十分鐘;一般權限拒絕不切換。詳見[帳號復原](/guides/claude-code/)。 | ||
| - 如果每個合格帳號都在冷卻,proxy 會回傳 **429**(不是 401),並在已知時附上 `Retry-After`。 | ||
| - 復原(包括 429 容錯移轉)會使用 `quotaWindow` 為合格的替代帳號排序,且不改變現有的冷卻或 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: lidge-jun/opencodex
Length of output: 3553
Document 403 affinity invalidation in the French 403 paragraph.
The sentence at line 37 is inside the upstream 429 bullet, so its “Seul” wording is scoped to that context and does not establish a global rule. However, the separate French 403 sentence omits that a recognized entitlement or billing refusal clears the refused account’s affinities.
📝 Suggested fix