unslothai/unsloth · warning · RuntimeError

VirusTotal returned HTTP {status} for {_redact_url(url)}

Error message

VirusTotal returned HTTP {status} for {_redact_url(url)}

What it means

Thrown by use-chat-model-runtime.ts:1121-1123 via getTransformersUpgradeRequiredMessage (line 280-282) when validateModel returned requires_transformers_upgrade but the upgrade dialog path resolved without installing — the user declined the install, or the no-release fallback (custom-code models with no installable transformers version) was taken and the flow still cannot proceed. The model needs a newer transformers release than the backend has, and loading stops before any unload of the previous model triggered by the install path.

Source

Thrown at scripts/virustotal_scan.py:432

            except Exception as error:  # network layer, DNS, TLS, truncated read
                last_error = f"{type(error).__name__}: {error}"
                status, payload = 0, b""
            finally:
                self._last_request_at = self._clock()

            if status == 429:
                # Quota or minute-rate exhaustion. Exponential backoff, then retry.
                last_error = "429 rate limited"
                if attempt < max_attempts:
                    self._backoff(backoff * (2 ** (attempt - 1)), deadline)
                continue
            if status == 0 or status >= 500:
                last_error = last_error or f"HTTP {status}"
                if attempt < max_attempts:
                    self._backoff(backoff * (2 ** (attempt - 1)), deadline)
                continue
            if status >= 400 and status not in allow_status:
                raise RuntimeError(f"VirusTotal returned HTTP {status} for {_redact_url(url)}")

            if not payload:
                return status, None
            try:
                return status, json.loads(payload.decode("utf-8", "replace"))
            except json.JSONDecodeError:
                return status, None

        raise RuntimeError(
            f"VirusTotal request failed after {max_attempts} attempt(s): {last_error}"
        )

    def lookup_hash(
        self,
        sha256: str,
        deadline: float | None = None,
    ) -> object | None:
        """Return the existing file report, or None when VirusTotal has never seen it.

View on GitHub (pinned to 203007d190)

Solutions

  1. Load the model again and click Accept in the upgrade dialog so the backend installs the newer transformers release, then the load continues.
  2. If no installable release is offered, pick a different model revision (older commit) that the current transformers supports.
  3. Manually upgrade transformers in the backend environment and restart it, then retry the load (the validation will no longer flag it).
  4. Pin/choose a quantized GGUF variant of the model if available — GGUF loads bypass transformers entirely.
Defensive patterns

Strategy: try-catch

Validate before calling

async function transformersNewEnough(modelId: string): Promise<boolean> {
  const v = await validateModel({ model_path: modelId });
  return !v.requires_transformers_upgrade;
}

Type guard

function isTransformersUpgradeError(e: unknown): e is Error {
  return e instanceof Error && /needs a newer transformers release/.test(e.message);
}

Try / catch

try {
  await loadModel(selection);
} catch (error) {
  if (isTransformersUpgradeError(error)) {
    // re-run the load and Accept in the upgrade dialog, or upgrade transformers server-side
  } else throw error;
}

Prevention

When it happens

Trigger: POST validate returning requires_transformers_upgrade, then confirmTransformersUpgradeIfNeeded resolving upgraded=false — user clicked 'Cancel'/'Not now' in the transformers upgrade consent dialog, or no installable release exists for a custom-code model and the trust-remote-code fallback does not apply.

Common situations: Loading brand-new Hub models that require a transformers release newer than the pinned one; users declining the multi-GB environment change; air-gapped installs where the upgrade cannot download; models whose architecture landed only in transformers nightly.

Related errors


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