1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# Reference: API errors
> The error body of `rzb serve` and every status, type and code it uses.
Every error is a JSON body in OpenAI's shape, so OpenAI clients raise their usual exceptions (`openai.BadRequestError`, `openai.NotFoundError`…):
```json
{"error": {"message": "temperature must be between 0 and 2.", "type": "invalid_request_error", "param": "temperature", "code": null}}
```
| Field | Value |
| --- | --- |
| `message` | What is wrong, in plain words |
| `type` | Derived from the status (table below) |
| `param` | The request field at fault (`temperature`, `messages[2].content`, `response_format.json_schema.schema`…), or `null` |
| `code` | A stable code for some errors (table below), or `null` |
During a stream, an error after the first chunk is sent as a last event, `data: {"error": {…}}`, and the stream ends without `[DONE]`.
## Status and type
| Status | `type` | When |
| --- | --- | --- |
| 400 | `invalid_request_error` | Malformed JSON, wrong type, value out of range, refused field, unsupported constraint, wrong model kind, input too long |
| 401 | `invalid_request_error` | Missing or wrong API key |
| 403 | `permission_error` | A `/rzb/` route called from another machine |
| 404 | `invalid_request_error` | Unknown model or unknown URL |
| 409 | `invalid_request_error` | A `/rzb/` action that conflicts with the server's state: model in use, no configuration file |
| 413 | `invalid_request_error` | Body larger than 16 MiB |
| 429 | `rate_limit_error` | Too many requests waiting for one model |
| 499 | — | The client closed the connection (written in the log only; the client is gone) |
| 500 | `server_error` | The model could not be loaded, or an unexpected error (no details are leaked) |
| 503 | `server_error` | No room to load the model now |
## Codes
| Code | Status | Message (example) | Cause |
| --- | --- | --- | --- |
| `invalid_api_key` | 401 | `Incorrect or missing API key. Send it as 'Authorization: Bearer <key>'.` | `Authorization: Bearer` missing or different from the server's key |
| `model_not_found` | 404 | `The model 'qwen9' does not exist.` | Neither a declared `id` nor a Hugging Face id `org/name` |
| `unknown_url` | 404 | `Invalid URL (GET /v1/nothing)` | No such endpoint. On `/`, `/v1` and `/v1/` the message adds that `/v1` is the base URL, with `GET /v1/models` and `POST /v1/chat/completions` as examples. |
| `model_not_supported` | 400 | `the model 'org/name' is not in MLX format (no .safetensors weights)` | The cached repository has no MLX weights (GGUF…) |
| `model_not_supported` | 400 | `the model 'org/name' is of type 'mellum', which this build of razorbill cannot run …` | The model's architecture (`model_type` in its `config.json`) is unknown to this build's engine; a newer razorbill may run it |
| `queue_full` | 429 | `too many requests waiting for 'qwen3' (max_queue: 16); retry later` | More than `limits.max_queue` requests waiting |
| `server_busy` | 503 | `cannot load 'qwen3': every loaded model is busy (max_loaded_models reached); retry later` | Every loaded model is answering and `max_loaded_models` is reached |
| `insufficient_memory` | 503 | `'org/big' needs about 40.0 GB of memory, only 24.0 GB can be freed for it` | The weights exceed what can be freed within 75 % of the memory |
| `model_load_failed` | 500 | `cannot load 'qwen3': …` | Download or load failure |
| `local_only` | 403 | `/rzb/status only answers requests from the machine running the server.` | A `/rzb/` route called from another address than loopback |
| `model_busy` | 409 | `'qwen3' is in use (1 request(s) running, 2 waiting); retry once it is idle.` | `POST /rzb/models/{id}/unload` while a request holds the model or waits for it |
| `no_config_file` | 409 | `The server was started without --config: there is no file to reload.` | `POST /rzb/config/reload` on a server started without `--config` |
| `invalid_config` | 400 | `The configuration was not reloaded, the previous one stays in force. invalid configuration server.yaml …` | `POST /rzb/config/reload` with an invalid or unreadable file; the message lists its problems as `rzb config validate` does |
## Common 400 messages
| `param` | Message (example) |
| --- | --- |
| a field | `<field> must be between 0 and 2.`, `n must be 1 (one choice per request).`, `logprobs is not supported yet.` |
| `model` | `'embed' is a embedding model; this endpoint needs a chat model` |
| `messages[i].role` | `'function' is not a supported role …` |
| `messages[i].content` | `Content parts of type 'image_url' are not supported (only text, this model takes no images).` |
| `response_format.json_schema.schema` | `… uses 'uniqueItems' (at properties.tags), which strict mode cannot enforce; remove it or set strict to false.` |
| `tool_choice` | `tool_choice names nope, which is not in tools.` |
| `tool_choice` | `constrained tool calls are not supported for this model's tool-call syntax (llama3); only the <tool_call> JSON syntax (Qwen, Hermes…) is` |
| `thinking_budget` | `<model> has no known thinking protocol, so a thinking budget cannot be enforced: remove thinking_budget` |
| `input` | `input[1] has 3002 tokens; this model accepts at most 512` |
| `dimensions` | `dimensions 1000 is larger than this model's 384.` |
|