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)[source]#

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.

Parameters:
  • blocks (Sequence[Mapping[str, JsonValue]])

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

Return type:

tuple[Mapping[str, JsonValue], …]