unslothai/unsloth · error · ValueError

family declares no prequant_filenames entry for , so a…

Error message

family {getattr(fam, 'name', fam)!r} declares no prequant_filenames entry for {scheme!r}, so a rotated checkpoint has no name the loader would ask for. Add the entry to the family table, or pass --upload-filename.

What it means

Generic HTTP failure thrown by disconnectCodexOAuth (and the shared parseErrorText helper in providers-api.ts:68-77) when DELETE /api/providers/{providerId}/oauth returns a non-2xx status and the response body carries neither a FastAPI-style `detail` nor a string `message` field. The literal text 'Request failed (${status})' is the last-resort fallback after both body formats fail to parse, so seeing it means the server returned an error with an empty or unstructured body.

Solutions

  1. Check the browser Network tab for the actual DELETE /oauth response status and raw body — the status number in the message is the real clue.
  2. If 401/403: re-authenticate the studio session (log in again) and retry the disconnect.
  3. If 404: refresh the provider list; the provider was likely already deleted, so the disconnect is moot.
  4. If 502/504: verify the backend process is up and the proxy route to it is healthy, then retry.
  5. As a developer, extend parseErrorText to include a body excerpt so the fallback is less opaque.

Example fix

// before
return `Request failed (${status})`;

// after — surface whatever the body actually was
return `Request failed (${status})${bodyText ? `: ${bodyText.slice(0, 200)}` : ''}`;
Defensive patterns

Strategy: try-catch

Type guard

function isProviderRequestError(e: unknown): e is Error {
  return e instanceof Error && /^Request failed \(\d+\)$/.test(e.message);
}

Try / catch

try {
  await disconnectCodexOAuth(providerId);
} catch (error) {
  const status = Number(/\((\d+)\)$/.exec((error as Error).message)?.[1]);
  if (status === 404) { /* provider already gone — refresh list */ }
  else if (status === 401 || status === 403) { /* re-auth */ }
  else toast.error((error as Error).message);
}

Prevention

When it happens

Trigger: DELETE /api/providers/{id}/oauth or DELETE /api/providers/{id}/oauth/flows/{flowId} returning 4xx/5xx with a body lacking `detail`/`message` — e.g. providerId not found (404 with empty body), auth session expired returning a plain-text 401, or a reverse proxy (502/504 from nginx) returning an HTML error page that fails response.json().

Common situations: Stale providerId after the provider was deleted in another tab; expired studio auth cookie so authFetch gets a 401 login redirect; backend restarted mid-disconnect; a proxy interposing an HTML 502 page between studio and the backend.

Related errors


AI-assisted analysis of unslothai/unsloth@203007d190 (2026-08-15). Data as JSON: /api/errors/917782cf88c9c2dc. Report an issue: GitHub.

Appendix: source

Thrown at scripts/build_prequant_checkpoint.py:75

    """The repo-root filename this build should publish under.

    The loader asks for the family's declared ``prequant_filenames`` name first and the derived
    ``<Model>-<SCHEME>.pt`` second, so a ROTATED artifact published under the legacy
    ``transformer_<scheme>.pt`` is either never resolved at all, or resolved as the fallback by a
    build too old to honour the rotation, which then refuses the v2 tag and drops to the dense
    download. A rotated build therefore goes to the declared name or nowhere. Plain builds keep
    the legacy name they have always used."""
    if override:
        return override
    from core.inference.diffusion_prequant import prequant_filename

    if not rotated:
        return prequant_filename(scheme)
    from core.inference.diffusion_families import family_prequant_filename

    preferred = family_prequant_filename(fam, scheme)
    if not preferred:
        raise ValueError(
            f"family {getattr(fam, 'name', fam)!r} declares no prequant_filenames entry for "
            f"{scheme!r}, so a rotated checkpoint has no name the loader would ask for. Add the "
            "entry to the family table, or pass --upload-filename."
        )
    return preferred


def main(argv = None) -> int:
    p = argparse.ArgumentParser()
    p.add_argument(
        "--base", required = True, help = "diffusers base repo (carries the transformer subfolder)"
    )
    p.add_argument("--family", required = True, help = "diffusion family name/alias (e.g. z-image)")
    p.add_argument("--scheme", required = True, help = "quant scheme: int8 | fp8 | nvfp4 | mxfp8")
    p.add_argument("--out", required = True, help = "output .pt path for the checkpoint")
    p.add_argument("--min-features", type = int, default = 512)
    p.add_argument("--dtype", default = "bfloat16", choices = ["bfloat16"])
    p.add_argument("--hf-token", default = None)

View on GitHub (pinned to 203007d190)