stream.drivers.claude¶
stream.drivers.claude ¶
Anthropic (Claude) driver -- portable, no Cursor dependency.
Uses the Messages API tool-use loop. base_url lets you point at any
Anthropic-compatible endpoint (e.g. MIT Parley, or any gateway Claude Code can
target via ANTHROPIC_BASE_URL) instead of api.anthropic.com.
Auth mirrors Claude Code's two credential styles: api_key is sent as the
x-api-key header (talking to Anthropic directly), while auth_token is
sent as Authorization: Bearer (what most gateways, Parley included, expect).
Set whichever the endpoint wants; a gateway that uses Bearer auth needs
auth_token/ANGELO_CLAUDE_AUTH_TOKEN (or ANTHROPIC_AUTH_TOKEN), not
api_key.
Anthropic does not expose token logprobs, so supports_logprobs is False and
score falls back to the base NotImplementedError (the executor can route
scoring to a logprob-capable driver).