Response headers
Plugboard adds x-plugboard-* headers to model answers. They tell you what happened to a request without reading logs. A browser page can read them when its origin is in cors.origins.
A streamed answer sends its headers with the first event, so headers that need the finished answer (x-plugboard-usage, x-plugboard-opencode-tools) are only on non-streamed answers.
| Header | When | Value |
|---|---|---|
x-plugboard-request-id | Every response | 12 hex characters. The same id is on the request's log lines. |
x-request-id | The request sent one | The caller's own id, echoed. Plugboard keeps it when it is 1 to 128 characters of letters, digits and _ . : / + = -, and ignores any other value. The request's log line carries it as clientRequestId. It never replaces x-plugboard-request-id. |
x-plugboard-model | Every answer | The provider/model#variant that answered. With a fallback chain, the target that won. |
x-plugboard-fallbacks | A fallback chain moved past a failing target | How many targets failed before the one that answered. |
x-plugboard-session | Every answer | The OpenCode session id of the request. See History. |
x-plugboard-session-url | sessionUrl is set | A link to that session's page. |
x-plugboard-usage | Usage recording on, not streamed | input=<n>; output=<n>; cache_read=<n>; cache_write=<n>; cost_usd=<x>. The cost is left out for a model with no price. |
x-plugboard-cache | The app uses the response cache | hit or miss. bypass or refresh when the request asked for it (see Request headers). |
x-plugboard-affinity | The app uses prompt-cache anchors | anchor, or none when the request got no anchor. |
x-plugboard-dropped-params | Sampling parameters were dropped | The dropped names, comma separated, such as temperature,top_p,top_k,seed. See dropUnsupportedParams. |
x-plugboard-dropped-tools | A Responses request declared hosted tools | The types left out, comma separated, such as web_search. See Responses tools. Streamed answers carry it too. |
x-plugboard-thinking | Thinking or a reasoning effort was asked for, and the model has no variant for it | unavailable. The request ran without thinking. |
x-plugboard-policy | The app's policy changed the request | tools-stripped: the app has tools: false and the caller's tools were removed. |
x-plugboard-parallel-tools | parallel_tool_calls: false | limited: only the first tool call of the answer was kept. |
x-plugboard-opencode-tools | The app runs OpenCode tools, not streamed | The number of OpenCode tool calls that ran. |
x-plugboard-structured-fallback | Structured output came from plain text | text: the model answered in text that matched the schema instead of calling respond. |
x-plugboard-user-dropped | The end user name was not usable | 1: the user value was not kept for usage. |
One request header is plugboard's own: x-plugboard-tag: <tag> labels a call for usage tags. A bad value is ignored, never an error.
Errors from plugboard-owned routes (/plugboard/*) use application/problem+json. Model routes answer errors in their own API's shape. See Errors.
Request headers
These request headers change how plugboard treats one call. All are optional.
| Header | Value | Effect |
|---|---|---|
x-plugboard-cache | bypass or refresh | bypass skips the response cache lookup and store. refresh skips the lookup and stores the new answer. |
x-plugboard-cache-namespace | 1 to 64 letters, digits and _ . : / + = @ - | Keeps this request's cache entries apart from other namespaces of the same app. |
Cache-Control | no-store or no-cache | Same as bypass and refresh, when x-plugboard-cache is not sent. |
x-portkey-cache-namespace, helicone-cache-seed | As the namespace | Read as the namespace when x-plugboard-cache-namespace is not sent. |
x-portkey-cache-force-refresh | true | Same as refresh. |
The cache headers act only for an app that uses the response cache. A bad value in x-plugboard-cache or a namespace is a 400 invalid_cache_header. A browser page may send them when its origin is in cors.origins.