Spro adds a small number of headers to every API response so you can inspect how your request was routed. They tell you which model served the call (in the same provider-prefixed format you'd pass as model) and what the gateway did along the way; they don't expose internal details like credential identities or upstream backend URLs.
For the request side — the headers you can send, like x-spro-request-id and x-spro-cache-config — see Caching and Tracing.
Headers
| Header | Present when | Example | Meaning |
|---|---|---|---|
x-spro-request-id | Always | 20261018-abc123 | This request's id. Echoed back if you sent one on the request, otherwise generated. Quote it to support, or use it to correlate with usage logs and traces. |
x-spro-resolved-model | Always | openai/gpt-oss-120b | The canonical model slug that actually served the response, after resolution and any upgrades. |
x-spro-cache | Always | hit | What the response cache did: hit (served from cache, no model call), miss (fetched and stored), bypass (no cache config sent), or error. |
x-spro-cached-request-id | Cache hit | d167b694-b414-... | The request id of the original request that populated the cache. |
x-spro-attempts | Always | 2 | How many upstream attempts the request took. 1 means the first provider call succeeded; up to 5 after transient-failure retries. |
x-spro-upgraded-from | A model upgrade occurred | gpt-4o-2024-08-01 | The model you asked for, when Spro auto-upgraded it to its successor. Absent when you got exactly what you requested. |
x-spro-upgrade-reason | A model upgrade occurred (sent alongside x-spro-upgraded-from) | model_retired | Why the upgrade happened: model_retired (the requested model is retired) or model_deprecated (it is deprecated). |
x-spro-deprecation-notice | The served model is retiring | model 'gpt-4-turbo' is retiring (retirement_at=2026-12-01) | Advance warning that the model serving this request is scheduled for retirement. |
x-spro-fallback-from | A fallback served the request | openai/gpt-oss-120b | The model that was tried first and skipped, either because you listed a fallback chain and it failed or was retired, or because its provider failed and another provider served instead. The x-spro-resolved-model header is the one that answered. See Routing Strategies. |
retry-after | Response is 429 Too Many Requests | 5 | How many seconds to wait before retrying. Also sent on 429s surfaced from the provider. |
Reading them in code
response = client.chat.completions.with_raw_response.create( model="gpt-oss-20b", messages=[{"role": "user", "content": "hi"}],)print(response.headers.get("x-spro-resolved-model"))print(response.headers.get("x-spro-cache"))print(response.headers.get("x-spro-attempts"))Upgrades for deprecated models
If you request a model that has been retired or deprecated, Spro transparently serves its successor instead — the response body comes from the new model, and two headers tell you what happened:
x-spro-upgraded-from: gemini-2.5-prox-spro-upgrade-reason: model_retiredx-spro-resolved-model: google/gemini-3.1-pro-previewx-spro-upgraded-from is the model you asked for, x-spro-upgrade-reason is why it was swapped (model_retired or model_deprecated), and x-spro-resolved-model always names the model that actually served the response. If you want to stop relying on retired models, treat x-spro-upgraded-from as a signal to update your model config.
What Spro does not expose
We deliberately do not add:
- A provider credential or upstream API key indicator
- Any internal routing identifier, channel id, or upstream backend URL
- Any header that tells a caller which specific deployment or account served the request
Spro is a single endpoint from your application's point of view. Internal routing is our concern, not your dependency.
