Quiqueg
12/30/2025, 10:11 PMvertex-ai stopped working in v0.215.0 when using a service account key, which I'm using as a workaround for the lack of Workload Identity Federation support. I filed a bug here: https://github.com/BoundaryML/baml/issues/2891aaronv (BAML)
12/30/2025, 11:28 PMaaronv (BAML)
12/30/2025, 11:30 PMQuiqueg
12/30/2025, 11:33 PMaaronv (BAML)
12/30/2025, 11:33 PMaaronv (BAML)
12/30/2025, 11:34 PMQuiqueg
12/30/2025, 11:35 PMQuiqueg
12/30/2025, 11:36 PMGOOGLE_CLOUD_PROJECT set insteadaaronv (BAML)
12/30/2025, 11:36 PMaaronv (BAML)
12/30/2025, 11:37 PMaaronv (BAML)
12/30/2025, 11:37 PMQuiqueg
12/30/2025, 11:43 PMQuiqueg
12/30/2025, 11:44 PMaaronv (BAML)
12/30/2025, 11:45 PMaaronv (BAML)
12/30/2025, 11:45 PMQuiqueg
12/30/2025, 11:47 PM2025-12-30T23:45:26.725 [BAML WARN] Loading environment variables from .env file
[2025-12-30T23:45:26Z DEBUG baml_runtime::tracingv2::publisher::publisher] Skipping publisher because BOUNDARY_API_KEY is not set
Summary: 0/1 tests [2025-12-30T23:45:26Z INFO baml_runtime] [Runtime] run_test_with_expr_events start function=ClassifyMessage test=Test1....
Summary: 0/1 tests
⠁ Running ClassifyMessage::Test1 [2025-12-30T23:45:26Z INFO baml_runtime] [Runtime] run_test_with_expr_events taking LLM path function=ClassifyMessage test=Test1
[2025-12-30T23:45:26Z INFO baml_runtime] get_test_params: ClassifyMessage Test1
[2025-12-30T23:45:26Z DEBUG internal_llm_client::clients::vertex] Neither options.credentials nor options.credentials_content are set, falling back to env vars
[2025-12-30T23:45:26Z DEBUG internal_llm_client::clients::vertex] Using GOOGLE_APPLICATION_CREDENTIALS from env
[2025-12-30T23:45:26Z DEBUG internal_baml_jinja] Rendering template:
...
[2025-12-30T23:45:26Z DEBUG baml_runtime::internal::llm_client::primitive::vertex::std_auth] Attempting to auth using JsonFile strategy
[2025-12-30T23:45:26Z DEBUG gcp_auth::custom_service_account] found credentials project=Some("redacted") email="redacted-service-account@redacted.iam.gserviceaccount.com"
[2025-12-30T23:45:26Z DEBUG gcp_auth::custom_service_account] fetch_token; scopes=["https://www.googleapis.com/auth/cloud-platform"]Quiqueg
12/30/2025, 11:47 PMaaronv (BAML)
12/30/2025, 11:48 PMbaml test ? like in python or typescriptaaronv (BAML)
12/30/2025, 11:48 PMaaronv (BAML)
12/30/2025, 11:49 PMQuiqueg
12/30/2025, 11:51 PMQuiqueg
12/30/2025, 11:51 PMaaronv (BAML)
12/30/2025, 11:52 PMaaronv (BAML)
12/30/2025, 11:52 PMaaronv (BAML)
12/30/2025, 11:54 PMQuiqueg
12/30/2025, 11:56 PMaaronv (BAML)
12/31/2025, 12:00 AMaaronv (BAML)
12/31/2025, 12:01 AMaaronv (BAML)
12/31/2025, 12:01 AM(baml-tools) ➜ typescript git:(canary) ✗ npx baml-cli test -i TestVertex::TestProvider --from ../baml_src
2025-12-30T15:59:35.910 [BAML WARN] Loading environment variables from .env file
[2025-12-30T23:59:36Z DEBUG baml_runtime::tracingv2::publisher::publisher] Skipping publisher because BOUNDARY_API_KEY is not set
Summary: 0/1 tests
⠁ Running TestVertex::TestProvider [2025-12-30T23:59:36Z INFO baml_runtime] [Runtime] run_test_with_expr_events start function=TestVertex test=TestProvider....
[2025-12-30T23:59:36Z INFO baml_runtime] [Runtime] run_test_with_expr_events taking LLM path function=TestVertex test=TestProvider
[2025-12-30T23:59:36Z INFO baml_runtime] get_test_params: TestVertex TestProvider
[2025-12-30T23:59:36Z DEBUG internal_llm_client::clients::vertex] Neither options.credentials nor options.credentials_content are set, falling back to env vars
[2025-12-30T23:59:36Z DEBUG internal_llm_client::clients::vertex] Using GOOGLE_APPLICATION_CREDENTIALS from envQuiqueg
12/31/2025, 12:01 AM../../service-account-key.jsonQuiqueg
12/31/2025, 12:02 AMaaronv (BAML)
12/31/2025, 12:02 AMaaronv (BAML)
12/31/2025, 12:02 AMexport GOOGLE_APPLICATION_CREDENTIALS=/Users/aaronvillalpando/Downloads/gloo-ai-a37a32fa3313.jsonQuiqueg
12/31/2025, 12:02 AMQuiqueg
12/31/2025, 12:03 AMaaronv (BAML)
12/31/2025, 12:06 AMQuiqueg
12/31/2025, 12:06 AMQuiqueg
12/31/2025, 12:08 AMaaronv (BAML)
12/31/2025, 12:08 AMQuiqueg
12/31/2025, 12:08 AMaaronv (BAML)
12/31/2025, 12:09 AMQuiqueg
12/31/2025, 12:10 AMFROM node:22-bookworm-slim
$ arch
> aarch64Quiqueg
12/31/2025, 12:12 AMFROM node:22-bookworm-slim but the architecture is amd64 instead of arm64.aaronv (BAML)
12/31/2025, 12:14 AMaaronv (BAML)
12/31/2025, 12:14 AMQuiqueg
12/31/2025, 12:14 AMaaronv (BAML)
12/31/2025, 12:18 AMVaibhav (BAML 🐑)
12/31/2025, 12:28 AMVaibhav (BAML 🐑)
12/31/2025, 12:28 AMQuiqueg
12/31/2025, 12:29 AMVaibhav (BAML 🐑)
12/31/2025, 12:29 AMVaibhav (BAML 🐑)
12/31/2025, 12:29 AMVaibhav (BAML 🐑)
12/31/2025, 12:29 AMQuiqueg
12/31/2025, 12:29 AMaaronv (BAML)
12/31/2025, 12:29 AMaaronv (BAML)
12/31/2025, 12:30 AMQuiqueg
12/31/2025, 12:30 AM{
"type": "service_account",
"project_id": "REDACTED",
"private_key_id": "REDACTED",
"private_key": "REDACTED",
"client_email": "REDACTED@REDACTED.iam.gserviceaccount.com",
"client_id": "103210900557391259515",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/REDACTED%40REDACTED.iam.gserviceaccount.com",
"universe_domain": "googleapis.com"
}Quiqueg
12/31/2025, 12:31 AMFROM node:22-bookworm
WORKDIR /app
USER root
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
ENV BAML_INTERNAL_LOG=debug
ENV GOOGLE_PROJECT_ID=redacted
ENV GOOGLE_CLOUD_PROJECT=redacted
CMD ["npx", "tsx", "index.ts"]
and then these commands:
docker build -t baml-test-app .
docker run --rm -v $(pwd)/service-account-key.json:/app/service-account-key.json -e GOOGLE_APPLICATION_CREDENTIALS=/app/service-account-key.json baml-test-app:latest
Note that I opted for node:22-bookworm instead of node:22-bookworm-slim because of missing CA in the slim imageQuiqueg
12/31/2025, 12:33 AMindex.ts file is this:
import { b } from "./baml_client/baml_client/index.js";
async function main() {
const result = await b.ClassifyMessage({
userName: "Alice",
message: "This is a test message",
});
console.log(result);
}
main();aaronv (BAML)
12/31/2025, 12:33 AMFailed to create request builder: Error {
context: "Failed to build request",
source: Error {
context: "Failed to parse credentials as JSON string: \"{\\n...\\n}\"",
source: Str(
"invalid private key in credentials",
),
},
}
BamlValidationError: BamlValidationError: LLM Failure: Failed to create request builder: Error {
context: "Failed to build request",
source: Error {
context: "Failed to parse credentials as JSON string: \"{\\n...\\n}\"",
source: Str(
"invalid private key in credentials",
),
},
} (Unspecified error code: 2) - Failed to create request builder: Error {
context: "Failed to build request",
source: Error {
context: "Failed to parse credentials as JSON string: \"{\\n...\\n}\"",
source: Str(
"invalid private key in credentials",
),aaronv (BAML)
12/31/2025, 12:34 AMaaronv (BAML)
12/31/2025, 12:35 AMdocker run --rm --platform linux/amd64 -v /Users/aaronvillalpando/Projects/linuxgcp/gloo-ai-a37a32fa3313.json:/app/credentials.json:ro -e GOOGLE_APPLICATION_CREDENTIALS=/app/credentials.json -e BAML_INTERNAL_LOG=debug timeout: 3m
linuxgcp-amd64 2>&1 | head -80)aaronv (BAML)
12/31/2025, 12:35 AMlinux arm64 did notaaronv (BAML)
12/31/2025, 12:36 AMQuiqueg
12/31/2025, 12:39 AM--platform linux/amd64aaronv (BAML)
12/31/2025, 12:39 AMQuiqueg
12/31/2025, 12:42 AMQuiqueg
12/31/2025, 12:42 AMaaronv (BAML)
12/31/2025, 12:46 AMaaronv (BAML)
12/31/2025, 12:54 AMQuiqueg
12/31/2025, 12:56 AMaaronv (BAML)
12/31/2025, 12:56 AMaaronv (BAML)
12/31/2025, 12:56 AMaaronv (BAML)
12/31/2025, 1:21 AMaaronv (BAML)
12/31/2025, 6:40 PMQuiqueg
12/31/2025, 7:09 PMQuiqueg
12/31/2025, 7:13 PMaaronv (BAML)
12/31/2025, 7:13 PM