Skip to content

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.

HeaderWhenValue
x-plugboard-request-idEvery response12 hex characters. The same id is on the request's log lines.
x-request-idThe request sent oneThe 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-modelEvery answerThe provider/model#variant that answered. With a fallback chain, the target that won.
x-plugboard-fallbacksA fallback chain moved past a failing targetHow many targets failed before the one that answered.
x-plugboard-sessionEvery answerThe OpenCode session id of the request. See History.
x-plugboard-session-urlsessionUrl is setA link to that session's page.
x-plugboard-usageUsage recording on, not streamedinput=<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-cacheThe app uses the response cachehit or miss.
x-plugboard-affinityThe app uses prompt-cache anchorsanchor, or none when the request got no anchor.
x-plugboard-dropped-paramsSampling parameters were droppedThe dropped names, comma separated, such as temperature,top_p,top_k,seed. See dropUnsupportedParams.
x-plugboard-dropped-toolsA Responses request declared hosted toolsThe types left out, comma separated, such as web_search. See Responses tools. Streamed answers carry it too.
x-plugboard-thinkingThinking or a reasoning effort was asked for, and the model has no variant for itunavailable. The request ran without thinking.
x-plugboard-policyThe app's policy changed the requesttools-stripped: the app has tools: false and the caller's tools were removed.
x-plugboard-parallel-toolsparallel_tool_calls: falselimited: only the first tool call of the answer was kept.
x-plugboard-opencode-toolsThe app runs OpenCode tools, not streamedThe number of OpenCode tool calls that ran.
x-plugboard-structured-fallbackStructured output came from plain texttext: the model answered in text that matched the schema instead of calling respond.
x-plugboard-user-droppedThe end user name was not usable1: the user value was not kept for usage.

Errors from plugboard-owned routes (/plugboard/*) use application/problem+json. Model routes answer errors in their own API's shape. See Errors.