Redouble AI Nucleo documentation
Part 13 · Inside the runtime

Inside the Anthropic provider

ai.redouble.nucleo.providers.anthropic · nucleo-provider-anthropic

This page is for people working on the runtime itself. What the provider connects to, the credential it needs and what it serves are in the guide; this page documents its encoders - how the parts of a Nucleo message become Anthropic's native shapes (B = com.anthropic.models.messages.ContentBlockParam); the encoder model they follow is the parent How each part of a message reaches a provider.

ClassRole
AnthropicTextWrapperThe one Anthropic text wrap: string -> ContentBlockParam.ofText. Injected into the shared text encoders (text/json/skill ride those base classes unchanged).
AnthropicImageBlockEncoderNative base64 image; owns the MIME -> SDK media-type mapping, reused by the file encoder.
AnthropicFileBlockEncoderPDF -> document param, image file -> image param, otherwise nothing.
AnthropicToolUseBlockEncoderNative ToolUseBlockParam with the parsed input object.
AnthropicToolResultBlockEncoderNative ToolResultBlockParam linked by tool-use id.
AnthropicThinkingBlockEncoder / AnthropicRedactedThinkingBlockEncoderReplay thinking verbatim (signature / opaque payload round-trip).

Each native encoder subclasses its logical base (AnthropicImageBlockEncoder extends ImageBlockEncoder) and builds ContentBlockParam directly without the text wrapper.

^