Skip to content

cayu.providers.response

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.providers import ModelResponse

One response, not an agent loop or a runtime authority handle.

Events are the single source for text, thinking, ordered tool-call data, usage and completion metadata. Construction detaches provider observations. The managed inference entrance separately prohibits tool calls and owns redaction, byte limits, accounting, and failure publication.

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
events tuple[ModelStreamEvent, ...] required
ModelResponse.copy_events(value: object) -> tuple[ModelStreamEvent, ...]
ModelResponse.require_one_completion() -> ModelResponse
ModelResponse.text() -> str
ModelResponse.thinking() -> str
ModelResponse.tool_calls() -> tuple[dict[str, Any], ...]

Ordered provider-neutral call payloads; never executes the calls.

ModelResponse.completion() -> ModelCompletion
ModelResponse.payload() -> dict[str, Any]

Release source · Runtime guarantees · Capability guides