earendil-works/pi · error · AuthCommandError

Multiple configured providers matched (${credentials.map(({

Error message

Multiple configured providers matched (${credentials.map(({ providerId }) => providerId).join(", ")}). Specify --provider.

What it means

Error "Multiple configured providers matched (${credentials.map(({ providerId }) => providerId).join(", ")}). Specify --provider." thrown in earendil-works/pi.

Source

Thrown at packages/coding-agent/src/cli/credential-print.ts:84

			? await modelRuntime.getAuth(provider.model, authOptions)
			: await modelRuntime.getAuth(provider.id, authOptions);
		const value = getAuthCredential(auth);
		if (value) credentials.push({ providerId: provider.id, value });
	}

	if (credentials.length === 1) return credentials[0].value;
	if (credentials.length === 0) {
		const providerId = providers[0]?.id;
		const type = providerId ? credentialTypes.get(providerId) : undefined;
		if (cliProvider && kind === "api_key" && type === "oauth") {
			throw new AuthCommandError(`Provider "${providerId}" is configured with OAuth, not an API key`);
		}
		if (cliProvider && kind === "bearer_token" && type !== "oauth") {
			throw new AuthCommandError(`Provider "${providerId}" is not configured with an OAuth bearer token`);
		}
		throw new AuthCommandError(`No usable ${kind === "api_key" ? "API key" : "OAuth bearer token"} is configured`);
	}
	throw new AuthCommandError(
		`Multiple configured providers matched (${credentials.map(({ providerId }) => providerId).join(", ")}). Specify --provider.`,
	);
}

View on GitHub (pinned to 4af9d21d3b)

When it happens

Trigger: Thrown at packages/coding-agent/src/cli/credential-print.ts:84 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/5e6b8728100621c7. Report an issue: GitHub.