Skip to content

cayu.runtime.provider_operations

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.runtime import inspect_provider_operation

Inspect at most one latest model attempt without hydrating stream deltas.

async inspect_provider_operation(session_store: SessionStore, session_id: str) -> ProviderOperationInspection

Release source · Runtime guarantees · Capability guides

from cayu import ProviderOperationAccountingStatus

Bases: StrEnum.

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
NOT_APPLICABLE class attribute 'not_applicable'
RESERVED class attribute 'reserved'
SETTLED class attribute 'settled'

Release source · Runtime guarantees · Capability guides

from cayu import ProviderOperationCancellationStatus

Bases: StrEnum.

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
NOT_REQUESTED class attribute 'not_requested'
REQUESTED class attribute 'requested'
UNSUPPORTED class attribute 'unsupported'
PENDING class attribute 'pending'
CANCELLED class attribute 'cancelled'
COMPLETED class attribute 'completed'
FAILED class attribute 'failed'
UNAVAILABLE class attribute 'unavailable'

Release source · Runtime guarantees · Capability guides

from cayu import ProviderOperationEvidenceError

Durable provider-operation evidence is malformed or contradictory.

Bases: RuntimeError.

This type’s implementation and inherited behavior are available in the linked release source.

Release source · Runtime guarantees · Capability guides

from cayu import ProviderOperationInspection

Bounded public view of the latest model attempt’s dispatch mode.

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
status ProviderOperationInspectionStatus required
provider str | None Field(default=None, max_length=256)
operation_id str | None Field(default=None, max_length=PROVIDER_OPERATION_ID_MAX_CHARS)
stream_protocol str | None Field(default=None, max_length=PROVIDER_OPERATION_STREAM_PROTOCOL_MAX_CHARS)
cancellation_status ProviderOperationCancellationStatus ProviderOperationCancellationStatus.NOT_REQUESTED
accounting_status ProviderOperationAccountingStatus ProviderOperationAccountingStatus.NOT_APPLICABLE
reservation_count int Field(default=0, ge=0, le=32)
stage_id str | None Field(default=None, max_length=256)
run_epoch int | None Field(default=None, ge=0, le=MAX_DURABLE_JSON_INTEGER)
recovery_reason ProviderOperationUnavailableReason | None None
duplicate_request_risk bool False
allowed_resolutions tuple[ProviderOperationResolutionAction, ...] ()
resolution_action ProviderOperationResolutionAction | None None
resolution_id str | None Field(default=None, max_length=256)

Release source · Runtime guarantees · Capability guides

from cayu import ProviderOperationInspectionStatus

Bases: StrEnum.

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
SYNCHRONOUS class attribute 'synchronous'
PROVIDER_OPERATION_IN_PROGRESS class attribute 'provider_operation_in_progress'
RECONNECT_SCHEDULED class attribute 'reconnect_scheduled'
RECONNECT_IN_PROGRESS class attribute 'reconnect_in_progress'
PROVIDER_OPERATION_RECONCILED class attribute 'provider_operation_reconciled'
PROVIDER_OPERATION_UNAVAILABLE class attribute 'provider_operation_unavailable'
AMBIGUOUS_SUBMISSION class attribute 'ambiguous_submission'
FALLBACK_RETRY class attribute 'fallback_retry'

Release source · Runtime guarantees · Capability guides

from cayu import ProviderOperationResolutionAction

Explicit dispositions for a provider operation Cayu cannot continue exactly.

Bases: StrEnum.

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
FALLBACK_RETRY class attribute 'fallback_retry'
FAIL class attribute 'fail'

Release source · Runtime guarantees · Capability guides

from cayu import ProviderOperationResolutionConflict

A provider operation already has a different durable disposition.

Bases: RuntimeError.

This type’s implementation and inherited behavior are available in the linked release source.

Release source · Runtime guarantees · Capability guides

from cayu import ProviderOperationResolutionRecord

Immutable audit record for one provider-operation disposition.

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
record_type Literal['cayu.provider-operation-resolution'] _PROVIDER_OPERATION_RESOLUTION_RECORD_TYPE
schema_version Literal[1] 1
resolution_id str required
session_id str required
stage_id str required
logical_step_id str required
dispatch_ordinal StrictInt Field(ge=0, le=MAX_DURABLE_JSON_INTEGER)
preparation_digest str Field(pattern='^[0-9a-f]{64}$')
model_attempt_id str required
source_run_epoch StrictInt Field(ge=0, le=MAX_DURABLE_JSON_INTEGER)
resolved_run_epoch StrictInt Field(ge=0, le=MAX_DURABLE_JSON_INTEGER)
action ProviderOperationResolutionAction required
recovery_reason ProviderOperationUnavailableReason required
duplicate_request_risk bool required
reason str | None None
metadata dict[str, Any] Field(default_factory=dict)
resolved_by dict[str, Any] | None None
resolved_at datetime required
event_id str required
request_digest str Field(pattern='^[0-9a-f]{64}$')
execution_profile_fingerprint str | None Field(default=None, min_length=64, max_length=64, pattern='^[0-9a-f]{64}$')
record_digest str Field(pattern='^[0-9a-f]{64}$')

Release source · Runtime guarantees · Capability guides

from cayu import ProviderOperationResolutionRequest

One explicit, run-epoch-fenced disposition of unavailable provider work.

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
stage_id str required
expected_run_epoch StrictInt Field(ge=0, le=MAX_DURABLE_JSON_INTEGER)
action ProviderOperationResolutionAction required
reason str | None Field(default=None, max_length=4096)
metadata dict[str, Any] Field(default_factory=dict)
resolved_by ResolutionActor | None None
ProviderOperationResolutionRequest.validate_identity(value: str, info) -> str
ProviderOperationResolutionRequest.validate_task_worker_id(value: str | None) -> str | None
ProviderOperationResolutionRequest.validate_task_handoff_authority() -> ProviderOperationResolutionRequest
ProviderOperationResolutionRequest.validate_reason(value: str | None) -> str | None
ProviderOperationResolutionRequest.validate_metadata(value: object) -> dict[str, Any]
ProviderOperationResolutionRequest.validate_resolved_by(value: ResolutionActor | None) -> ResolutionActor | None

Release source · Runtime guarantees · Capability guides

from cayu import ProviderOperationResolutionResult

A newly committed provider disposition or its exact replay.

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
record ProviderOperationResolutionRecord required
event Event required
replayed bool required

Release source · Runtime guarantees · Capability guides

from cayu import ProviderOperationUnavailableReason

Why exact continuation of one submitted model attempt is unavailable.

Bases: StrEnum.

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
FAILED class attribute 'failed'
EXPIRED class attribute 'expired'
CANCELLED class attribute 'cancelled'
MALFORMED class attribute 'malformed'
WRONG_PROVIDER class attribute 'wrong_provider'
UNAVAILABLE class attribute 'unavailable'
AMBIGUOUS_SUBMISSION class attribute 'ambiguous_submission'

Release source · Runtime guarantees · Capability guides