{
  "note": "Generated by typescript/scripts/export-docs-data.ts — do not edit by hand. Every code compiled inference answers with, from the engine public error registry (packages/engine/src/public-errors.ts). SDK RouterError ids are in sdk-errors.json.",
  "errors": [
    {
      "id": "invalid_request",
      "layer": "wire",
      "wireCode": "invalid_request",
      "httpStatus": 400,
      "hosts": [
        "gateway",
        "worker"
      ],
      "openAiType": "invalid_request_error",
      "anthropicType": "invalid_request_error",
      "googleStatus": "INVALID_ARGUMENT",
      "retryable": false,
      "cause": "invalid request",
      "fix": "Validate the body against the dialect you called (Chat Completions, Responses, Messages or Gemini): the message names the field when the gateway can.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "invalid_json",
      "layer": "wire",
      "wireCode": "invalid_json",
      "httpStatus": 400,
      "hosts": [
        "gateway",
        "worker"
      ],
      "openAiType": "invalid_request_error",
      "anthropicType": "invalid_request_error",
      "googleStatus": "INVALID_ARGUMENT",
      "retryable": false,
      "cause": "the request body is not valid JSON",
      "fix": "Send a JSON object body with Content-Type: application/json.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "previous_response_unsupported",
      "layer": "wire",
      "wireCode": "previous_response_unsupported",
      "httpStatus": 400,
      "hosts": [
        "gateway",
        "worker"
      ],
      "openAiType": "invalid_request_error",
      "anthropicType": "invalid_request_error",
      "googleStatus": "INVALID_ARGUMENT",
      "retryable": false,
      "cause": "previous_response_id is not installed for this dialect on this gateway",
      "fix": "Send the whole conversation instead of previous_response_id, or use a model and endpoint whose continuation is installed; previous_response_id needs text or item-array input.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "invalid_api_key",
      "layer": "wire",
      "wireCode": "invalid_api_key",
      "httpStatus": 401,
      "hosts": [
        "gateway",
        "worker"
      ],
      "openAiType": "invalid_request_error",
      "anthropicType": "authentication_error",
      "googleStatus": "UNAUTHENTICATED",
      "retryable": false,
      "cause": "authentication failed",
      "fix": "Send a valid API key as a bearer token, or in x-api-key on Messages routes. On the self-host gateway the master key opens only the control plane and the dashboard; mint an inference key (tokedex_ik_…) with POST /control/v1/inference-keys or in the dashboard.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "budget_exceeded",
      "layer": "wire",
      "wireCode": "budget_exceeded",
      "httpStatus": 402,
      "hosts": [
        "gateway"
      ],
      "openAiType": "insufficient_quota",
      "anthropicType": "billing_error",
      "googleStatus": "RESOURCE_EXHAUSTED",
      "retryable": false,
      "cause": "budget exceeded",
      "fix": "Wait for the budget window named in the error to reset, or ask the operator to raise the budget.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "permission_denied",
      "layer": "wire",
      "wireCode": "permission_denied",
      "httpStatus": 403,
      "hosts": [
        "gateway",
        "worker"
      ],
      "openAiType": "invalid_request_error",
      "anthropicType": "permission_error",
      "googleStatus": "PERMISSION_DENIED",
      "retryable": false,
      "cause": "permission denied",
      "fix": "Use a key whose allowed models, endpoints and workspace providers cover this request, or ask the operator to widen the key.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "price_unavailable",
      "layer": "wire",
      "wireCode": "price_unavailable",
      "httpStatus": 403,
      "hosts": [
        "gateway"
      ],
      "openAiType": "invalid_request_error",
      "anthropicType": "permission_error",
      "googleStatus": "PERMISSION_DENIED",
      "retryable": false,
      "cause": "price unavailable",
      "fix": "A budget applies to this key but the model has no price; ask the operator to price the model or remove the budget.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "key_expired",
      "layer": "wire",
      "wireCode": "key_expired",
      "httpStatus": 403,
      "hosts": [
        "gateway"
      ],
      "openAiType": "invalid_request_error",
      "anthropicType": "permission_error",
      "googleStatus": "PERMISSION_DENIED",
      "retryable": false,
      "cause": "this API key has expired",
      "fix": "Mint a new inference key, or ask the operator to extend this one.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "key_disabled",
      "layer": "wire",
      "wireCode": "key_disabled",
      "httpStatus": 403,
      "hosts": [
        "gateway"
      ],
      "openAiType": "invalid_request_error",
      "anthropicType": "permission_error",
      "googleStatus": "PERMISSION_DENIED",
      "retryable": false,
      "cause": "this API key is disabled",
      "fix": "Ask the operator to enable the key, or use another key.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "key_suspended",
      "layer": "wire",
      "wireCode": "key_suspended",
      "httpStatus": 403,
      "hosts": [
        "gateway"
      ],
      "openAiType": "invalid_request_error",
      "anthropicType": "permission_error",
      "googleStatus": "PERMISSION_DENIED",
      "retryable": false,
      "cause": "this API key is suspended; contact the gateway operator",
      "fix": "Contact the gateway operator; a suspended key cannot be used until they lift the suspension.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "policy_not_approved",
      "layer": "wire",
      "wireCode": "policy_not_approved",
      "httpStatus": 403,
      "hosts": [
        "worker"
      ],
      "openAiType": "invalid_request_error",
      "anthropicType": "permission_error",
      "googleStatus": "PERMISSION_DENIED",
      "retryable": false,
      "cause": "no production access policy is approved; the operator must approve one",
      "fix": "The operator must approve a production access policy for this release.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "not_found",
      "layer": "wire",
      "wireCode": "not_found",
      "httpStatus": 404,
      "hosts": [
        "gateway",
        "worker"
      ],
      "openAiType": "invalid_request_error",
      "anthropicType": "not_found_error",
      "googleStatus": "NOT_FOUND",
      "retryable": false,
      "cause": "not found",
      "fix": "Check the path: the route or resource is not installed on this gateway.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "model_not_found",
      "layer": "wire",
      "wireCode": "model_not_found",
      "httpStatus": 404,
      "hosts": [
        "gateway",
        "worker"
      ],
      "openAiType": "invalid_request_error",
      "anthropicType": "not_found_error",
      "googleStatus": "NOT_FOUND",
      "retryable": false,
      "cause": "model is not available on this gateway",
      "fix": "List the models this gateway serves with GET /v1/models and send one of their ids.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "previous_response_not_found",
      "layer": "wire",
      "wireCode": "previous_response_not_found",
      "httpStatus": 404,
      "hosts": [
        "gateway",
        "worker"
      ],
      "openAiType": "invalid_request_error",
      "anthropicType": "not_found_error",
      "googleStatus": "NOT_FOUND",
      "retryable": false,
      "cause": "previous_response_id is missing, expired, or outside this continuation authority",
      "fix": "Send the whole conversation, or a previous_response_id this gateway returned to the same key within the continuation retention period.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "method_not_allowed",
      "layer": "wire",
      "wireCode": "method_not_allowed",
      "httpStatus": 405,
      "hosts": [
        "worker"
      ],
      "openAiType": "invalid_request_error",
      "anthropicType": "invalid_request_error",
      "googleStatus": "UNAVAILABLE",
      "retryable": false,
      "cause": "The HTTP method is not allowed for this endpoint.",
      "fix": "Use the method the endpoint documents (POST for inference).",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "write_conflict",
      "layer": "wire",
      "wireCode": "write_conflict",
      "httpStatus": 409,
      "hosts": [
        "gateway",
        "worker"
      ],
      "openAiType": "invalid_request_error",
      "anthropicType": "invalid_request_error",
      "googleStatus": "ABORTED",
      "retryable": true,
      "cause": "configuration changed concurrently; reload the current state and retry the mutation",
      "fix": "Reload the current state and retry.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "request_too_large",
      "layer": "wire",
      "wireCode": "request_too_large",
      "httpStatus": 413,
      "hosts": [
        "gateway",
        "worker"
      ],
      "openAiType": "invalid_request_error",
      "anthropicType": "request_too_large",
      "googleStatus": "RESOURCE_EXHAUSTED",
      "retryable": false,
      "cause": "request body too large",
      "fix": "Send a smaller body: fewer or smaller inline files and images, which count after base64 encoding.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "continuation_too_large",
      "layer": "wire",
      "wireCode": "continuation_too_large",
      "httpStatus": 413,
      "hosts": [
        "gateway",
        "worker"
      ],
      "openAiType": "invalid_request_error",
      "anthropicType": "request_too_large",
      "googleStatus": "RESOURCE_EXHAUSTED",
      "retryable": false,
      "cause": "continuation state exceeds the supported limits",
      "fix": "Start a new conversation, or shorten the history.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "continuation_ceiling_reached",
      "layer": "wire",
      "wireCode": "continuation_ceiling_reached",
      "httpStatus": 413,
      "hosts": [
        "gateway",
        "worker"
      ],
      "openAiType": "invalid_request_error",
      "anthropicType": "request_too_large",
      "googleStatus": "RESOURCE_EXHAUSTED",
      "retryable": false,
      "cause": "native fallback conversation reached its continuation custody ceiling",
      "fix": "Start a new conversation, or send the history yourself without previous_response_id.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "unsupported_media_type",
      "layer": "wire",
      "wireCode": "unsupported_media_type",
      "httpStatus": 415,
      "hosts": [
        "worker"
      ],
      "openAiType": "invalid_request_error",
      "anthropicType": "invalid_request_error",
      "googleStatus": "UNAVAILABLE",
      "retryable": false,
      "cause": "Content-Type must be application/json.",
      "fix": "Send Content-Type: application/json.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "unsupported",
      "layer": "wire",
      "wireCode": "unsupported",
      "httpStatus": 422,
      "hosts": [
        "gateway",
        "worker"
      ],
      "openAiType": "invalid_request_error",
      "anthropicType": "invalid_request_error",
      "googleStatus": "FAILED_PRECONDITION",
      "retryable": false,
      "cause": "request is not supported",
      "fix": "Remove or change the feature the message names, or use a model that supports it; under a strict fidelity policy, allow the degradation or relax the policy.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "provider_not_served",
      "layer": "wire",
      "wireCode": "provider_not_served",
      "httpStatus": 422,
      "hosts": [
        "gateway"
      ],
      "openAiType": "invalid_request_error",
      "anthropicType": "invalid_request_error",
      "googleStatus": "FAILED_PRECONDITION",
      "retryable": false,
      "cause": "none of the requested providers can serve this request",
      "fix": "Name a provider from the error's providers list in x-tokedex-provider, or drop the header. The model's details in the dashboard list the providers it can use.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "rate_limited",
      "layer": "wire",
      "wireCode": "rate_limited",
      "httpStatus": 429,
      "hosts": [
        "gateway",
        "worker"
      ],
      "openAiType": "rate_limit_error",
      "anthropicType": "rate_limit_error",
      "googleStatus": "RESOURCE_EXHAUSTED",
      "retryable": true,
      "cause": "request rate limited",
      "fix": "Retry after the Retry-After interval, with backoff.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "request_cancelled",
      "layer": "wire",
      "wireCode": "request_cancelled",
      "httpStatus": 499,
      "hosts": [
        "worker"
      ],
      "openAiType": "invalid_request_error",
      "anthropicType": "invalid_request_error",
      "googleStatus": "CANCELLED",
      "retryable": false,
      "cause": "The request was cancelled.",
      "fix": "The client closed the request; nothing to fix unless it was not meant to.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "internal_error",
      "layer": "wire",
      "wireCode": "internal_error",
      "httpStatus": 500,
      "hosts": [
        "gateway",
        "worker"
      ],
      "openAiType": "server_error",
      "anthropicType": "api_error",
      "googleStatus": "INTERNAL",
      "retryable": false,
      "cause": "internal server error",
      "fix": "A gateway bug: report it with the request id.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "configuration_error",
      "layer": "wire",
      "wireCode": "configuration_error",
      "httpStatus": 500,
      "hosts": [
        "gateway",
        "worker"
      ],
      "openAiType": "server_error",
      "anthropicType": "api_error",
      "googleStatus": "INTERNAL",
      "retryable": false,
      "cause": "gateway configuration error — the operator must fix the gateway configuration",
      "fix": "The operator must fix the gateway configuration; on the self-host gateway, its log line for the request id the message names says which.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "fidelity_report_unavailable",
      "layer": "wire",
      "wireCode": "fidelity_report_unavailable",
      "httpStatus": 500,
      "hosts": [
        "gateway",
        "worker"
      ],
      "openAiType": "server_error",
      "anthropicType": "api_error",
      "googleStatus": "INTERNAL",
      "retryable": false,
      "cause": "The fidelity decision exceeds the 8000-byte response-header limit.",
      "fix": "Send the request under a stricter fidelity policy, or with fewer features that degrade.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "provider_configuration_error",
      "layer": "wire",
      "wireCode": "provider_configuration_error",
      "httpStatus": 502,
      "hosts": [
        "gateway",
        "worker"
      ],
      "openAiType": "api_error",
      "anthropicType": "api_error",
      "googleStatus": "UNAVAILABLE",
      "retryable": false,
      "cause": "upstream provider credentials are not accepted",
      "fix": "The operator must fix the provider credential or account the gateway uses for this model.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "invalid_upstream_response",
      "layer": "wire",
      "wireCode": "invalid_upstream_response",
      "httpStatus": 502,
      "hosts": [
        "gateway",
        "worker"
      ],
      "openAiType": "api_error",
      "anthropicType": "api_error",
      "googleStatus": "UNAVAILABLE",
      "retryable": true,
      "cause": "upstream returned an invalid response",
      "fix": "Retry; if it persists, the provider is answering in a shape the gateway cannot read.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "provider_unavailable",
      "layer": "wire",
      "wireCode": "provider_unavailable",
      "httpStatus": 503,
      "hosts": [
        "gateway",
        "worker"
      ],
      "openAiType": "api_error",
      "anthropicType": "api_error",
      "googleStatus": "UNAVAILABLE",
      "retryable": true,
      "cause": "upstream unavailable",
      "fix": "Retry with backoff; the provider failed or could not be reached, or every provider key this request may use is cooling down.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "router_unavailable",
      "layer": "wire",
      "wireCode": "router_unavailable",
      "httpStatus": 503,
      "hosts": [
        "gateway",
        "worker"
      ],
      "openAiType": "api_error",
      "anthropicType": "api_error",
      "googleStatus": "UNAVAILABLE",
      "retryable": false,
      "cause": "The requested router is unavailable.",
      "fix": "This router has no model it can send the request to. None of its member models is enabled here, or none has the scores the router ranks by. Enable a member model that has those scores, or request a model directly.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "continuation_capacity",
      "layer": "wire",
      "wireCode": "continuation_capacity",
      "httpStatus": 503,
      "hosts": [
        "gateway",
        "worker"
      ],
      "openAiType": "api_error",
      "anthropicType": "api_error",
      "googleStatus": "UNAVAILABLE",
      "retryable": false,
      "cause": "continuation storage capacity reached",
      "fix": "Send store: false or the history yourself; stored turns free up as they expire.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "continuation_unavailable",
      "layer": "wire",
      "wireCode": "continuation_unavailable",
      "httpStatus": 503,
      "hosts": [
        "gateway",
        "worker"
      ],
      "openAiType": "api_error",
      "anthropicType": "api_error",
      "googleStatus": "UNAVAILABLE",
      "retryable": true,
      "cause": "compiled response continuation storage is unavailable",
      "fix": "Retry with backoff, or send store: false; the continuation store did not answer in time.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "limits_unavailable",
      "layer": "wire",
      "wireCode": "limits_unavailable",
      "httpStatus": 503,
      "hosts": [
        "gateway"
      ],
      "openAiType": "api_error",
      "anthropicType": "api_error",
      "googleStatus": "UNAVAILABLE",
      "retryable": true,
      "cause": "limits unavailable",
      "fix": "Retry with backoff; the spend ledger that enforces this key's budget is unavailable.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "authorization_unavailable",
      "layer": "wire",
      "wireCode": "authorization_unavailable",
      "httpStatus": 503,
      "hosts": [
        "worker"
      ],
      "openAiType": "api_error",
      "anthropicType": "api_error",
      "googleStatus": "UNAVAILABLE",
      "retryable": true,
      "cause": "Authorization data is unavailable.",
      "fix": "Retry with backoff; the Worker could not read its authorization data.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "release_not_ready",
      "layer": "wire",
      "wireCode": "release_not_ready",
      "httpStatus": 503,
      "hosts": [
        "worker"
      ],
      "openAiType": "api_error",
      "anthropicType": "api_error",
      "googleStatus": "UNAVAILABLE",
      "retryable": true,
      "cause": "this release is still starting; retry shortly",
      "fix": "Retry shortly; the release is still starting.",
      "docsPath": "/gateway/errors-and-limits"
    },
    {
      "id": "provider_timeout",
      "layer": "wire",
      "wireCode": "provider_timeout",
      "httpStatus": 504,
      "hosts": [
        "gateway",
        "worker"
      ],
      "openAiType": "api_error",
      "anthropicType": "api_error",
      "googleStatus": "DEADLINE_EXCEEDED",
      "retryable": true,
      "cause": "upstream timed out",
      "fix": "Retry, or lower the work per request (output tokens, reasoning effort).",
      "docsPath": "/gateway/errors-and-limits"
    }
  ]
}
