messages_tools#
Connect a provider and configure retries, credentials, and transport. See the guide.
- zett_agent.providers.anthropic_compatible.messages_tools(tools, server_tools=())[源代码]#
Render local tools, deferring the ones tool search is meant to load.
A tool marked
deferredis declared withdefer_loading: Anthropic keeps it out of the model's context until atool_referencenames it. That only works when something can produce the reference, so the flag is honored only when the request carries a search: the local search tool, or Anthropic's hostedtool_search_tool_*. Without one the tool is declared normally, because a deferred tool nothing can load would be unusable.The local search tool is an ordinary function here, since Anthropic has no client-side search endpoint; the model calls it and its result carries the references (see
search_result_blocks()).- 参数:
tools (Sequence[ToolDefinition])
server_tools (Sequence[ServerToolDefinition])
- 返回类型:
list[dict[str, JsonValue]]