can1357/oh-my-pi · error

Model "${parsed.planYoloInto ?? "@smol"}" not found

Error message

Model "${parsed.planYoloInto ?? "@smol"}" not found

What it means

After `--plan-yolo-into` expands the role alias (default `@smol`), main.ts calls `resolveCliModel` against the model registry. If resolution fails (no error detail from the resolver) or yields no model, it throws this message naming the requested pattern. The registry contains no model matching the given role alias or pattern.

Source

Thrown at packages/coding-agent/src/main.ts:1277

			process.stderr.write(
				`${chalk.yellow(`Warning: prewalk disabled — no API key for ${resolved.model.provider}/${resolved.model.id}`)}\n`,
			);
		} else {
			options.prewalk = { target: resolved.model, thinkingLevel: resolved.thinkingLevel };
		}
	}

	if (parsed.planYoloInto !== undefined && !parsed.planYolo) {
		throw new Error("--plan-yolo-into requires --plan-yolo");
	}
	if (parsed.planYolo) {
		const rolePattern = expandRoleAlias(parsed.planYoloInto ?? "@smol", activeSettings);
		const resolved = resolveCliModel({ cliModel: rolePattern, modelRegistry, preferences: modelMatchPreferences });
		if (resolved.warning) {
			process.stderr.write(`${chalk.yellow(`Warning: ${resolved.warning}`)}\n`);
		}
		if (resolved.error || !resolved.model) {
			throw new Error(resolved.error ?? `Model "${parsed.planYoloInto ?? "@smol"}" not found`);
		}
		if (!modelRegistry.hasConfiguredAuth(resolved.model)) {
			throw new Error(`No API key for ${resolved.model.provider}/${resolved.model.id}`);
		}
		options.planYolo = { target: resolved.model, thinkingLevel: resolved.thinkingLevel };
	}

	// Thinking level
	if (parsed.thinking) {
		options.thinkingLevel = parsed.thinking;
	} else if (
		scopedModels.length > 0 &&
		scopedModels[0].explicitThinkingLevel === true &&
		// A deferred default role resolves its own model (and any explicit
		// thinking suffix) after extensions register; seeding the fallback
		// scoped model's level here would override it in createAgentSession.
		!deferredDefaultRole &&
		!restoringSession

View on GitHub (pinned to 9690622007)

Solutions

  1. Run with a known-good alias such as `--plan-yolo` (defaults to `@smol`) to verify the feature works.
  2. Check the exact role alias/model id; fix spelling in `--plan-yolo-into`.
  3. Verify the alias exists in settings (`expandRoleAlias` resolution) and the model is present in the model registry.
  4. Ensure a provider for the model is configured/authenticated so discovery populates it.

Example fix

// before
omp --plan-yolo --plan-yolo-into @smoll

// after
omp --plan-yolo --plan-yolo-into @smol
Defensive patterns

Strategy: validation

Validate before calling

// Check the alias/model exists before launching
const { resolveCliModel } = await import("@oh-my-pi/pi-ai"); // or your registry wrapper
const resolved = resolveCliModel({ cliModel: "@smol", modelRegistry, preferences: {} });
if (resolved.error || !resolved.model) throw new Error(`Unknown model pattern: ${resolved.error}`);

Type guard

function isResolvedModel(r: { error?: string; model?: unknown }): r is { error?: undefined; model: NonNullable<typeof r.model> } {
  return !r.error && r.model != null;
}

Prevention

When it happens

Trigger: `--plan-yolo-into <pattern>` where the pattern (after `expandRoleAlias`) matches no model: unknown role alias, misspelled model id, or pattern with no candidates.

Common situations: Typos in role aliases (`@smol` vs `@small`); referencing a model not in models.json or not offered by any configured provider; custom role alias removed from settings.

Related errors


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