to_content_blocks#

Connect a provider and configure retries, credentials, and transport. See the guide.

zett_agent.providers.anthropic_compatible.to_content_blocks(message, *, provider='anthropic', model=None, search_tool=None)[source]#

Convert a message into Messages content blocks.

Parameters:
  • message (AnyMessage) – The message to render.

  • provider (str) – Who produced the replay blocks a message may carry. They are sent back only to the provider and model that wrote them.

  • model (str | None) – The model about to receive the message.

  • search_tool (str | None) – Name of the local tool search tool, whose result becomes tool_reference blocks; None when the endpoint cannot load deferred tools.

Return type:

list[dict[str, JsonValue]]