{"record":{"id":"4ac1170685ddec67","repo":"unslothai/unsloth","slug":"virustotal-returned-http-status-for-redact-url","errorCode":null,"errorMessage":"VirusTotal returned HTTP {status} for {_redact_url(url)}","messagePattern":"VirusTotal returned HTTP (.+?) for (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"warning","filePath":"scripts/virustotal_scan.py","lineNumber":432,"sourceCode":"            except Exception as error:  # network layer, DNS, TLS, truncated read\n                last_error = f\"{type(error).__name__}: {error}\"\n                status, payload = 0, b\"\"\n            finally:\n                self._last_request_at = self._clock()\n\n            if status == 429:\n                # Quota or minute-rate exhaustion. Exponential backoff, then retry.\n                last_error = \"429 rate limited\"\n                if attempt < max_attempts:\n                    self._backoff(backoff * (2 ** (attempt - 1)), deadline)\n                continue\n            if status == 0 or status >= 500:\n                last_error = last_error or f\"HTTP {status}\"\n                if attempt < max_attempts:\n                    self._backoff(backoff * (2 ** (attempt - 1)), deadline)\n                continue\n            if status >= 400 and status not in allow_status:\n                raise RuntimeError(f\"VirusTotal returned HTTP {status} for {_redact_url(url)}\")\n\n            if not payload:\n                return status, None\n            try:\n                return status, json.loads(payload.decode(\"utf-8\", \"replace\"))\n            except json.JSONDecodeError:\n                return status, None\n\n        raise RuntimeError(\n            f\"VirusTotal request failed after {max_attempts} attempt(s): {last_error}\"\n        )\n\n    def lookup_hash(\n        self,\n        sha256: str,\n        deadline: float | None = None,\n    ) -> object | None:\n        \"\"\"Return the existing file report, or None when VirusTotal has never seen it.","sourceCodeStart":414,"sourceCodeEnd":450,"githubUrl":"https://github.com/unslothai/unsloth/blob/203007d19051dcd2ae33876786d117c99f6b0368/scripts/virustotal_scan.py#L414-L450","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Load the model again and click Accept in the upgrade dialog so the backend installs the newer transformers release, then the load continues.","If no installable release is offered, pick a different model revision (older commit) that the current transformers supports.","Manually upgrade transformers in the backend environment and restart it, then retry the load (the validation will no longer flag it).","Pin/choose a quantized GGUF variant of the model if available — GGUF loads bypass transformers entirely."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"async function transformersNewEnough(modelId: string): Promise<boolean> {\n  const v = await validateModel({ model_path: modelId });\n  return !v.requires_transformers_upgrade;\n}","typeGuard":"function isTransformersUpgradeError(e: unknown): e is Error {\n  return e instanceof Error && /needs a newer transformers release/.test(e.message);\n}","tryCatchPattern":"try {\n  await loadModel(selection);\n} catch (error) {\n  if (isTransformersUpgradeError(error)) {\n    // re-run the load and Accept in the upgrade dialog, or upgrade transformers server-side\n  } else throw error;\n}","preventionTips":["Pre-upgrade the backend's transformers before attempting new-architecture models.","Prefer GGUF variants of new models, which bypass transformers validation.","Read the upgrade dialog rather than reflexively cancelling; Accept is required for the load to continue."],"tags":["model-loading","transformers","versions","consent","frontend"],"backgroundTag":null,"analyzedSha":"203007d19051dcd2ae33876786d117c99f6b0368","analyzedAt":"2026-08-15T02:48:39.846Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}