earendil-works/pi · error · AuthCommandError
Model "${cliModel}" not found. Use --list-models to see avai
Error message
Model "${cliModel}" not found. Use --list-models to see available models. What it means
Error "Model "${cliModel}" not found. Use --list-models to see available models." thrown in earendil-works/pi.
Source
Thrown at packages/coding-agent/src/cli/credential-print.ts:52
if (cliModel) {
const resolved = resolveCliModel({ cliProvider: provider.id, cliModel, modelRuntime });
if (resolved.error || !resolved.model) {
throw new AuthCommandError(resolved.error ?? "Unable to resolve the requested provider/model");
}
providers.push({ id: provider.id, model: resolved.model });
} else {
providers.push({ id: provider.id });
}
} else {
for (const provider of modelRuntime.getProviders()) {
if (!credentialTypes.has(provider.id)) continue;
const resolved = resolveCliModel({ cliProvider: provider.id, cliModel: cliModel!, modelRuntime });
if (resolved.model && !resolved.error && !resolved.warning?.includes("Using custom model id")) {
providers.push({ id: provider.id, model: resolved.model });
}
}
if (providers.length === 0) {
throw new AuthCommandError(`Model "${cliModel}" not found. Use --list-models to see available models.`);
}
}
const credentials: Array<{ providerId: string; value: string }> = [];
for (const provider of providers) {
const type = credentialTypes.get(provider.id);
if (kind === "api_key" && type === "oauth") continue;
if (kind === "bearer_token" && type !== "oauth") continue;
const authOptions = {
...(kind === "bearer_token" ? { minOAuthValidityMs: minExpiryMs ?? DEFAULT_BEARER_TOKEN_MIN_EXPIRY_MS } : {}),
signal,
};
const auth = provider.model
? await modelRuntime.getAuth(provider.model, authOptions)
: await modelRuntime.getAuth(provider.id, authOptions);
const value = getAuthCredential(auth);
if (value) credentials.push({ providerId: provider.id, value });
}View on GitHub (pinned to 4af9d21d3b)
When it happens
Trigger: Thrown at packages/coding-agent/src/cli/credential-print.ts:52 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of earendil-works/pi@4af9d21d3b (2026-08-24).
Data as JSON: /api/errors/8a7c83775a848f61.
Report an issue: GitHub.