feat(clients): surface machine name label in client registration and assistant clients list#29310
Conversation
…tant clients list
| request.setValue(sseAcceptHeader, forHTTPHeaderField: "Accept") | ||
| request.setValue(DeviceIdStore.getOrCreate(), forHTTPHeaderField: "X-Vellum-Client-Id") | ||
| request.setValue(clientInterfaceId, forHTTPHeaderField: "X-Vellum-Interface-Id") | ||
| request.setValue(ProcessInfo.processInfo.hostName, forHTTPHeaderField: "X-Vellum-Machine-Name") |
There was a problem hiding this comment.
🟡 Missing X-Vellum-Machine-Name header in streamPost and streamPostWithRetry
The X-Vellum-Machine-Name header was added to stream() at clients/shared/Network/GatewayHTTPClient.swift:491 but not to streamPost() (line 515-528) or streamPostWithRetry() (lines 549-591, including the retry path at lines 578-591). All three methods already consistently set X-Vellum-Client-Id and X-Vellum-Interface-Id as client identity headers. This inconsistency means that any server-side code reading the machine name header from POST streaming requests (current or future) will not receive it, while GET streaming requests will. While the current server-side code only reads the header in the SSE events endpoint (served by stream()), this breaks the established pattern of sending uniform client identity headers on all streaming methods.
Prompt for agents
The X-Vellum-Machine-Name header was added to the stream() method (GET streaming) but not to streamPost() or streamPostWithRetry() (POST streaming). All three methods already set X-Vellum-Client-Id and X-Vellum-Interface-Id as client identity headers, forming a consistent pattern.
To fix the inconsistency, add request.setValue(ProcessInfo.processInfo.hostName, forHTTPHeaderField: "X-Vellum-Machine-Name") to:
1. streamPost() at line ~520, after the X-Vellum-Interface-Id line
2. streamPostWithRetry() at line ~554, after the X-Vellum-Interface-Id line (initial request)
3. streamPostWithRetry() at line ~583, after the X-Vellum-Interface-Id line (retry request)
Was this helpful? React with 👍 or 👎 to provide feedback.
96576ed
into
Credence/targeted-host-proxy
Summary
machineNamefield toClientEntryand client registration (viaX-Vellum-Machine-NameSSE header)machineNameinlist_clientsroute response andassistant clients listLABEL columnProcessInfo.processInfo.hostNameon SSE connectPart of plan: targeted-host-proxy.md (PR 1 of 8)