unsupported_parameter
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: planned for preview endpoints.
| HTTP status | 400 |
type | invalid_request_error |
| Retry? | No, not unchanged |
| Status | Preview |
| Extra fields | none |
When it happens
A field is valid in general but the model does not support it, such as top_k on a model with fixed sampling.
Example
{
"error": {
"type": "invalid_request_error",
"code": "unsupported_parameter",
"message": "This parameter is not supported by the chosen model.",
"param": "top_k",
"request_id": "req_6f1c2a9e0b7d4c3a8e5f1b2d"
}
}How to fix it
- Remove the field, or pick a model whose
capabilitieslists it.
Detect it in code
err = resp.json().get("error", {})
if resp.status_code == 400 and err.get("code") == "unsupported_parameter":
log.warning("%s (%s)", err["message"], err["request_id"]) # fix the request; do not retry unchangedRelated
Was this page helpful?