Skip to content

cayu.configuration

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.configuration import CayuConfig

Small, immutable root configuration for one CayuApp.

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
run RunDefaults Field(default_factory=RunDefaults)
tool_execution ToolExecutionConfig Field(default_factory=ToolExecutionConfig)
operations OperationsConfig Field(default_factory=OperationsConfig)
evals EvalConfig Field(default_factory=EvalConfig)
CayuConfig.detach_run_defaults(value: RunDefaults) -> RunDefaults
CayuConfig.detach_tool_execution_config(value: ToolExecutionConfig) -> ToolExecutionConfig
CayuConfig.detach_evals(value: EvalConfig) -> EvalConfig
CayuConfig.detach_operations_config(value: OperationsConfig) -> OperationsConfig

Release source · Runtime guarantees · Capability guides

from cayu.configuration import CayuConfigSource
CayuConfigSource = Literal['framework', 'application', 'explicit']

Release source · Runtime guarantees · Capability guides

from cayu.runtime import copy_cayu_config

Return a detached, validated application configuration.

copy_cayu_config(config: CayuConfig | None) -> CayuConfig

Release source · Runtime guarantees · Capability guides

from cayu.runtime import DEFAULT_MAX_ENVIRONMENT_LIFECYCLE_OWNERS
DEFAULT_MAX_ENVIRONMENT_LIFECYCLE_OWNERS = 256

Release source · Runtime guarantees · Capability guides

from cayu.runtime import DEFAULT_MAX_PARALLEL_TOOL_CALLS
DEFAULT_MAX_PARALLEL_TOOL_CALLS = 4

Release source · Runtime guarantees · Capability guides

from cayu.runtime import DEFAULT_MAX_STEPS
DEFAULT_MAX_STEPS = 64

Release source · Runtime guarantees · Capability guides

from cayu.configuration import EvalConfig

Defaults for new evaluation runs without an explicit suite policy.

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
max_concurrency StrictInt Field(default=1, ge=1, le=EVAL_SUITE_MAX_CONCURRENCY)

Release source · Runtime guarantees · Capability guides

from cayu.runtime import MAX_STEPS
MAX_STEPS = 2 ** 53 - 1

Release source · Runtime guarantees · Capability guides

from cayu.configuration import OperationsConfig

Application-wide bounds for Runtime-owned operational 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
max_environment_lifecycle_owners StrictInt Field(default=DEFAULT_MAX_ENVIRONMENT_LIFECYCLE_OWNERS, ge=1)
recovery_cleanup_policy RecoveryCleanupPolicy Field(default_factory=RecoveryCleanupPolicy)
OperationsConfig.detach_recovery_cleanup_policy(value: RecoveryCleanupPolicy) -> RecoveryCleanupPolicy

Release source · Runtime guarantees · Capability guides

from cayu.configuration import RunDefaults

Defaults applied when one run or resume request omits an override.

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
max_steps StrictInt Field(default=DEFAULT_MAX_STEPS, ge=1, le=MAX_STEPS)
limits RunLimits Field(default_factory=RunLimits)
retry_policy RetryPolicy Field(default_factory=RetryPolicy)
thinking ThinkingConfig | None None
RunDefaults.detach_limits(value: RunLimits) -> RunLimits
RunDefaults.detach_retry_policy(value: RetryPolicy) -> RetryPolicy
RunDefaults.detach_thinking(value: ThinkingConfig | None) -> ThinkingConfig | None
RunDefaults.copy_limits() -> RunLimits

Return ordinary mutable request limits detached from this config.

Release source · Runtime guarantees · Capability guides

from cayu.configuration import ToolExecutionConfig

Application-wide attachment and tool-execution defaults.

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
max_file_attachment_bytes StrictInt Field(default=DEFAULT_MAX_FILE_ATTACHMENT_BYTES, ge=1)
max_total_file_attachment_bytes StrictInt Field(default=DEFAULT_MAX_TOTAL_FILE_ATTACHMENT_BYTES, ge=1)
max_file_attachments_per_request StrictInt Field(default=DEFAULT_MAX_FILE_ATTACHMENTS_PER_REQUEST, ge=1)
image_max_frame_bytes StrictInt Field(default=64 * 1024 * 1024, ge=1)
image_max_total_bytes StrictInt Field(default=256 * 1024 * 1024, ge=1)
image_max_frames StrictInt Field(default=1024, ge=1)
tool_timeout_seconds float | None None
max_parallel_tool_calls StrictInt Field(default=DEFAULT_MAX_PARALLEL_TOOL_CALLS, ge=1)
ToolExecutionConfig.validate_tool_timeout_seconds(value: Any) -> float | None

Release source · Runtime guarantees · Capability guides