Shen
01/27/2026, 3:06 PMclient<llm>
VertexAIClaudeOpus45 {
provider vertex-ai
options {
model claude-opus-4-5
location global
project_id coldreach
query_params {
key env.VERTEX_AI_API_KEY
}
}
}
Errors thrown:
InvalidAuthentication (401) Request failed with status code: 401 Unauthorized,
[{
"error": {
"code": 401,
"message": "API keys are not supported by this API. Expected OAuth2 access token or other authentication credentials that assert a principal. See https://cloud.google.com/docs/authentication",
"status": "UNAUTHENTICATED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "CREDENTIALS_MISSING",
"domain": "googleapis.com",
"metadata": {
"service": "aiplatform.googleapis.com",
"method": "google.cloud.aiplatform.v1.PredictionService.StreamRawPredict"
}
}
]
}
}
]
Request options: {"anthropic_version":"2023-06-01","max_tokens":4096}
Are we expected to use some different authentication method? If so, what's the proper BAML syntax?Vaibhav (BAML 🐑)
01/27/2026, 3:12 PMShen
01/27/2026, 3:54 PMVaibhav (BAML 🐑)
01/27/2026, 3:54 PMShen
01/27/2026, 3:55 PMVaibhav (BAML 🐑)
01/27/2026, 3:55 PMclient<llm> VertexClaude {
provider vertex-ai
options {
model "claude-sonnet-4-5@20250929"
location us-east5
anthropic_version "vertex-2023-10-16"
credentials env.INTEG_TESTS_GOOGLE_APPLICATION_CREDENTIALS_CONTENT
}
}Shen
01/27/2026, 3:55 PMVaibhav (BAML 🐑)
01/27/2026, 3:55 PMVaibhav (BAML 🐑)
01/27/2026, 3:55 PMVaibhav (BAML 🐑)
01/27/2026, 3:55 PMShen
01/27/2026, 3:55 PMShen
01/27/2026, 3:57 PMVaibhav (BAML 🐑)
01/27/2026, 4:11 PMVaibhav (BAML 🐑)
01/27/2026, 4:12 PMShen
01/27/2026, 4:17 PMVaibhav (BAML 🐑)
01/27/2026, 4:29 PMYou can obtain Google Cloud credentials in JSON format by either downloading a Service Account key from the Google Cloud console or by using the gcloud CLI for local Application Default Credentials (ADC).
Method 1: Download a Service Account Key (for server/non-interactive use)
A service account is recommended for applications running in a production or non-interactive environment (e.g., servers, VMs).
Go to the Service Accounts page in the Google Cloud console.
Select your project and then click on the service account you need credentials for (or create a new one if necessary).
Navigate to the "Keys" tab and click Add Key > Create new key.
Select "JSON" as the key type and click Create.
The JSON file will be generated and downloaded to your machine. This file is your only copy and should be stored securely.
To use this file in your application, set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the file's full path:aaronv (BAML)
01/27/2026, 6:14 PMaaronv (BAML)
01/27/2026, 6:14 PMitsankur
02/25/2026, 7:05 AM