Require explicit provider API keys

This commit is contained in:
Mario Zechner
2026-05-29 22:30:47 +02:00
parent 01a8c2d62c
commit 7921ae499a
11 changed files with 55 additions and 56 deletions
+1 -1
View File
@@ -395,7 +395,7 @@ function baseUrlIncludesApiVersion(baseUrl: string): boolean {
}
function resolveApiKey(options?: GoogleVertexOptions): string | undefined {
const apiKey = options?.apiKey?.trim() || process.env.GOOGLE_CLOUD_API_KEY?.trim();
const apiKey = options?.apiKey?.trim();
if (!apiKey || apiKey === GCP_VERTEX_CREDENTIALS_MARKER || isPlaceholderApiKey(apiKey)) {
return undefined;
}