can1357/oh-my-pi · error · Error
Unknown tiny local model: ${model}. Expected one of: ${value
Error message
Unknown tiny local model: ${model}. Expected one of: ${values}, all What it means
`resolveModels` in the tiny-models CLI maps a model name argument to concrete tiny local model keys. `"all"` expands to every supported key; anything not in `TINY_LOCAL_MODELS` (checked by `isTinyLocalModelKey`) throws with the accepted values listed. It fails fast on invalid CLI input before any model is loaded.
Source
Thrown at packages/coding-agent/src/cli/tiny-models-cli.ts:63
.filter(line => line.length > 0) ?? [];
const first = lines[0];
if (!first) return undefined;
const details = lines.slice(1).filter(line => ACTIONABLE_DOWNLOAD_ERROR_LINE.test(line));
if (details.length === 0) return first;
return [first, ...details].join("\n");
}
export function resolveModels(model: string | undefined): TinyLocalModelKey[] {
if (!model) return [DEFAULT_TINY_TITLE_LOCAL_MODEL_KEY];
// `all` is a prefetch convenience: skip models that fail before load (unsupported
// runtime), so the bulk download stays green when every *usable* model succeeds.
if (model === "all")
return TINY_LOCAL_MODELS.filter(spec => !("unsupportedReason" in spec) || !spec.unsupportedReason).map(
spec => spec.key,
);
if (!isTinyLocalModelKey(model)) {
const values = TINY_LOCAL_MODELS.map(spec => spec.key).join(", ");
throw new Error(`Unknown tiny local model: ${model}. Expected one of: ${values}, all`);
}
return [model];
}
function listModels(json: boolean | undefined): void {
if (json) {
writeLine(JSON.stringify({ models: TINY_LOCAL_MODELS }));
return;
}
writeLine(chalk.bold("Tiny local models"));
for (const spec of TINY_LOCAL_MODELS) {
const defaultMark = spec.key === DEFAULT_TINY_TITLE_LOCAL_MODEL_KEY ? chalk.cyan(" default") : "";
writeLine(`${chalk.cyan(spec.key)}${defaultMark}`);
writeLine(` ${spec.label} — ${spec.description}`);
}
}
function makeProgressReporter(modelKey: TinyLocalModelKey, json: boolean | undefined): ProgressReporter {View on GitHub (pinned to 9690622007)
Solutions
- Run the list command (e.g. `omp tiny-models list` or with `--json`) to see valid keys
- Use the exact key from TINY_LOCAL_MODELS or `all`
- Update the CLI if the model you want was added in a newer version
- Add/extend the model spec in TINY_LOCAL_MODELS if you maintain the roster
Example fix
// before omp tiny-models bench llama3 // after omp tiny-models list # discover valid keys omp tiny-models bench <valid-key> # or: all
Defensive patterns
Strategy: validation
Validate before calling
import { TINY_LOCAL_MODELS } from "./tiny-models";
const valid = new Set([...TINY_LOCAL_MODELS.map(s => s.key), "all"]);
if (!valid.has(modelArg)) {
console.error(`Unknown tiny local model: ${modelArg}. Expected one of: ${[...valid].join(", ")}`);
process.exit(1);
} Type guard
function isTinyLocalModelKey(v: string): v is TinyLocalModelKey {
return TINY_LOCAL_MODELS.some(spec => spec.key === v);
} Try / catch
try {
const models = resolveModels(arg);
} catch (err) {
if (err instanceof Error && err.message.startsWith("Unknown tiny local model")) {
console.error(`${err.message}\nRun the list command to see supported models.`);
process.exit(1);
}
throw err;
} Prevention
- List available models before invoking bench/run commands
- Use `all` when you want every supported tiny model
- Keep CLI version in sync with documentation — model keys change between releases
When it happens
Trigger: Running a tiny-models command with a model name that isn't one of the known keys or `all` — e.g. `omp tiny-models bench gpt2` when only specific tiny keys are supported.
Common situations: Guessing model names instead of running the list command; using upstream model ids not aliased locally; copy-pasting keys from a different tool version where the roster changed.
Related errors
- invalid {} argument: {}
- invalid Zero increment value: {}
- --agents must be a positive integer
- --trusted-extension requires a non-empty, non-flag value
- --trusted-extension requires an absolute path: ${trustedPath
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/4fc19e721739cbbb.
Report an issue: GitHub.