-
Notifications
You must be signed in to change notification settings - Fork 0
fix(adapters): bound inline image decoding #523
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
base: dev
Are you sure you want to change the base?
Changes from all commits
06ec553
116c2ac
07b48da
bcdf559
b0900e5
3970601
bba6322
3d53e5f
eda8754
f9e3515
6f71931
9a60256
9e9b1d3
947bae9
f7f890f
544ebee
d24ff57
9a27e86
62849df
2f3f736
3a3de88
2d4d7a2
cf456e8
c155cc7
95c4875
4d37c35
641b05a
aa05b3e
8e532c5
9f7397e
673d542
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 |
|---|---|---|
|
|
@@ -7524,7 +7524,11 @@ async function handleResponsesInner( | |
| const remainingTransientSendBudget = (budget: number): number => | ||
| Math.max(1, budget - transientSendsUsed); | ||
| try { | ||
| initialRequest = await activeAdapter.buildRequest(parsed, { headers: selectedForwardHeaders, translatorBudget }); | ||
| initialRequest = await activeAdapter.buildRequest(parsed, { | ||
| headers: selectedForwardHeaders, | ||
| translatorBudget, | ||
| abortSignal: upstream.signal, | ||
| }); | ||
|
Comment on lines
+7527
to
+7531
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.
This propagates cancellation for the initial build and the recovery rebuild, but AGENTS.md reference: src/AGENTS.md:L19-L19 Useful? React with 👍 / 👎. |
||
| refreshRequestToolAliases(initialRequest); | ||
| recordAdapterReasoning(logCtx, initialRequest); | ||
| recordAdapterTier(logCtx, initialRequest); | ||
|
|
@@ -7659,6 +7663,7 @@ async function handleResponsesInner( | |
| retryRequest = await activeAdapter.buildRequest(parsed, { | ||
| headers: selectedForwardHeaders, | ||
| translatorBudget, | ||
| abortSignal: upstream.signal, | ||
| ...(imageTierBias > 0 ? { imageTierBias } : {}), | ||
| }); | ||
| recordAdapterReasoning(logCtx, retryRequest); | ||
|
|
||
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.
The new process-wide queue is cancellable only when
abortSignalreaches this option, but the Anthropic production paths do not expose or pass it:normalizeAnthropicImagesstill accepts onlyNormalizeOptions,createAnthropicAdapter().buildRequestomitsincoming.abortSignal, and native Claude normalization omitsreq.signal. When all four slots are occupied, disconnected Anthropic requests therefore remain inimageDecodeWaiters, retain their image payloads, and later consume decode capacity, allowing cancelled traffic to build a CPU/memory backlog that delays live requests. Extend the wrapper options and thread the request signal through these callers.AGENTS.md reference: src/AGENTS.md:L19-L19
Useful? React with 👍 / 👎.