Skip to content

Commit 6d504c8

Browse files
feat(gateway): advertise chat attachment limits on hello-ok
1 parent b6c4b2d commit 6d504c8

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

‎docs/gateway/clients.md‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,12 @@ if (attachments) {
127127
Both values are decoded per-attachment ceilings. Still check the serialized
128128
request against `policy.maxPayload`: attachments travel as base64, so a file near
129129
`maxBytes` can exceed the frame limit on its own. Older gateways omit
130-
`policy.attachments`; when it is absent, send and handle the server's typed
131-
rejection. Accepted MIME types and per-message counts are not advertised because
132-
they depend on the entrypoint and the resolved model, and the values are a
133-
connection-time snapshot, so re-read them on every reconnect.
130+
`policy.attachments`; when it is absent, send and handle the server outcome.
131+
Accepted MIME types and per-message handling are not advertised because they
132+
depend on the entrypoint and the resolved model. The gateway can return a typed
133+
rejection, while text-only model runs can omit additional images after their
134+
offload cap and still complete the request. The values are a connection-time
135+
snapshot, so re-read them on every reconnect.
134136

135137
## Recover state after reconnect
136138

‎docs/gateway/protocol.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,10 @@ Validating before send:
181181
promise the frame fits: attachments travel as base64, so a 20 MB file is about
182182
26.7 MB on the wire and exceeds the default 25 MiB frame limit on its own.
183183
3. Treat the server as authoritative for everything else. Accepted MIME types and
184-
per-message counts are deliberately not advertised because they depend on the
185-
entrypoint, the resolved model, and payload sniffing; the gateway still returns
186-
a typed rejection.
184+
per-message handling are deliberately not advertised because they depend on
185+
the entrypoint, the resolved model, and payload sniffing. The gateway can
186+
return a typed rejection, while text-only model runs can omit additional
187+
images after their offload cap and still complete the request.
187188
4. Re-read the values on every reconnect. They are a connection-time snapshot, so
188189
a live `mediaMaxMb` edit reaches existing connections only after they reconnect.
189190

0 commit comments

Comments
 (0)