Liking cljdoc? Tell your friends :D

llm.sdk.providers.anthropic.chat

Anthropic Messages API transport adapter. Supports thinking blocks, cache_control, tool use, streaming deltas. Preserves provider-specific replay state (reasoning_details, signatures).

Anthropic Messages API transport adapter.
Supports thinking blocks, cache_control, tool use, streaming deltas.
Preserves provider-specific replay state (reasoning_details, signatures).
raw docstring

llm.sdk.providers.anthropic.vertex

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 (system extraction, message/tool/cache/thinking shaping, thinking-signature validation, response parsing, and stateless stream event 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 (system extraction, message/tool/cache/thinking shaping,
thinking-signature validation, response parsing, and stateless stream event
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.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close