can1357/oh-my-pi · error · Error
resolved.error (model resolution failure)
Error message
resolved.error (model resolution failure)
What it means
resolveDryBalanceModel rethrows the error string produced by resolveCliModel when explicit model resolution (--model selector, settings, preferences) fails. This is the upstream model-resolution failure (bad provider, unresolvable specifier, registry error) surfaced verbatim by dry-balance. The message text is whatever resolveCliModel produced.
Source
Thrown at packages/coding-agent/src/cli/dry-balance-cli.ts:561
throw error;
}
}
async function resolveDryBalanceModel(
modelSelector: string | undefined,
modelRegistry: DryBalanceModelRegistry,
settings: Settings | undefined,
randomSessionId: () => string,
): Promise<{ model: Model<Api>; warning?: string }> {
const preferences = getModelMatchPreferences(settings);
if (modelSelector) {
const resolved = resolveCliModel({
cliModel: modelSelector,
modelRegistry,
settings,
preferences,
});
if (resolved.error) throw new Error(resolved.error);
if (!resolved.model) throw new Error(`Model "${modelSelector}" not found`);
return { model: resolved.model, warning: resolved.warning };
}
const allowedModels = await resolveAllowedModels(modelRegistry, settings, preferences);
if (allowedModels.length === 0) {
throw new Error(
"No models available. Use --model to select a model or configure enabledModels/default model settings.",
);
}
const defaultRoleSpec = resolveModelRoleValue(settings?.getModelRole("default"), allowedModels, {
settings,
matchPreferences: preferences,
});
if (defaultRoleSpec.model) {
return { model: defaultRoleSpec.model, warning: defaultRoleSpec.warning };
}View on GitHub (pinned to 9690622007)
Solutions
- Read the interpolated message for the underlying resolution cause and fix that first
- Run `omp models` (or list registry entries) to find a valid model id
- Re-check --model syntax: it is typically provider/model-id
- Update the CLI / model catalog if the model was renamed or removed in a newer version
Example fix
// before omp dry-balance --model groq/llama-3.3-70b-typo // after omp dry-balance --model groq/llama-3.3-70b-versatile
Defensive patterns
Strategy: try-catch
Validate before calling
const ids = await listAvailableModelIds(); // from the model registry / omp models
if (!ids.includes(requestedSelector)) console.warn(`Unknown model selector: ${requestedSelector}`); Type guard
function hasResolutionError(r: { error?: string | null; model?: unknown }): r is { error: string; model?: undefined } {
return typeof r.error === 'string' && r.error.length > 0;
} Try / catch
try {
const { model } = await resolveDryBalanceModel(opts);
} catch (e) {
console.error(`Model resolution failed: ${(e as Error).message}. Check --model syntax and the model list.`);
process.exitCode = 1;
} Prevention
- Copy model ids from the registry listing rather than typing from memory
- Use the full provider/model-id form for selectors
- Keep the CLI/model catalog updated so ids stay valid
When it happens
Trigger: Running dry-balance with a --model selector that resolveCliModel cannot resolve: unknown provider prefix, malformed model spec, or a registry/settings error returned in resolved.error.
Common situations: Typos in the model id (`--model groq/llama-3.3-7b-typo`), referencing a provider that is not configured/authenticated, or a stale models.json where the requested model no longer exists after an upgrade.
Related errors
- No models available. Use --model to select a model or config
- Model "${options.model}" not found
- Model "${modelSelector}" not found
- Model "${options.model}" not found
- Model "${parsed.planYoloInto ?? "@smol"}" not found
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/167b730b7d4740c6.
Report an issue: GitHub.