{"record":{"id":"e964cedc7d2a0363","repo":"can1357/oh-my-pi","slug":"one-or-more-tiny-title-models-failed-to-download","errorCode":null,"errorMessage":"One or more tiny title models failed to download","messagePattern":"One or more tiny title models failed to download","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/cli/tiny-models-cli.ts","lineNumber":151,"sourceCode":"\t\tlistModels(command.flags.json);\n\t\treturn;\n\t}\n\n\tconst models = resolveModels(command.model);\n\tconst results: DownloadResult[] = [];\n\ttry {\n\t\tfor (const model of models) {\n\t\t\tresults.push(await downloadOne(model, command.flags.json));\n\t\t}\n\t} finally {\n\t\tawait shutdownTinyTitleClient();\n\t}\n\n\tif (command.flags.json) {\n\t\twriteLine(JSON.stringify({ results }));\n\t}\n\tif (results.some(result => !result.ok)) {\n\t\tthrow new Error(\"One or more tiny title models failed to download\");\n\t}\n}\n","sourceCodeStart":133,"sourceCodeEnd":154,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/cli/tiny-models-cli.ts#L133-L154","documentation":"`omp tiny-models download` fetches the ONNX tiny title model(s) you asked for. After all download attempts finish, the command aggregates results and throws this aggregate error if any requested model did not download successfully. It signals that at least one model file is missing locally, even though the per-model error details were already printed (or included in the JSON output).","triggerScenarios":"Running `omp tiny-models download` (or `download <model>` / `download all`) where any DownloadResult has ok=false — e.g. network failure fetching model weights, an unsupported runtime (missing CUDA/cuDNN/onnxruntime) for a non-'all' invocation, or disk/permission errors writing the model file.","commonSituations":"Offline or proxied networks blocking the model CDN; prefetching `all` on a machine whose GPU runtime is unavailable; corrupt/incomplete cache re-download; running the command in CI without network egress.","solutions":["Re-run the command and read the per-model error line printed above the aggregate error (lines matching PI_TINY_/CUDA/cuDNN/onnxruntime are surfaced deliberately).","Install the missing runtime dependencies (e.g. CUDA/cuDNN for GPU variants) or pick a CPU model key explicitly.","Check network/proxy access to the model download host and retry.","Use `omp tiny-models list` (or --json) to see which model keys are supported on this machine and download only a usable one."],"exampleFix":"// before\nomp tiny-models download all   # fails because CUDA model can't initialize\n// after\nomp tiny-models list            # see unsupportedReason per model\nomp tiny-models download <cpu-model-key>","handlingStrategy":"try-catch","validationCode":"const models = resolveModels(args.model);\nconst supported = TINY_LOCAL_MODELS.filter(s => !s.unsupportedReason).map(s => s.key);\nconst unusable = models.filter(m => !supported.includes(m));\nif (unusable.length) console.warn(\"Likely to fail:\", unusable);","typeGuard":"function allDownloadsOk(results: DownloadResult[]): results is DownloadResult[] & { [i: number]: DownloadResult & { ok: true } } {\n  return results.every(r => r.ok);\n}","tryCatchPattern":"try {\n  await runTinyModelsCommand({ action: \"download\", flags: {} });\n} catch (err) {\n  console.error(\"Some tiny models failed to download; see per-model errors above.\", err);\n  // fall back to default CPU model\n  await runTinyModelsCommand({ action: \"download\", model: DEFAULT_TINY_TITLE_LOCAL_MODEL_KEY, flags: {} });\n}","preventionTips":["Run `omp tiny-models list` first to check unsupportedReason per model before downloading.","Prefetch with `download all` in maintenance windows with reliable network.","Pin the explicit CPU model key in CI instead of GPU variants.","Monitor disk space before large model downloads."],"tags":["cli","download","model-download","network"],"backgroundTag":"model-download-failed","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}