earendil-works/pi · error

Unknown Google Vertex AI auth method: ${method}

Error message

Unknown Google Vertex AI auth method: ${method}

What it means

Error "Unknown Google Vertex AI auth method: ${method}" thrown in earendil-works/pi.

Source

Thrown at packages/ai/src/providers/google-vertex.ts:34

		interaction.signal.throwIfAborted();
		const method = await interaction.prompt({
			type: "select",
			message: "Select Google Vertex AI authentication method:",
			options: [
				{ id: "api-key", label: "Google Cloud API key" },
				{ id: "adc", label: "Application Default Credentials" },
				{ id: "service-account", label: "Service account credentials file" },
			],
		});
		interaction.signal.throwIfAborted();
		if (method === "api-key") {
			return {
				type: "api_key",
				key: await interaction.prompt({ type: "secret", message: "Enter Google Cloud API key" }),
			};
		}
		if (method !== "adc" && method !== "service-account") {
			throw new Error(`Unknown Google Vertex AI auth method: ${method}`);
		}
		interaction.notify({
			type: "info",
			message:
				method === "adc"
					? "Run `gcloud auth application-default login`, then provide the project and location."
					: "Provide a service account credentials file, project, and location.",
			links: [
				{
					label: "Application Default Credentials",
					url: "https://cloud.google.com/docs/authentication/provide-credentials-adc",
				},
			],
		});
		const project = await interaction.prompt({ type: "text", message: "Enter Google Cloud project ID" });
		const location = await interaction.prompt({ type: "text", message: "Enter Google Cloud location" });
		const credentialsPath =
			method === "service-account"

View on GitHub (pinned to 4af9d21d3b)

Solutions

  1. Use a supported Google Vertex AI auth method such as application default credentials.

When it happens

Trigger: Thrown at packages/ai/src/providers/google-vertex.ts:34 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/5a05f6102650a060. Report an issue: GitHub.