Skip to main content

AI fix: AI disabled

typehttps://docs.frem.sh/reference/api/errors/autofix-ai-disabled
HTTP status409 Conflict

What it means

Returned by POST /orgs/{org}/code-security/sast/findings/{id}/autofix (AI fixes for SAST findings). No fix was requested and no AI model was called.

Since 2026-10-14 the same refusal is answered with the type ai-fix-ai-disabled from POST /orgs/{org}/code-security/sast/findings/{id}/ai-fix. The paths above are deprecated and keep answering autofix-ai-disabled until 2027-10-15. Branch on either type.

Example detail message returned with this error:

  • AI fixes are off for this organisation. An owner can turn them on under SAST settings; they use only the organisation’s own model provider.

The response also carries "reason": "ai_disabled".

What to do

Turn AI fixes on with PUT /orgs/{org}/code-security/autofix/settings and {"ai_enabled": true} (scope policy:write), or in the console with AI fixes for code findings under Security › Fix › AI fix. They are off by default.

Response shape

All fremforge API errors are RFC 9457 problem+json:

{
  "type": "https://docs.frem.sh/reference/api/errors/autofix-ai-disabled",
  "title": "Conflict",
  "status": 409,
  "detail": "...",
  "reason": "ai_disabled"
}

Branch on type, not on title or detail - those are human-readable and may be reworded.