Vertex AI integration doesn't work

Resolved 💬 5 comments Opened Feb 26, 2025 by aud Closed Feb 27, 2025

Following the instructions listed in the docs: https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview

And setting these env vars correctly:

CLAUDE_CODE_USE_VERTEX=1
CLOUD_ML_REGION=us-east5
ANTHROPIC_VERTEX_PROJECT_ID=your-project-id

It's making a request to Vertex that 404s:

Anthropic:DEBUG:response (error; (error; not retryable)) 404 https://us-east5-aiplatform.googleapis.com/v1/projects/REDACTED/locations/us-east5/publishers/anthropic/models/claude-3-7-sonnet-20250219:streamRawPredict

I'm able to make a successful request against that model in Vertex:

curl -X POST -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json; charset=utf-8" -d @request.json "https://us-east5-aiplatform.googleapis.com/v1/projects/REDACTED/locations/us-east5/publishers/anthropic/models/claude-3-7-sonnet@20250219:streamRawPredict"

Notice the subtle difference of - vs. @ in the model identifier. Seems like the model ID that Claude code is trying to hit doesn't exist in Vertex.

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗