Vertex AI Anthropic (Claude) transport adapter.
Claude models served through Google Vertex AI speak the same Messages API as the native Anthropic endpoint, with three differences:
Everything else (message/tool/cache/thinking shaping, response and stream parsing) is reused verbatim from llm.sdk.providers.anthropic.chat so the two backends stay in lockstep.
Project resolution: request provider-options [:vertex :project] > profile quirks :vertex-project > GOOGLE_CLOUD_PROJECT env > SA JSON project_id. Location: provider-options [:vertex :location] > profile quirks :vertex-location > GOOGLE_CLOUD_LOCATION env > us-central1.
Vertex AI Anthropic (Claude) transport adapter.
Claude models served through Google Vertex AI speak the same Messages
API as the native Anthropic endpoint, with three differences:
1. Endpoint — POST to the regional aiplatform host under
/publishers/anthropic/models/{model}:rawPredict (unary) or
:streamRawPredict (SSE), with the model in the URL path.
2. Auth — GCP OAuth bearer token (ADC chain via llm.sdk.gcp-auth)
instead of an x-api-key header.
3. Body — the model is dropped from the JSON body and replaced by
"anthropic_version": "vertex-2023-10-16"; streaming calls add
"stream": true.
Everything else (message/tool/cache/thinking shaping, response and
stream parsing) is reused verbatim from llm.sdk.providers.anthropic.chat
so the two backends stay in lockstep.
Project resolution: request provider-options [:vertex :project] >
profile quirks :vertex-project > GOOGLE_CLOUD_PROJECT env > SA JSON
project_id. Location: provider-options [:vertex :location] > profile
quirks :vertex-location > GOOGLE_CLOUD_LOCATION env > us-central1.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |