{"record":{"id":"4ee12ec614daa1ad","repo":"can1357/oh-my-pi","slug":"model-parsed-planyolointo-smol-not-foun","errorCode":null,"errorMessage":"Model \"${parsed.planYoloInto ?? \"@smol\"}\" not found","messagePattern":"Model \"(.+?)\" not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/main.ts","lineNumber":1277,"sourceCode":"\t\t\tprocess.stderr.write(\n\t\t\t\t`${chalk.yellow(`Warning: prewalk disabled — no API key for ${resolved.model.provider}/${resolved.model.id}`)}\\n`,\n\t\t\t);\n\t\t} else {\n\t\t\toptions.prewalk = { target: resolved.model, thinkingLevel: resolved.thinkingLevel };\n\t\t}\n\t}\n\n\tif (parsed.planYoloInto !== undefined && !parsed.planYolo) {\n\t\tthrow new Error(\"--plan-yolo-into requires --plan-yolo\");\n\t}\n\tif (parsed.planYolo) {\n\t\tconst rolePattern = expandRoleAlias(parsed.planYoloInto ?? \"@smol\", activeSettings);\n\t\tconst resolved = resolveCliModel({ cliModel: rolePattern, modelRegistry, preferences: modelMatchPreferences });\n\t\tif (resolved.warning) {\n\t\t\tprocess.stderr.write(`${chalk.yellow(`Warning: ${resolved.warning}`)}\\n`);\n\t\t}\n\t\tif (resolved.error || !resolved.model) {\n\t\t\tthrow new Error(resolved.error ?? `Model \"${parsed.planYoloInto ?? \"@smol\"}\" not found`);\n\t\t}\n\t\tif (!modelRegistry.hasConfiguredAuth(resolved.model)) {\n\t\t\tthrow new Error(`No API key for ${resolved.model.provider}/${resolved.model.id}`);\n\t\t}\n\t\toptions.planYolo = { target: resolved.model, thinkingLevel: resolved.thinkingLevel };\n\t}\n\n\t// Thinking level\n\tif (parsed.thinking) {\n\t\toptions.thinkingLevel = parsed.thinking;\n\t} else if (\n\t\tscopedModels.length > 0 &&\n\t\tscopedModels[0].explicitThinkingLevel === true &&\n\t\t// A deferred default role resolves its own model (and any explicit\n\t\t// thinking suffix) after extensions register; seeding the fallback\n\t\t// scoped model's level here would override it in createAgentSession.\n\t\t!deferredDefaultRole &&\n\t\t!restoringSession","sourceCodeStart":1259,"sourceCodeEnd":1295,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/main.ts#L1259-L1295","documentation":"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.","triggerScenarios":"`--plan-yolo-into <pattern>` where the pattern (after `expandRoleAlias`) matches no model: unknown role alias, misspelled model id, or pattern with no candidates.","commonSituations":"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.","solutions":["Run with a known-good alias such as `--plan-yolo` (defaults to `@smol`) to verify the feature works.","Check the exact role alias/model id; fix spelling in `--plan-yolo-into`.","Verify the alias exists in settings (`expandRoleAlias` resolution) and the model is present in the model registry.","Ensure a provider for the model is configured/authenticated so discovery populates it."],"exampleFix":"// before\nomp --plan-yolo --plan-yolo-into @smoll\n\n// after\nomp --plan-yolo --plan-yolo-into @smol","handlingStrategy":"validation","validationCode":"// Check the alias/model exists before launching\nconst { resolveCliModel } = await import(\"@oh-my-pi/pi-ai\"); // or your registry wrapper\nconst resolved = resolveCliModel({ cliModel: \"@smol\", modelRegistry, preferences: {} });\nif (resolved.error || !resolved.model) throw new Error(`Unknown model pattern: ${resolved.error}`);","typeGuard":"function isResolvedModel(r: { error?: string; model?: unknown }): r is { error?: undefined; model: NonNullable<typeof r.model> } {\n  return !r.error && r.model != null;\n}","tryCatchPattern":null,"preventionTips":["Use `omp /model` or the model list command to confirm the exact id/alias before passing it.","Keep role aliases defined in settings in sync across machines."],"tags":["cli","model-resolution","configuration"],"backgroundTag":"model-not-found","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}