Complete guide to all Cova-* request and response headers
The CoreValue gateway uses Cova-* headers for request-side configuration and
returns Cova-* headers on every response. Header matching is case-insensitive
(the gateway lowercases header keys before comparison), but the canonical names
below are recommended.
All examples below use the placeholder key sk-cova-XXXXXXXXXXXXXXXX and the
gateway base URL https://gateway.corevalue.dev. Authentication is always
Authorization: Bearer <COVA_API_KEY> — see
Authentication.
Arbitrary key-value metadata attached to the request for filtering, segmentation, and analytics. Multiple Cova-Property-* headers are allowed per request.
Validation
Name: hyphens are converted to underscores, then [a-zA-Z0-9_], max 64 chars. Value: max 256 chars (truncated). Invalid names are silently dropped.
JSON array of body keys to exclude from cache key computation (e.g. ignore user_id so different users share a cache entry).
Validation
Valid JSON string array. Invalid JSON is ignored (no keys stripped).
Example
Cova-Cache-Ignore-Keys: ["user_id","timestamp"]
Cache-Control (the standard HTTP header) is also read by the cache
middleware to determine TTL (s-maxage or max-age, max 365 days, default
7 days). It is not a Cova-* header but interacts with the cache subsystem.
The following Cova-* headers were supported by the legacy Cloudflare Worker
proxy and older gateway revisions. They are NOT read by the current gateway
(gateway/src/) and sending them has no effect. They are listed here only so
customers migrating from the Worker can confirm they are no longer needed.
Do not send these headers expecting gateway behavior. The current gateway
ignores them. Use the supported request headers above instead.
Header
Legacy purpose
Current replacement
Cova-Retry-Enabled
Enable per-request retries
Retries are env-configured server-side; see Error Handling
All response headers are set by the gateway on the response returned to the
SDK client. They are assembled in buildResponseHeaders() and augmented after
usage extraction.
Whether cross-provider translation was applied. "passthrough" (default) or "translated".
When Set
Always set. "translated" when CROSS_PROVIDER_TRANSLATION_ENABLED is on and the model prefix routes to a native provider (anthropic / google / bedrock).
Number of retry attempts made before the request succeeded. Set by the retry executor for observability.
When Set
Set when gateway-configured retries are enabled (env-configured server-side) and at least one retry was attempted. Absent on first-try success or when retries are disabled.
When the gateway processes a streaming request, it appends one final SSE event
after the upstream stream closes (including after data: [DONE] for
OpenAI-format providers). The frame is appended by teeStream() in
streaming.ts.
The frame is a single SSE data: line terminated by \n\n (two newlines).
The JSON payload is nested under a "cova" key so the SDK can detect it by
checking "cova" in lastChunk.
The shared contract between the TypeScript and Python SDKs (sdk/CONTRACT.md):
Field
Type
Source
requestId
string
Cova-Id header
provider
string
Cova-Provider header
model
string
Cova-Model header
status
"success" | "error"
Cova-Status header
requestCost
number?
Cova-Request-Cost (non-streaming) or final SSE event (streaming) or /meta endpoint
estimatedCost
number?
Cova-Request-Cost-Estimate (upfront, all responses)
creditsRemaining
number?
Cova-Credits-Remaining
gatewayMode
"passthrough" | "translated"?
Cova-Gateway-Mode
translationWarning
string?
Cova-Translation-Warning (comma-separated list of dropped fields, only when translated)
In the streaming final SSE frame, requestCost is set only when
usage.costUsd > 0. If no usage was extracted (e.g. upstream errored), the
field is absent and the SDK should fall back to the /meta endpoint.
For streaming requests, cost and credit fields are not available as response
headers. Use the /meta endpoint to retrieve the CovaGatewayMeta after the
stream completes: