Provider.Adapter for Anthropic Messages API.
Wire format:
- Endpoint:
<base_url>/v1/messages - Auth:
x-api-key: <api_key>+anthropic-version: <version>headers (NOTAuthorization: Bearer). - SSE: typed events (
event: content_block_delta\ndata: {...}\n\n). - System prompt separated from messages array (Anthropic doesn't accept
role: "system"in messages).
Summary
Functions
Variant used by Provider.Instructor when the originating request had
response_schema set: a missing _respond block becomes a permanent
:respond_tool_not_called error rather than a fallback to text extraction.
Functions
@spec parse_complete_response_for_schema(map()) :: {:ok, map()} | {:error, CouncilEx.Error.t()}
Variant used by Provider.Instructor when the originating request had
response_schema set: a missing _respond block becomes a permanent
:respond_tool_not_called error rather than a fallback to text extraction.