all docs
/ errors · HTTP 422

pii_model_unavailable

PII model stage could not finish and the key's pii_ner policy is refuse.

What it means

The PII model stage could not finish for this request (its budget ran out, the skill ceiling shed it, or it carried spans frozen on patterns that the background completer has not finished) and the key's skill_params.pii_ner.model_skip_policy is refuse. Nothing was sent upstream. detail.reason and x-ace-pii-skipped name the cause; detail.retryable is false — a 4xx on purpose, so an SDK does not retry it automatically into the load that cut the stage. The spans the model finished before the cut are remembered, so a later retry costs only the rest.

How to recognise it

The gateway answers HTTP 422 with x-ace-error: pii_model_unavailable on the response, and a body in the shared error envelope:

{
  "error": {
    "message": "...",
    "type": "pii_model_unavailable",
    "code": 422
  }
}

On a vendor-shaped surface (/anthropic/…, /gemini/…, /bedrock/…) the body wears that vendor's error envelope instead; the x-ace-error header is the same everywhere.

Is it ACE or the provider?

x-ace-error is present only on errors ACE originated. A vendor error relayed from upstream — a real provider 429, a provider 401 for a bad pass-through key — carries no x-ace-error, and its own type and code mean what the provider says. Read the header before deciding whether to retry, re-mint a key or surface the error.