Skip to content

cayu.tools.rounds

Public Cayu API. Definitions are grouped by their public source module, and definitions from private implementation modules appear on their package’s page; adding a symbol does not move existing links. The import shown at each entry is a supported public namespace. Read the Python API overview and install the required extra.

from cayu.tools import ToolRoundRecoveryRequest

Caller-supplied terminal outcome for a crashed ordinary tool call.

Targets one started-but-unresolved tool call in a session’s pending tool round (a round that crashed outside approval/user-input flows). The operator supplies the externally verified COMPLETED/FAILED outcome as evidence; Cayu persists it as the call’s terminal result and never re-runs the tool. max_steps, limits, budget_limits, and retry_policy default to None, which restores the configuration persisted with the pending tool round. An explicit value is accepted only when it preserves the invocation’s frozen execution profile.

Bases: BaseModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
session_id str required
task_worker_id str | None None
task_handoff_id str | None None
round_id str required
tool_call_id str required
outcome ToolApprovalRecoveryOutcome required
message str required
structured dict[str, Any] | None None
artifacts list[dict[str, Any]] Field(default_factory=list)
reason str | None None
metadata dict[str, Any] Field(default_factory=dict)
resolved_by ResolutionActor | None None
max_steps StrictInt | None Field(default=None, ge=1, le=MAX_STEPS)
limits RunLimits | None None
budget_limits tuple[BudgetLimit, ...] | None None
retry_policy RetryPolicy | None None
structured_output StructuredOutputSpec | None None
thinking ThinkingConfig | None None
loop_policies SkipJsonSchema[tuple[LoopPolicy, ...]] Field(default_factory=tuple, exclude=True)
ToolRoundRecoveryRequest.validate_nonblank_ids(value: str, info) -> str
ToolRoundRecoveryRequest.validate_task_worker_id(value: str | None) -> str | None
ToolRoundRecoveryRequest.validate_task_handoff_authority() -> ToolRoundRecoveryRequest
ToolRoundRecoveryRequest.validate_message(value: str, info) -> str
ToolRoundRecoveryRequest.validate_optional_reason(value: str | None, info) -> str | None
ToolRoundRecoveryRequest.copy_json_fields(value, info)
ToolRoundRecoveryRequest.copy_resolved_by(value: ResolutionActor | None) -> ResolutionActor | None
ToolRoundRecoveryRequest.copy_structured_output(value: StructuredOutputSpec | None) -> StructuredOutputSpec | None
ToolRoundRecoveryRequest.copy_limits(value: RunLimits | None) -> RunLimits | None
ToolRoundRecoveryRequest.copy_budget_limits(value) -> tuple[BudgetLimit, ...] | None

Release source · Runtime guarantees · Capability guides