OpenAI scheduling now reads the privacy gate from the auth snapshot; cover
the GetByKeyForAuth projection so a dropped column fails here instead of
admitting accounts without privacy set.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FilterThinkingBlocks runs on every Anthropic forward. Its substring fast path
matches any request with top-level thinking config or signed thinking
history, which is nearly all Claude Code traffic, so it decoded the whole body
into a map even when nothing would be filtered.
Mirror the filter decision on borrowed gjson views, applying encoding/json's
last-wins rule for duplicate keys, and return the body untouched when no block
would be dropped. Bodies that need filtering still take the original decode
and marshal path, so output bytes are unchanged; a differential test and fuzz
target compare both paths.
On a 450 KB signed history: 1.29 ms, 904 KB, 10,629 allocs -> 0.67 ms, 0 B.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every /v1/responses request ran the automation and delegation bootstrap
normalizers, each a json.Decoder token scan plus a full map decode, and
NormalizeCompactionTriggerInputOrder decoded the whole body on each HTTP
request and WebSocket turn, although almost none of them can change it.
- Bootstrap normalizers return early unless the raw body contains
function_call_output and one of their tool names, or any \u escape that
could spell them.
- The compaction normalizer returns early when the body has neither
compaction_trigger nor a \u escape and is a valid JSON object, so invalid
or non-object bodies still report the original decode error.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
computeGeminiTextDelta returned seen+incoming for each incremental chunk, so
a long thinking, text or tool-argument block copied its whole prefix per
chunk and grew quadratically.
Keep the emitted text in a strings.Builder per block. Only storage changes:
the cumulative, duplicate/rewind and delta decisions and the returned deltas
are identical, verified against the previous implementation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Gemini native, Claude-compat, Chat Completions-compat and stream collector
paths read upstream SSE with bufio.Reader.ReadString, so a custom base_url
upstream that never sends a newline could grow one line without limit.
- Read these streams through boundedSSELineReader, which keeps line endings
and EOF semantics and enforces the configured line and event limits. An
overflow is a stream read error; no truncated prefix is forwarded.
- Thread cfg into collectGeminiSSE/collectGeminiSSEObserved.
- Antigravity ForwardUpstream reads non-stream responses with
ReadUpstreamResponseBody instead of an unlimited io.ReadAll.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each OpenAI account selection read the group row twice: once to resolve
require_privacy_set into the request, and again in selectByLoadBalance,
which ignored that result.
- Project require_privacy_set into the auth snapshot (v27) and resolve it
from the ctx group when it is the scheduled group; composite members and
other mismatches still read the repository.
- selectByLoadBalance filters on the already-resolved req.RequirePrivacySet,
so a failed group read is handled once, fail-closed, as in Select.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The auth snapshot stored "no override" and "lookup failed" both as nil, so
checkRPM fell back to SELECT rpm_override on nearly every gateway request.
Record the group whose override lookup succeeded (snapshot v26). checkRPM
trusts a nil override only for that group; lookup failures and other groups,
such as composite members, still query the database. Admin override writes
already invalidate the auth cache by group.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The decoder allocated total_length bytes straight from the upstream prelude
(up to ~4 GiB) and sliced headers by an unchecked headers_length, which could
panic in the decode goroutine outside gin's recovery and crash the process.
Reject frames whose headers exceed 128 KiB or the frame, or whose payload
exceeds 16 MiB (the AWS EventStream protocol limits), before allocating.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Async tasks inherited the ingress reservation through context.WithoutCancel,
but RequestBodyLimit releases and closes it when Submit returns. The task's
request body was a plain reader, so the gateway's read reserved against the
closed reservation and every task failed with a 503 budget error.
- Add httputil.DetachRequestBodyMemory: a reservation on the same budget that
the handler's release does not close. It takes over the retained body's
existing charge from the request and reserves only the remainder, so the
body is never counted twice; the caller releases it when the work ends.
- Submit reserves the retained body before creating the task, returning 503
with Retry-After on exhaustion instead of accepting a task that cannot run;
the task releases it when execution finishes.
- Back the task request with PrereadBody so the body is not buffered again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ApplyPatches reserves the input size before editing on every strategy
(batched Doc, single edit, sequential sjson), settles to the exact output
length, and refunds on failure, so batching no longer adds a rejection
that the unoptimized paths bypass.
- Forward holds patched outputs in a WithRequestBodyMemoryScope: a newer
output releases the superseded one and the last is returned when the
attempt ends, instead of accumulating across failovers until the handler
returns.
- A Doc edit error retries with sequential sjson; when raw edits cannot
express the patch set, Forward replays it onto the decoded map rather than
re-running ApplyPatches and failing the request.
- Snapshot reuse in CloneForBody/ReplaceBody also checks a maphash content
fingerprint, so in-place edits of shared storage reparse.
- Reuse openAIWSPayloadStringView for borrowed views and split batch path
eligibility into isOpenAIBatchPatchPath with an O(P^2) ancestor check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixes frontend-security on main for two new high advisories:
- GHSA-83rm-6c8r-g728 (vue-i18n / @intlify/* srcdoc XSS): v9 and v10
are end of life and will not be patched, so move vue-i18n and
@intlify/message-compiler to 11.4.16.
- GHSA-qr28-fpjm-wq7f (decode-uri-component quadratic DoS): add a
pnpm override to >=0.5.1; its API and types are unchanged.
vue-i18n 11 requires Node >= 22, so CI and release workflows move from
Node 20 to Node 24, matching the Docker build image.
JIT message compilation is always on since v10, so the obsolete
__INTLIFY_JIT_COMPILATION__ define is removed; the build still has no
new Function. SubscriptionPlanCard spec asserted raw keys that v9's
runtime build returned; it now asserts the rendered test messages.
go-sdk v1.4.1 fixes GO-2026-4773 (cross-site tool execution) and
GO-2026-4770 (null Unicode JSON parsing), which fail govulncheck.
v1.4.1 also adds transport-level cross-origin and Content-Type checks
that would reject requests Authenticate already accepts:
- trust the same allowed origins in the SDK's CrossOriginProtection so
CORS-allowlisted browser clients are not refused with 403;
- accept application/json with parameters (e.g. charset) by normalizing
the header, while still refusing non-JSON bodies with 415.
Signed client IDs are now about 200 characters. Show them on one line on
the consent page and in the connection list, with the full value in the
title. The random part leads, so truncated IDs still differ.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Registration was capped at 1000 pending clients site-wide while the limit
per IP was 10 per minute, so one address could exhaust the cap and block
every new MCP client.
- Issue client IDs as HMAC-signed tokens carrying the client name,
redirect URI digests and grant types. Registration writes nothing;
rows are created only when a user approves a client, so there is no
shared capacity to exhaust.
- Persist the signing key in security_secrets via the existing
get-or-create helper, cached lock-free, so instances share it.
- Drop mcp_oauth_clients from migration 249 and keep the client name on
each grant. Prune expired grants on authorization, before the owner
row is locked.
- Fix an unchecked type assertion in managementmcp tests flagged by
golangci-lint v2.14.0.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>