SPB Git

Repository Public Research preview

errors.md 2.9 KB

# Errors

Status Meaning Retry?
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)
401 Key missing, wrong or revoked No
403 Key not allowed to use this model or feature No
404 Unknown model, or the model is not served on this endpoint No — try the Responses API
429 Rate limit, or insufficient_quota (billing) Rate limit: yes, after retry-after. Quota: no
500 / 503 Server error or overload Yes, with backoff

The SDKs retry 408, 409, 429 and 5xx twice by default. Log the x-request-id.

A refusal is not an error: the response completes and the message contains a refusal part. An incomplete response is not an error either: status: "incomplete" with incomplete_details.reason.

# Rejections seen from the live API, and the fix

The API says Fix
Unsupported parameter: 'max_tokens' is not supported with this model. Use 'max_completion_tokens' instead. Rename (max_output_tokens on Responses)
Unsupported parameter: 'temperature' is not supported with this model. Remove it, or set reasoning effort to none where the model has that level
Unsupported value: 'temperature' does not support 0.5 with this model. Only the default (1) value is supported. Same, on Chat Completions
Unsupported value: 'minimal' is not supported with the '…' model. Supported values are: … Use a listed effort level
Unsupported parameter: 'reasoning.effort' is not supported with this model. Not a reasoning model: remove reasoning
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
Function tools with reasoning_effort are not supported for … in /v1/chat/completions… Use Responses, or reasoning_effort: "none"
Unsupported parameter: 'stop' is not supported with this model. Remove stop
logprobs are not supported with reasoning models. Remove logprobs
Invalid 'max_output_tokens': integer below minimum value. Expected a value >= 16… Use 16 or more
Unsupported value: 'low' is not supported with the '…' model. Supported values are: 'medium'. (text.verbosity) Remove text.verbosity
Tool choices other than 'auto' are not supported with model '…' and the following tool types: … Drop tool_choice when hosted tools are present
Tool 'code_interpreter' is not supported with …. Remove the tool or change model
Flex is not available for this model. Remove service_tier: "flex"
Could not finish the message because max_tokens or model output limit was reached… Raise the output cap: reasoning consumed it

The full list with the model each text came from: references/request-rules.md.

Files main
Menu

Theme