cayu.budgets.aggregates
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.
AggregateAccuracy
Section titled “AggregateAccuracy”from cayu.budgets import AggregateAccuracyTruthfulness metadata for a bounded aggregate or one of its sections.
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 |
|---|---|---|
kind |
AggregateAccuracyKind |
required |
reason |
str | None |
None |
limit |
StrictInt | None |
Field(default=None, ge=1) |
validate_reason (method)
Section titled “validate_reason (method)”AggregateAccuracy.validate_reason(value: str | None) -> str | Nonevalidate_details (method)
Section titled “validate_details (method)”AggregateAccuracy.validate_details() -> AggregateAccuracyRelease source · Runtime guarantees · Capability guides
AggregateAccuracyKind
Section titled “AggregateAccuracyKind”from cayu.budgets import AggregateAccuracyKindHow completely an aggregate projection represents its requested scope.
Bases: StrEnum.
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 |
|---|---|---|
EXACT |
class attribute |
'exact' |
SAMPLED |
class attribute |
'sampled' |
TRUNCATED |
class attribute |
'truncated' |
Release source · Runtime guarantees · Capability guides
estimate_usage_rollup_cost
Section titled “estimate_usage_rollup_cost”from cayu.budgets import estimate_usage_rollup_costPrice an exact bounded input projection without reporting partial totals.
estimate_usage_rollup_cost(result: UsageRollupStoreResult, pricing, *, billing_group_limit: int=20) -> UsageCostRollupRelease source · Runtime guarantees · Capability guides
estimate_usage_session_cost_breakdown
Section titled “estimate_usage_session_cost_breakdown”from cayu.budgets import estimate_usage_session_cost_breakdownPrice retained session groups without publishing partial session costs.
estimate_usage_session_cost_breakdown(result: UsageRollupStoreResult, pricing) -> UsageSessionCostBreakdownRelease source · Runtime guarantees · Capability guides
UsageAggregateBreakdown
Section titled “UsageAggregateBreakdown”from cayu.budgets import UsageAggregateBreakdownDeterministic top groups plus an exact remainder when detail is bounded.
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 |
|---|---|---|
groups |
tuple[UsageAggregateGroup, ...] |
Field(max_length=100) |
remainder |
UsageAggregateRemainder | None |
required |
accuracy |
AggregateAccuracy |
required |
copy_groups (method)
Section titled “copy_groups (method)”UsageAggregateBreakdown.copy_groups(value: object) -> objectcopy_nested_contracts (method)
Section titled “copy_nested_contracts (method)”UsageAggregateBreakdown.copy_nested_contracts(value: object) -> objectvalidate_accuracy (method)
Section titled “validate_accuracy (method)”UsageAggregateBreakdown.validate_accuracy() -> UsageAggregateBreakdownRelease source · Runtime guarantees · Capability guides
UsageAggregateGroup
Section titled “UsageAggregateGroup”from cayu.budgets import UsageAggregateGroupOne provider/model grouping inside a bounded usage breakdown.
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 |
|---|---|---|
provider_name |
str | None |
required |
model |
str | None |
required |
totals |
UsageAggregateTotals |
required |
copy_totals (method)
Section titled “copy_totals (method)”UsageAggregateGroup.copy_totals(value: object) -> objectvalidate_optional_identity (method)
Section titled “validate_optional_identity (method)”UsageAggregateGroup.validate_optional_identity(value: str | None, info) -> str | NoneRelease source · Runtime guarantees · Capability guides
UsageAggregateRemainder
Section titled “UsageAggregateRemainder”from cayu.budgets import UsageAggregateRemainderExact totals represented by groups omitted from a bounded breakdown.
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 |
|---|---|---|
group_count |
PositiveAggregateCount |
Field(ge=1) |
totals |
UsageAggregateTotals |
required |
copy_totals (method)
Section titled “copy_totals (method)”UsageAggregateRemainder.copy_totals(value: object) -> objectRelease source · Runtime guarantees · Capability guides
UsageAggregateTotals
Section titled “UsageAggregateTotals”from cayu.budgets import UsageAggregateTotalsIdentity-free activity and token totals for one aggregate scope.
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_count |
AggregateCount |
Field(ge=0) |
model_steps |
AggregateCount |
Field(ge=0) |
model_steps_with_usage |
AggregateCount |
Field(ge=0) |
tool_calls |
AggregateCount |
Field(ge=0) |
usage |
AggregateUsageMetrics |
required |
copy_usage (method)
Section titled “copy_usage (method)”UsageAggregateTotals.copy_usage(value: object) -> objectvalidate_reported_steps (method)
Section titled “validate_reported_steps (method)”UsageAggregateTotals.validate_reported_steps() -> UsageAggregateTotalsRelease source · Runtime guarantees · Capability guides
UsageBillingCostBreakdown
Section titled “UsageBillingCostBreakdown”from cayu.budgets import UsageBillingCostBreakdownBounded identity detail for evaluated cost inputs, with an exact remainder.
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 |
|---|---|---|
identified_model_steps |
AggregateCount |
Field(ge=0) |
identified_auxiliary_attempts |
AggregateCount |
Field(default=0, ge=0) |
groups |
tuple[UsageBillingCostGroup, ...] |
Field(max_length=100) |
remainder |
UsageBillingCostRemainder | None |
required |
accuracy |
AggregateAccuracy |
required |
copy_groups (method)
Section titled “copy_groups (method)”UsageBillingCostBreakdown.copy_groups(value: object) -> objectcopy_nested_contracts (method)
Section titled “copy_nested_contracts (method)”UsageBillingCostBreakdown.copy_nested_contracts(value: object) -> objectvalidate_scope (method)
Section titled “validate_scope (method)”UsageBillingCostBreakdown.validate_scope() -> UsageBillingCostBreakdownRelease source · Runtime guarantees · Capability guides
UsageBillingCostGroup
Section titled “UsageBillingCostGroup”from cayu.budgets import UsageBillingCostGroupOne bounded, identity-bearing group of equivalent pricing outcomes.
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 |
|---|---|---|
billing_identity |
UsageBillingIdentity |
required |
pricing_provider_name |
str | None |
None |
pricing_model |
str | None |
None |
priced |
StrictBool |
required |
model_steps |
AggregateCount |
Field(ge=0) |
auxiliary_attempts |
AggregateCount |
Field(default=0, ge=0) |
currency |
str | None |
None |
total_cost |
Decimal |
Field(ge=0) |
missing_pricing_reason |
str | None |
None |
copy_billing_identity (method)
Section titled “copy_billing_identity (method)”UsageBillingCostGroup.copy_billing_identity(value: object) -> objectvalidate_optional_text (method)
Section titled “validate_optional_text (method)”UsageBillingCostGroup.validate_optional_text(value: str | None, info) -> str | Nonevalidate_outcome (method)
Section titled “validate_outcome (method)”UsageBillingCostGroup.validate_outcome() -> UsageBillingCostGroupRelease source · Runtime guarantees · Capability guides
UsageBillingCostRemainder
Section titled “UsageBillingCostRemainder”from cayu.budgets import UsageBillingCostRemainderExact counts for identity-bearing pricing groups omitted from bounded detail.
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 |
|---|---|---|
group_count |
PositiveAggregateCount |
Field(ge=1) |
model_steps |
AggregateCount |
Field(ge=0) |
auxiliary_attempts |
AggregateCount |
Field(default=0, ge=0) |
priced_auxiliary_attempts |
AggregateCount |
Field(default=0, ge=0) |
unpriced_auxiliary_attempts |
AggregateCount |
Field(default=0, ge=0) |
priced_model_steps |
AggregateCount |
Field(ge=0) |
unpriced_model_steps |
AggregateCount |
Field(ge=0) |
validate_step_accounting (method)
Section titled “validate_step_accounting (method)”UsageBillingCostRemainder.validate_step_accounting() -> UsageBillingCostRemainderRelease source · Runtime guarantees · Capability guides
UsageBillingIdentity
Section titled “UsageBillingIdentity”from cayu.budgets import UsageBillingIdentityBounded commercial identity safe to return in an aggregate response.
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 |
|---|---|---|
provider_name |
str |
required |
resource_id |
str |
required |
request_evidence |
dict[str, str] |
Field(default_factory=dict, max_length=4) |
completion_evidence |
dict[str, str] |
Field(default_factory=dict, max_length=1) |
validate_identity (method)
Section titled “validate_identity (method)”UsageBillingIdentity.validate_identity(value: str, info) -> strcopy_evidence (method)
Section titled “copy_evidence (method)”UsageBillingIdentity.copy_evidence(value: dict[str, str], info) -> dict[str, str]validate_display_contract (method)
Section titled “validate_display_contract (method)”UsageBillingIdentity.validate_display_contract() -> UsageBillingIdentityRelease source · Runtime guarantees · Capability guides
UsageCostRollup
Section titled “UsageCostRollup”from cayu.budgets import UsageCostRollupBounded cost result derived from grouped price-relevant inputs.
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 |
|---|---|---|
price_book_version |
str |
required |
price_book_generated_at |
str |
required |
accuracy |
AggregateAccuracy |
required |
evaluated_model_steps |
AggregateCount |
Field(ge=0) |
evaluated_auxiliary_attempts |
AggregateCount |
Field(default=0, ge=0) |
priced_auxiliary_attempts |
AggregateCount |
Field(default=0, ge=0) |
unpriced_auxiliary_attempts |
AggregateCount |
Field(default=0, ge=0) |
priced_model_steps |
AggregateCount |
Field(ge=0) |
unpriced_model_steps |
AggregateCount |
Field(ge=0) |
unevaluated_model_steps |
AggregateCount |
Field(ge=0) |
currencies |
tuple[UsageCurrencyCost, ...] |
Field(max_length=5000) |
unpriced_reasons |
tuple[UsageUnpricedReason, ...] |
Field(max_length=5000) |
billing_breakdown |
UsageBillingCostBreakdown |
required |
copy_detail (method)
Section titled “copy_detail (method)”UsageCostRollup.copy_detail(value: object) -> objectcopy_nested_contracts (method)
Section titled “copy_nested_contracts (method)”UsageCostRollup.copy_nested_contracts(value: object) -> objectvalidate_price_book_identity (method)
Section titled “validate_price_book_identity (method)”UsageCostRollup.validate_price_book_identity(value: str, info) -> strvalidate_step_accounting (method)
Section titled “validate_step_accounting (method)”UsageCostRollup.validate_step_accounting() -> UsageCostRollupRelease source · Runtime guarantees · Capability guides
UsageCurrencyCost
Section titled “UsageCurrencyCost”from cayu.budgets import UsageCurrencyCostExact estimated model-step and hosted-resource cost for one currency.
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 |
|---|---|---|
currency |
str |
required |
model_steps |
AggregateCount |
Field(ge=0) |
auxiliary_attempts |
AggregateCount |
Field(default=0, ge=0) |
hosted_resources |
AggregateCount |
Field(default=0, ge=0, exclude_if=lambda value: value == 0) |
total_cost |
Decimal |
Field(ge=0) |
validate_currency (method)
Section titled “validate_currency (method)”UsageCurrencyCost.validate_currency(value: str) -> strvalidate_evidence_count (method)
Section titled “validate_evidence_count (method)”UsageCurrencyCost.validate_evidence_count() -> UsageCurrencyCostRelease source · Runtime guarantees · Capability guides
UsagePricingInput
Section titled “UsagePricingInput”from cayu.budgets import UsagePricingInputOne bounded group of identical, price-relevant event inputs.
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 | None |
Field(default=None, exclude_if=lambda value: value is None) |
effective_on |
date |
required |
occurrences |
StrictInt |
Field(ge=1) |
event_type |
UsagePricingEventType |
'model.completed' |
metrics |
UsageMetrics | None |
None |
validate_session_id (method)
Section titled “validate_session_id (method)”UsagePricingInput.validate_session_id(value: str | None) -> str | Nonecopy_metrics (method)
Section titled “copy_metrics (method)”UsagePricingInput.copy_metrics(value: object) -> objectRelease source · Runtime guarantees · Capability guides
UsageRollupInconsistent
Section titled “UsageRollupInconsistent”from cayu.budgets import UsageRollupInconsistentA store returned a usage projection that does not honor its query.
Bases: ValueError.
This type’s implementation and inherited behavior are available in the linked release source.
Release source · Runtime guarantees · Capability guides
UsageRollupResultTooLarge
Section titled “UsageRollupResultTooLarge”from cayu.budgets import UsageRollupResultTooLargeA usage projection cannot cross its bounded public contract safely.
Bases: ValueError.
This type’s implementation and inherited behavior are available in the linked release source.
Release source · Runtime guarantees · Capability guides
UsageRollupStoreResult
Section titled “UsageRollupStoreResult”from cayu.budgets import UsageRollupStoreResultBounded store projection used to construct the public usage rollup.
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 |
|---|---|---|
reported_costs |
ReportedCostPage | None |
None |
as_of |
datetime |
required |
start_at |
datetime |
required |
end_at |
datetime |
required |
totals |
UsageAggregateTotals |
required |
totals_accuracy |
AggregateAccuracy |
Field(default_factory=lambda: EXACT_AGGREGATE.model_copy()) |
provider_breakdown |
UsageAggregateBreakdown |
required |
model_breakdown |
UsageAggregateBreakdown |
required |
session_breakdown |
UsageSessionAggregateBreakdown | None |
None |
pricing_inputs |
tuple[UsagePricingInput, ...] |
Field(default=(), max_length=5000) |
pricing_inputs_included |
StrictBool |
False |
pricing_input_group_count |
StrictInt |
Field(default=0, ge=0, description='Exact canonical group count when pricing_inputs_accuracy is exact; the number observed before bounded collection stopped when truncated.') |
pricing_inputs_accuracy |
AggregateAccuracy |
Field(default_factory=lambda: EXACT_AGGREGATE.model_copy()) |
session_pricing_inputs |
tuple[UsagePricingInput, ...] |
Field(default=(), max_length=5000) |
session_pricing_inputs_included |
StrictBool |
False |
session_pricing_input_group_count |
StrictInt |
Field(default=0, ge=0) |
session_pricing_inputs_accuracy |
AggregateAccuracy |
Field(default_factory=lambda: EXACT_AGGREGATE.model_copy()) |
active_session_count |
StrictInt |
Field(default=0, ge=0) |
matching_session_count |
StrictInt |
Field(default=0, ge=0) |
includes_active_sessions |
StrictBool |
True |
copy_nested_contracts (method)
Section titled “copy_nested_contracts (method)”UsageRollupStoreResult.copy_nested_contracts(value: object) -> objectcopy_pricing_inputs (method)
Section titled “copy_pricing_inputs (method)”UsageRollupStoreResult.copy_pricing_inputs(value: object) -> objectnormalize_timestamp (method)
Section titled “normalize_timestamp (method)”UsageRollupStoreResult.normalize_timestamp(value: datetime, info) -> datetimevalidate_scope (method)
Section titled “validate_scope (method)”UsageRollupStoreResult.validate_scope() -> UsageRollupStoreResultvalidate_for_query (method)
Section titled “validate_for_query (method)”UsageRollupStoreResult.validate_for_query(query: UsageRollupQuery) -> UsageRollupStoreResultReturn a bounded, canonically revalidated result for one query.
Release source · Runtime guarantees · Capability guides
UsageSessionAggregateBreakdown
Section titled “UsageSessionAggregateBreakdown”from cayu.budgets import UsageSessionAggregateBreakdownDeterministic session groups plus an exact aggregate remainder.
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 |
|---|---|---|
groups |
tuple[UsageSessionAggregateGroup, ...] |
Field(max_length=100) |
remainder |
UsageSessionAggregateRemainder | None |
required |
accuracy |
AggregateAccuracy |
required |
copy_groups (method)
Section titled “copy_groups (method)”UsageSessionAggregateBreakdown.copy_groups(value: object) -> objectcopy_nested_contracts (method)
Section titled “copy_nested_contracts (method)”UsageSessionAggregateBreakdown.copy_nested_contracts(value: object) -> objectvalidate_breakdown (method)
Section titled “validate_breakdown (method)”UsageSessionAggregateBreakdown.validate_breakdown() -> UsageSessionAggregateBreakdownRelease source · Runtime guarantees · Capability guides
UsageSessionAggregateGroup
Section titled “UsageSessionAggregateGroup”from cayu.budgets import UsageSessionAggregateGroupExact usage for one retained current session inside a bounded breakdown.
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 |
status |
UsageSessionStatus |
required |
active |
StrictBool |
required |
totals |
UsageAggregateTotals |
required |
copy_totals (method)
Section titled “copy_totals (method)”UsageSessionAggregateGroup.copy_totals(value: object) -> objectvalidate_session_id (method)
Section titled “validate_session_id (method)”UsageSessionAggregateGroup.validate_session_id(value: str) -> strvalidate_active_state (method)
Section titled “validate_active_state (method)”UsageSessionAggregateGroup.validate_active_state() -> UsageSessionAggregateGroupRelease source · Runtime guarantees · Capability guides
UsageSessionAggregateRemainder
Section titled “UsageSessionAggregateRemainder”from cayu.budgets import UsageSessionAggregateRemainderExact usage represented by current sessions omitted from bounded detail.
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 |
|---|---|---|
group_count |
PositiveAggregateCount |
Field(ge=1) |
active_session_count |
AggregateCount |
Field(ge=0) |
totals |
UsageAggregateTotals |
required |
copy_totals (method)
Section titled “copy_totals (method)”UsageSessionAggregateRemainder.copy_totals(value: object) -> objectvalidate_counts (method)
Section titled “validate_counts (method)”UsageSessionAggregateRemainder.validate_counts() -> UsageSessionAggregateRemainderRelease source · Runtime guarantees · Capability guides
UsageSessionCostBreakdown
Section titled “UsageSessionCostBreakdown”from cayu.budgets import UsageSessionCostBreakdownBounded per-session costs plus an aggregate remainder.
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 |
|---|---|---|
price_book_version |
str |
required |
price_book_generated_at |
str |
required |
groups |
tuple[UsageSessionCostGroup, ...] |
Field(max_length=100) |
remainder |
UsageSessionCostRemainder | None |
required |
accuracy |
AggregateAccuracy |
required |
copy_groups (method)
Section titled “copy_groups (method)”UsageSessionCostBreakdown.copy_groups(value: object) -> objectcopy_nested_contracts (method)
Section titled “copy_nested_contracts (method)”UsageSessionCostBreakdown.copy_nested_contracts(value: object) -> objectvalidate_price_book_identity (method)
Section titled “validate_price_book_identity (method)”UsageSessionCostBreakdown.validate_price_book_identity(value: str, info) -> strvalidate_breakdown (method)
Section titled “validate_breakdown (method)”UsageSessionCostBreakdown.validate_breakdown() -> UsageSessionCostBreakdownRelease source · Runtime guarantees · Capability guides
UsageSessionCostGroup
Section titled “UsageSessionCostGroup”from cayu.budgets import UsageSessionCostGroupCost accounting for one retained session.
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 |
cost |
UsageSessionCostSummary |
required |
copy_cost (method)
Section titled “copy_cost (method)”UsageSessionCostGroup.copy_cost(value: object) -> objectvalidate_session_id (method)
Section titled “validate_session_id (method)”UsageSessionCostGroup.validate_session_id(value: str) -> strRelease source · Runtime guarantees · Capability guides
UsageSessionCostRemainder
Section titled “UsageSessionCostRemainder”from cayu.budgets import UsageSessionCostRemainderExact aggregate cost for sessions omitted from bounded detail.
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 |
|---|---|---|
group_count |
PositiveAggregateCount |
Field(ge=1) |
cost |
UsageSessionCostSummary |
required |
copy_cost (method)
Section titled “copy_cost (method)”UsageSessionCostRemainder.copy_cost(value: object) -> objectRelease source · Runtime guarantees · Capability guides
UsageSessionCostSummary
Section titled “UsageSessionCostSummary”from cayu.budgets import UsageSessionCostSummaryCost accounting for one session group or the exact omitted remainder.
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 |
|---|---|---|
accuracy |
AggregateAccuracy |
required |
evaluated_model_steps |
AggregateCount |
Field(ge=0) |
evaluated_auxiliary_attempts |
AggregateCount |
Field(default=0, ge=0) |
priced_auxiliary_attempts |
AggregateCount |
Field(default=0, ge=0) |
unpriced_auxiliary_attempts |
AggregateCount |
Field(default=0, ge=0) |
priced_model_steps |
AggregateCount |
Field(ge=0) |
unpriced_model_steps |
AggregateCount |
Field(ge=0) |
unevaluated_model_steps |
AggregateCount |
Field(ge=0) |
currencies |
tuple[UsageCurrencyCost, ...] |
Field(max_length=5000) |
unpriced_reasons |
tuple[UsageUnpricedReason, ...] |
Field(max_length=5000) |
copy_detail (method)
Section titled “copy_detail (method)”UsageSessionCostSummary.copy_detail(value: object) -> objectcopy_accuracy (method)
Section titled “copy_accuracy (method)”UsageSessionCostSummary.copy_accuracy(value: object) -> objectvalidate_step_accounting (method)
Section titled “validate_step_accounting (method)”UsageSessionCostSummary.validate_step_accounting() -> UsageSessionCostSummaryRelease source · Runtime guarantees · Capability guides
UsageUnpricedReason
Section titled “UsageUnpricedReason”from cayu.budgets import UsageUnpricedReasonModel-step and hosted-resource counts unpriced for one explicit reason.
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 |
|---|---|---|
unpriced_reason |
UnpricedReason | None |
None |
reason |
str |
required |
model_steps |
AggregateCount |
Field(ge=0) |
auxiliary_attempts |
AggregateCount |
Field(default=0, ge=0) |
hosted_resources |
AggregateCount |
Field(default=0, ge=0, exclude_if=lambda value: value == 0) |
validate_reason (method)
Section titled “validate_reason (method)”UsageUnpricedReason.validate_reason(value: str) -> strvalidate_evidence_count (method)
Section titled “validate_evidence_count (method)”UsageUnpricedReason.validate_evidence_count() -> UsageUnpricedReason