SPB Git

Repository Public Research preview

errors.md 2.9 KB 39 lines markdown

1# Errors23| Status | Meaning | Retry? |4|---|---|---|5| 400 | Invalid request for this model or endpoint. `error.param` names the field, `error.code` the kind (`unsupported_parameter`, `unsupported_value`, `integer_below_min_value`) | No — fix it (`lint`) |6| 401 | Key missing, wrong or revoked | No |7| 403 | Key not allowed to use this model or feature | No |8| 404 | Unknown model, or the model is not served on this endpoint | No — try the Responses API |9| 429 | Rate limit, or `insufficient_quota` (billing) | Rate limit: yes, after `retry-after`. Quota: no |10| 500 / 503 | Server error or overload | Yes, with backoff |1112The SDKs retry 408, 409, 429 and 5xx twice by default. Log the `x-request-id`.1314A **refusal is not an error**: the response completes and the message contains a `refusal` part.15An **incomplete response is not an error** either: `status: "incomplete"` with16`incomplete_details.reason`.1718## Rejections seen from the live API, and the fix1920| The API says | Fix |21|---|---|22| `Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead.` | Rename (`max_output_tokens` on Responses) |23| `Unsupported parameter: 'temperature' is not supported with this model.` | Remove it, or set reasoning effort to `none` where the model has that level |24| `Unsupported value: 'temperature' does not support 0.5 with this model. Only the default (1) value is supported.` | Same, on Chat Completions |25| `Unsupported value: 'minimal' is not supported with the '…' model. Supported values are: …` | Use a listed effort level |26| `Unsupported parameter: 'reasoning.effort' is not supported with this model.` | Not a reasoning model: remove `reasoning` |27| `This model is only supported in v1/responses and not in v1/chat/completions.` / `This is not a chat model…` | Convert to the Responses API |28| `Function tools with reasoning_effort are not supported for … in /v1/chat/completions…` | Use Responses, or `reasoning_effort: "none"` |29| `Unsupported parameter: 'stop' is not supported with this model.` | Remove `stop` |30| `logprobs are not supported with reasoning models.` | Remove logprobs |31| `Invalid 'max_output_tokens': integer below minimum value. Expected a value >= 16…` | Use 16 or more |32| `Unsupported value: 'low' is not supported with the '…' model. Supported values are: 'medium'.` (`text.verbosity`) | Remove `text.verbosity` |33| `Tool choices other than 'auto' are not supported with model '…' and the following tool types: …` | Drop `tool_choice` when hosted tools are present |34| `Tool 'code_interpreter' is not supported with ….` | Remove the tool or change model |35| `Flex is not available for this model.` | Remove `service_tier: "flex"` |36| `Could not finish the message because max_tokens or model output limit was reached…` | Raise the output cap: reasoning consumed it |3738The full list with the model each text came from: `references/request-rules.md`.39
Files main
Menu

Theme