earendil-works/pi · error · Error

Could not refresh model catalogs

Error message

Could not refresh model catalogs: ${details}

What it means

Thrown by refreshModelCatalogs when the catalog refresh completed but at least one provider reported an error; the message lists each failing provider and its error. It is a partial-failure aggregation, not a total failure.

Solutions

  1. Inspect the per-provider details in the message to identify which provider failed
  2. Check network access and credentials (auth.json) for the failing providers
  3. Retry the refresh; transient provider-side outages resolve on their own
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at packages/coding-agent/src/package-manager-cli.ts:603 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/32fee45d8fa53d36. Report an issue: GitHub.

Appendix: source

Thrown at packages/coding-agent/src/package-manager-cli.ts:603

	const timeout = setTimeout(() => controller.abort(), 15_000);
	try {
		const modelRuntime = await ModelRuntime.create({
			authPath: join(agentDir, "auth.json"),
			modelsPath: join(agentDir, "models.json"),
			allowModelNetwork: false,
			signal: controller.signal,
		});
		const result = await modelRuntime.refresh({
			allowNetwork: true,
			force: true,
			signal: controller.signal,
		});
		if (result.aborted) {
			throw new Error("Model catalog refresh timed out.");
		}
		if (result.errors.size > 0) {
			const details = Array.from(result.errors, ([provider, error]) => `${provider}: ${error.message}`).join("; ");
			throw new Error(`Could not refresh model catalogs: ${details}`);
		}
	} finally {
		clearTimeout(timeout);
	}
	console.log(chalk.green("Model catalogs refreshed"));
}

function printSelfUpdateUnavailable(
	npmCommand?: string[],
	updatePackageTarget: SelfUpdatePackageTarget = PACKAGE_NAME,
): void {
	console.error(`error: ${APP_NAME} cannot self-update this installation.`);
	console.error(getSelfUpdateUnavailableInstruction(PACKAGE_NAME, npmCommand, updatePackageTarget));

	const entrypoint = process.argv[1];
	if (entrypoint) {
		console.error("");
		console.error(`Location of ${APP_NAME} executable: ${entrypoint}`);

View on GitHub (pinned to 4af9d21d3b)