Anthropic Messages API transport core for Pixir's Provider seam.
This module accepts Anthropic-native request maps and returns the same assembled
streamed shape the Turn loop consumes from providers. The OpenAI Responses
implementation stays separate in Pixir.Provider; this namespace owns Anthropic
request shaping, SSE event decoding, usage normalization, and transport selection.
Summary
Functions
Stream one Anthropic Messages API call over HTTP/SSE.
Types
@type request() :: %{ optional(:model) => String.t(), optional(:messages) => [map()], optional(:history) => [map()], optional(:system) => String.t() | [map()], optional(:system_prompt) => String.t(), optional(:tools) => [map()], optional(:max_tokens) => pos_integer(), optional(:reasoning_effort) => String.t() | atom() }
@type result() :: %{ text: String.t(), reasoning: String.t(), reasoning_items: [map()], function_calls: [%{call_id: String.t(), name: String.t(), args: map()}], output_items: [reasoning: map(), function_call: map()], usage: map() | nil, usage_summary: map(), provider_metadata: map(), finish_reason: :stop | :tool_calls }