model_unavailable

The message text is shown in the example below.

⚠️
Preview — this feature is being built; the design below is the spec. Not in the public error catalog (error-envelope.ts). Treat as provisional; it may be renamed or folded into a catalog code.
HTTP status400
typeinvalid_request_error
Retry?No, not unchanged
StatusNot live / provisional
Extra fieldsnone

When it happens

Your organization runs zero data retention and the requested model depends on standard retention.

Example

{
  "error": {
    "type": "invalid_request_error",
    "code": "model_unavailable",
    "message": "This model requires standard data retention and isn't available for your organization's zero-data-retention configuration.",
    "param": null,
    "request_id": "req_6f1c2a9e0b7d4c3a8e5f1b2d"
  }
}

How to fix it

  • Choose another model. GET /v1/models for your key lists only models your configuration can use.
  • If you need this model, ask your organization’s owner whether zero data retention can be scoped to some workspaces.

Detect it in code

err = resp.json().get("error", {})
if resp.status_code == 400 and err.get("code") == "model_unavailable":
    log.warning("%s (%s)", err["message"], err["request_id"])  # fix the request; do not retry unchanged
Was this page helpful?