{"record":{"id":"58dee68bb6488a4f","repo":"earendil-works/pi","slug":"vertex-ai-requires-a-project-id-set-google-cloud","errorCode":null,"errorMessage":"Vertex AI requires a project ID. Set GOOGLE_CLOUD_PROJECT/GCLOUD_PROJECT or pass project in options.","messagePattern":"Vertex AI requires a project ID\\. Set GOOGLE_CLOUD_PROJECT/GCLOUD_PROJECT or pass project in options\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/ai/src/api/google-vertex.ts","lineNumber":443,"sourceCode":"function resolveApiKey(options?: GoogleVertexOptions): string | undefined {\n\tconst apiKey = options?.apiKey?.trim();\n\tif (!apiKey || apiKey === GCP_VERTEX_CREDENTIALS_MARKER || isPlaceholderApiKey(apiKey)) {\n\t\treturn undefined;\n\t}\n\treturn apiKey;\n}\n\nfunction isPlaceholderApiKey(apiKey: string): boolean {\n\treturn /^<[^>]+>$/.test(apiKey);\n}\n\nfunction resolveProject(options?: GoogleVertexOptions): string {\n\tconst project =\n\t\toptions?.project ||\n\t\tgetProviderEnvValue(\"GOOGLE_CLOUD_PROJECT\", options?.env) ||\n\t\tgetProviderEnvValue(\"GCLOUD_PROJECT\", options?.env);\n\tif (!project) {\n\t\tthrow new Error(\n\t\t\t\"Vertex AI requires a project ID. Set GOOGLE_CLOUD_PROJECT/GCLOUD_PROJECT or pass project in options.\",\n\t\t);\n\t}\n\treturn project;\n}\n\nfunction resolveLocation(options?: GoogleVertexOptions): string {\n\tconst location = options?.location || getProviderEnvValue(\"GOOGLE_CLOUD_LOCATION\", options?.env);\n\tif (!location) {\n\t\tthrow new Error(\"Vertex AI requires a location. Set GOOGLE_CLOUD_LOCATION or pass location in options.\");\n\t}\n\treturn location;\n}\n\nfunction buildParams(\n\tmodel: Model<\"google-vertex\">,\n\tcontext: Context,\n\toptions: GoogleVertexOptions = {},","sourceCodeStart":425,"sourceCodeEnd":461,"githubUrl":"https://github.com/earendil-works/pi/blob/4af9d21d3b4d664e4a29fcabfec85171077248e3/packages/ai/src/api/google-vertex.ts#L425-L461","documentation":"Error \"Vertex AI requires a project ID. Set GOOGLE_CLOUD_PROJECT/GCLOUD_PROJECT or pass project in options.\" thrown in earendil-works/pi.","triggerScenarios":"Thrown at packages/ai/src/api/google-vertex.ts:443 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set GOOGLE_CLOUD_PROJECT or GCLOUD_PROJECT, or pass project in options."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4af9d21d3b4d664e4a29fcabfec85171077248e3","analyzedAt":"2026-08-24T13:07:14.692Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}