ReqLLM.Providers.Anthropic.ResponseBuilder (ReqLLM v1.14.0)

View Source

Anthropic-specific ResponseBuilder implementation.

Handles Anthropic's specific requirements:

  • Content blocks must be non-empty when tool_calls are present
  • Maps tool_use finish reason to :tool_calls

This fixes bug #269 where streaming tool-call-only responses produced empty content blocks that Anthropic's API rejected.