understudydocs

gateway api

Response headers

Every proxied response tells you how it was handled. These four headers make the gateway legible from your own logs — no dashboard required to answer 'what served this request?'

The legibility headers

headervaluesmeaning
x-understudy-request-idUUIDv7The correlation id. It names the capture, appears in error envelopes, and is what support will ask for.
x-understudy-modemanaged | byoWhose credential paid for the upstream call.
x-understudy-routeprimary | understudy | fallbackWhich arm served it: your provider, the routed/catalog model, or your provider after a routed attempt failed.
x-understudy-effective-modelpublic model idThe model that actually ran, after any rewrite. Compare with the model your code requested.

Using them

Log these four headers wherever you already log responses and you can answer, per request and without leaving your own observability: did the experiment arm serve this? did fallback fire during the incident? which model produced the output a user is asking about?

example response (headers excerpt)
HTTP/2 200
x-understudy-request-id: 0190a7c2-7e11-7cc3-a312-9f1b22d40e88
x-understudy-mode: managed
x-understudy-route: understudy
x-understudy-effective-model: glm-5.1