yuushabu_buyinn on X asked whether Copilot's Responses route can send
the delta too: their Usage page has Copilot at 70.4K requests, up 129 GB
for 31 GB down, since each turn went whole over HTTP. Copilot's HTTP
/responses answers previous_response_id with 400, but its Responses
WebSocket at <api>/responses takes previous_response_id (store false)
on the same connection, as Copilot Chat sends it for a model whose
supported_endpoints list "ws:/responses".
- provider: the model list remembers which models list ws:/responses
(copilotSee); SocketTurn gives a Copilot turn its socket at the API's
/responses with Copilot's own headers (CopilotSocketTurn).
- gateway: overSocket takes such a Copilot turn; the message is
{type:"response.create", initiator, ...body} without stream; the
handshake has no OpenAI-Beta or X-Initiator; the keep key adds the
Copilot session token. A status-less error frame and a refused
handshake have the turn over HTTP, as before.
- keep: Copilot's reasoning ids are Base64 (+ and /), and plainItemIDs
leaves such reasoning out of the next turn, so the real account's
second turn never matched what it kept and went whole. A Copilot turn
without its kept reasoning still carries on: Copilot keeps that
reasoning with the response.
Tests (fake Copilot, no network): TestCopilotSocketSendsTheDelta,
OnlyForItsModels, RefusedGoesOverHTTP, ErrorFrameGoesOverHTTP,
DeltaWithoutItsReasoning. Each of the first four is red on origin/main;
DeltaWithoutItsReasoning is red with the sealed skip turned off (whole
input, no previous_response_id).
Real account (owner's Copilot, sandbox HOME, wsl-run magpie-desktop):
gpt-5.3-codex over the socket, turn 2 on the kept socket with
previous_response_id and only its new input, answer right ("apple
banana"). gpt-5.5 and gpt-5.4 answer 400 "not available for integrator
vscode-chat" on that account, so weren't tried.
Run at this tree (wsl-run, magpie-desktop): gofmt -l internal/ clean; go vet
of gateway and provider for GOOS linux, windows and darwin; go test
-run "Socket|Copilot" ./internal/gateway ./internal/provider ok. The full
`go test -count=1 -timeout 45m ./...` is queued on mote behind another
session's suite and was not finished at push.