fix(proxy): keep streams alive while account capacity recovers#1000
Conversation
…s-fast-fail # Conflicts: # .all-contributorsrc # README.md
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aeaf9dfc40
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 68f3154fbe
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2a2f54de55
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8ae2a6b145
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e6381c63ef
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b0a2084612
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9c1569d2c3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e370baeac9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…6#1000) * fix(proxy): keep streams alive while account capacity recovers * docs: add @softkleenex as a contributor * fix(proxy): fail fast on generic no-account selection * fix(proxy): bound stream capacity waits * docs(openspec): cover account capacity stream waits * fix(proxy): bound account capacity recovery waits * fix(proxy): use bridge budget for capacity waits * fix(proxy): tolerate legacy bridge budget settings * fix(proxy): wait on owner stream capacity hints * fix(proxy): use bridge budget for reattach waits * fix(proxy): stop bridge capacity retry after budget wait * fix(proxy): reuse bridge capacity wait after resend fallback * fix(proxy): retry workspace spend cap capacity waits * fix(proxy): wait during bridge recovery capacity retries * fix(proxy): wait after websocket failover capacity hints * fix(proxy): preserve bridge budget across capacity retries * fix(proxy): preserve bridge capacity wait state --------- Co-authored-by: Darafei Praliaskouski <me@komzpa.net>
Summary
codex.keepalive/response.in_progressframes while waiting, then retry selection after the balancer's retry hint/default intervalCovered paths
Tests
uv run python -m py_compile app/modules/proxy/_service/support.py app/modules/proxy/_service/http_bridge/mixin.py app/modules/proxy/_service/http_bridge/streaming.py app/modules/proxy/_service/websocket/mixin.py app/modules/proxy/_service/streaming/retry.py tests/unit/test_proxy_utils.py tests/unit/test_proxy_http_bridge.pyuv run ruff check app/modules/proxy/_service/support.py app/modules/proxy/_service/http_bridge/mixin.py app/modules/proxy/_service/http_bridge/streaming.py app/modules/proxy/_service/websocket/mixin.py app/modules/proxy/_service/streaming/retry.py tests/unit/test_proxy_utils.py tests/unit/test_proxy_http_bridge.pyuv run pytest tests/unit/test_proxy_utils.py tests/unit/test_proxy_http_bridge.pyuv run pytest tests/unit/test_load_balancer.py -k 'Try or rate_limit or exceeded or reset'Notes
This keeps live streams alive across long account-capacity recovery windows, but it does not add durable job persistence. A process restart, OS sleep, client disconnect, or network drop can still end the in-flight stream.