withhold_replay_blocks#

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

zett_agent.providers.stop_reasons.withhold_replay_blocks(blocks, is_tool_call)[源代码]#

Drop the replay blocks that are client tool calls.

When a step is refused or interrupted its tool calls are withheld from the message, so the provider's own record of them must go too: a tool_use block sent back without a tool_result is rejected by the API.

参数:
  • blocks (Sequence[Mapping[str, Any]])

  • is_tool_call (Callable[[Mapping[str, Any]], bool])

返回类型:

tuple[Mapping[str, Any], ...]