Skip to main content
verdict_schema_violation means a verdict run produced output that did not satisfy your JSON Schema, even after a repair attempt. Read this page to find which fields failed and how to change the schema so the run succeeds.

What happened

Route: POST /v1/runs, verdict runs.
Neon 1.1 does not serve verdict runs. Today every verdict run is refused earlier with no_route_available, so you only see this code once a model that serves verdicts is available. See Verdict runs.
A verdict run gets at most two model calls: the answer, then one repair if the answer does not validate. When the output still breaks the schema after both, or was not a JSON document at all, the run fails with this code. OpenType never returns a verdict that does not validate. This is the only error that carries an extra field: The message is always “the verdict did not satisfy the schema after the permitted attempts”. The rejected document itself is never returned. If the model served at least one call, the run is settled as failed and a replay with the same Idempotency-Key returns 200 with "state": "failed", not the error again.

How to fix

  1. Read violations. Each pointer names a field that failed. Look at that field’s rules in your schema.
  2. Loosen what failed. Common fixes: widen an enum, drop a tight pattern, relax minimum/maximum, make a rarely needed field optional, and remove anyOf or recursion where a flat object will do.
  3. Retry with a new Idempotency-Key. A changed schema is a new request. Retrying the unchanged request with a new key can succeed, because model output varies, but repeated failures on the same pointers mean the schema needs to change.

Example

Reading violations from the error body:
  • Verdict runs - schema bounds, the repair attempt and schema_enforcement.
  • invalid_verdict_schema - the 400 for a schema refused before the run.
  • Idempotency - when to reuse an Idempotency-Key and when to send a new one.
  • Error handling - a status-to-action table and a retry helper for every error.
  • Problem codes - every code, its status, and whether a retry can help.