can1357/oh-my-pi · error · Error

One or more tiny title models failed to download

Error message

One or more tiny title models failed to download

What it means

`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).

Source

Thrown at packages/coding-agent/src/cli/tiny-models-cli.ts:151

		listModels(command.flags.json);
		return;
	}

	const models = resolveModels(command.model);
	const results: DownloadResult[] = [];
	try {
		for (const model of models) {
			results.push(await downloadOne(model, command.flags.json));
		}
	} finally {
		await shutdownTinyTitleClient();
	}

	if (command.flags.json) {
		writeLine(JSON.stringify({ results }));
	}
	if (results.some(result => !result.ok)) {
		throw new Error("One or more tiny title models failed to download");
	}
}

View on GitHub (pinned to 9690622007)

Solutions

  1. 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).
  2. Install the missing runtime dependencies (e.g. CUDA/cuDNN for GPU variants) or pick a CPU model key explicitly.
  3. Check network/proxy access to the model download host and retry.
  4. Use `omp tiny-models list` (or --json) to see which model keys are supported on this machine and download only a usable one.

Example fix

// before
omp tiny-models download all   # fails because CUDA model can't initialize
// after
omp tiny-models list            # see unsupportedReason per model
omp tiny-models download <cpu-model-key>
Defensive patterns

Strategy: try-catch

Validate before calling

const models = resolveModels(args.model);
const supported = TINY_LOCAL_MODELS.filter(s => !s.unsupportedReason).map(s => s.key);
const unusable = models.filter(m => !supported.includes(m));
if (unusable.length) console.warn("Likely to fail:", unusable);

Type guard

function allDownloadsOk(results: DownloadResult[]): results is DownloadResult[] & { [i: number]: DownloadResult & { ok: true } } {
  return results.every(r => r.ok);
}

Try / catch

try {
  await runTinyModelsCommand({ action: "download", flags: {} });
} catch (err) {
  console.error("Some tiny models failed to download; see per-model errors above.", err);
  // fall back to default CPU model
  await runTinyModelsCommand({ action: "download", model: DEFAULT_TINY_TITLE_LOCAL_MODEL_KEY, flags: {} });
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31). Data as JSON: /api/errors/e964cedc7d2a0363. Report an issue: GitHub.