invalid_capability
The message text is shown in the example below.
| HTTP status | 400 |
type | invalid_request_error |
| Retry? | No, not unchanged |
| Status | In the public catalog (error-envelope.ts) |
| Extra fields | none |
When it happens
GET /v1/models?capability= names a capability that does not exist.
Example
{
"error": {
"type": "invalid_request_error",
"code": "invalid_capability",
"message": "Unknown capability filter.",
"param": null,
"request_id": "req_6f1c2a9e0b7d4c3a8e5f1b2d"
}
}How to fix it
- Check the spelling against the capability names returned in a model’s
capabilitiesobject.
Detect it in code
err = resp.json().get("error", {})
if resp.status_code == 400 and err.get("code") == "invalid_capability":
log.warning("%s (%s)", err["message"], err["request_id"]) # fix the request; do not retry unchangedRelated
Was this page helpful?