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.
ToolRoundRecoveryRequest
Section titled “ToolRoundRecoveryRequest”from cayu.tools import ToolRoundRecoveryRequestCaller-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.
Fields and attributes
Section titled “Fields and attributes”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) |
validate_nonblank_ids (method)
Section titled “validate_nonblank_ids (method)”ToolRoundRecoveryRequest.validate_nonblank_ids(value: str, info) -> strvalidate_task_worker_id (method)
Section titled “validate_task_worker_id (method)”ToolRoundRecoveryRequest.validate_task_worker_id(value: str | None) -> str | Nonevalidate_task_handoff_authority (method)
Section titled “validate_task_handoff_authority (method)”ToolRoundRecoveryRequest.validate_task_handoff_authority() -> ToolRoundRecoveryRequestvalidate_message (method)
Section titled “validate_message (method)”ToolRoundRecoveryRequest.validate_message(value: str, info) -> strvalidate_optional_reason (method)
Section titled “validate_optional_reason (method)”ToolRoundRecoveryRequest.validate_optional_reason(value: str | None, info) -> str | Nonecopy_json_fields (method)
Section titled “copy_json_fields (method)”ToolRoundRecoveryRequest.copy_json_fields(value, info)copy_resolved_by (method)
Section titled “copy_resolved_by (method)”ToolRoundRecoveryRequest.copy_resolved_by(value: ResolutionActor | None) -> ResolutionActor | Nonecopy_structured_output (method)
Section titled “copy_structured_output (method)”ToolRoundRecoveryRequest.copy_structured_output(value: StructuredOutputSpec | None) -> StructuredOutputSpec | Nonecopy_limits (method)
Section titled “copy_limits (method)”ToolRoundRecoveryRequest.copy_limits(value: RunLimits | None) -> RunLimits | Nonecopy_budget_limits (method)
Section titled “copy_budget_limits (method)”ToolRoundRecoveryRequest.copy_budget_limits(value) -> tuple[BudgetLimit, ...] | None