model_not_found

The message text is shown in the example below.

⚠️
Preview — this feature is being built; the design below is the spec. In the public error catalog on develop; not returned in production yet.
HTTP status404
typenot_found_error
Retry?No, not unchanged
StatusNot live / provisional
Extra fieldsnone

When it happens

model is not an id that GET /v1/models returns for this credential. Names are exact and case-sensitive. Not live yet; production falls back to the default model today.

Example

{
  "error": {
    "type": "not_found_error",
    "code": "model_not_found",
    "message": "The requested model was not found.",
    "param": null,
    "request_id": "req_6f1c2a9e0b7d4c3a8e5f1b2d"
  }
}

How to fix it

  • List models and copy the id exactly, including spaces and capitals: Amara S1.2, not amara-s1.2.
  • Keep model names in configuration and test them after each change.

Detect it in code

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