Skip to content

Fix #38: Fix slow API response proxying in shard_core call_backend#39

Merged
max-tet merged 1 commit intomainfrom
clayde/issue-38-fix-streaming-proxy
Mar 22, 2026
Merged

Fix #38: Fix slow API response proxying in shard_core call_backend#39
max-tet merged 1 commit intomainfrom
clayde/issue-38-fix-streaming-proxy

Conversation

@ClaydeCode
Copy link
Copy Markdown
Contributor

Closes #38

Pass stream=True to requests.request in signed_call.py so the response
body is not buffered before being returned. Replace iter_content() in
call_backend.py with an async generator that reads 8192-byte chunks and
offloads each blocking socket read to a thread via asyncio.to_thread,
eliminating ~28s of unnecessary latency.
@max-tet max-tet force-pushed the clayde/issue-38-fix-streaming-proxy branch from 5fcf8cc to 5359ad2 Compare March 22, 2026 20:05
@max-tet max-tet merged commit 74a8406 into main Mar 22, 2026
6 checks passed
@max-tet max-tet deleted the clayde/issue-38-fix-streaming-proxy branch March 23, 2026 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix slow API response proxying in shard_core call_backend

2 participants