cayu.budgets.quality
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.
ComparableGenerationSettings
Section titled “ComparableGenerationSettings”from cayu.budgets import ComparableGenerationSettingsOpaque identity of the output-affecting settings declared for one side.
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 |
|---|---|---|
revision |
str |
Field(max_length=71) |
validate_revision (method)
Section titled “validate_revision (method)”ComparableGenerationSettings.validate_revision(value: str) -> strRelease source · Runtime guarantees · Capability guides
ComparableOutputBudget
Section titled “ComparableOutputBudget”from cayu.budgets import ComparableOutputBudgetThe final-output envelope that must match across a verified pair.
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 |
|---|---|---|
output_mode |
Literal['text', 'structured'] |
'text' |
max_output_tokens |
StrictInt |
Field(gt=0, le=MAX_DURABLE_JSON_INTEGER) |
Release source · Runtime guarantees · Capability guides
compare_paired_cost_quality
Section titled “compare_paired_cost_quality”from cayu.budgets import compare_paired_cost_qualityReturn one deterministic report from bounded caller-owned evidence.
compare_paired_cost_quality(request: PairedCostQualityComparisonRequest) -> PairedCostQualityComparisonReportRelease source · Runtime guarantees · Capability guides
ComparisonCostLineItem
Section titled “ComparisonCostLineItem”from cayu.budgets import ComparisonCostLineItemBounded, safe accounting projection of one runtime cost line item.
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 |
|---|---|---|
model_step |
StrictInt |
Field(ge=1, le=MAX_DURABLE_JSON_INTEGER) |
execution_profile_fingerprint |
str | None |
Field(default=None, max_length=64, exclude_if=lambda value: value is None) |
provider_name |
str | None |
Field(default=None, max_length=_MAX_IDENTITY_CHARS) |
requested_model |
str | None |
Field(default=None, max_length=_MAX_IDENTITY_CHARS) |
model |
str | None |
Field(default=None, max_length=_MAX_IDENTITY_CHARS) |
pricing_provider_name |
str | None |
Field(default=None, max_length=_MAX_IDENTITY_CHARS) |
pricing_model |
str | None |
Field(default=None, max_length=_MAX_IDENTITY_CHARS) |
pricing_match |
Literal['exact', 'prefix', 'resource_mapping'] | None |
None |
pricing_provenance |
ComparisonPricingProvenance | None |
None |
pricing_effective_from |
date | None |
None |
pricing_effective_through |
date | None |
None |
pricing_tier_max_input_tokens |
StrictInt | None |
Field(default=None, gt=0, le=MAX_DURABLE_JSON_INTEGER) |
priced |
StrictBool |
required |
unpriced_reason |
UnpricedReason | None |
None |
currency |
str |
Field(max_length=_MAX_IDENTITY_CHARS) |
input_tokens |
StrictInt |
Field(ge=0, le=MAX_DURABLE_JSON_INTEGER) |
output_tokens |
StrictInt |
Field(ge=0, le=MAX_DURABLE_JSON_INTEGER) |
cache_read_input_tokens |
StrictInt |
Field(ge=0, le=MAX_DURABLE_JSON_INTEGER) |
cache_write_input_tokens |
StrictInt |
Field(ge=0, le=MAX_DURABLE_JSON_INTEGER) |
cache_write_5m_input_tokens |
StrictInt |
Field(default=0, ge=0, le=MAX_DURABLE_JSON_INTEGER) |
cache_write_1h_input_tokens |
StrictInt |
Field(default=0, ge=0, le=MAX_DURABLE_JSON_INTEGER) |
cache_write_unknown_ttl_input_tokens |
StrictInt |
Field(default=0, ge=0, le=MAX_DURABLE_JSON_INTEGER) |
web_search_calls |
StrictInt |
Field(default=0, ge=0, le=MAX_DURABLE_JSON_INTEGER) |
web_search_outcome_unknown |
StrictInt |
Field(default=0, ge=0, le=MAX_DURABLE_JSON_INTEGER) |
uncached_input_tokens |
StrictInt |
Field(ge=0, le=MAX_DURABLE_JSON_INTEGER) |
input_cost |
Decimal |
Field(ge=0, le=_MAX_COST_VALUE) |
output_cost |
Decimal |
Field(ge=0, le=_MAX_COST_VALUE) |
cache_read_input_cost |
Decimal |
Field(ge=0, le=_MAX_COST_VALUE) |
cache_write_input_cost |
Decimal |
Field(ge=0, le=_MAX_COST_VALUE) |
web_search_cost |
Decimal |
Field(default=Decimal('0'), ge=0, le=_MAX_COST_VALUE) |
total_cost |
Decimal |
Field(ge=0, le=_MAX_COST_VALUE) |
missing_pricing_reason |
str | None |
Field(default=None, max_length=_MAX_REFERENCE_CHARS) |
from_cost_line_item (method)
Section titled “from_cost_line_item (method)”ComparisonCostLineItem.from_cost_line_item(item: CostLineItem) -> ComparisonCostLineItemcopy_provenance (method)
Section titled “copy_provenance (method)”ComparisonCostLineItem.copy_provenance(value: object) -> objectvalidate_optional_text (method)
Section titled “validate_optional_text (method)”ComparisonCostLineItem.validate_optional_text(value: str | None, info) -> str | Nonevalidate_currency (method)
Section titled “validate_currency (method)”ComparisonCostLineItem.validate_currency(value: str) -> strvalidate_cost (method)
Section titled “validate_cost (method)”ComparisonCostLineItem.validate_cost(value: Decimal, info) -> DecimalRelease source · Runtime guarantees · Capability guides
ComparisonPricingCatalog
Section titled “ComparisonPricingCatalog”from cayu.budgets import ComparisonPricingCatalogIdentity of the application-selected price book used for one side.
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 |
Field(max_length=_MAX_IDENTITY_CHARS) |
generated_at |
str |
Field(max_length=_MAX_IDENTITY_CHARS) |
validate_identity (method)
Section titled “validate_identity (method)”ComparisonPricingCatalog.validate_identity(value: str, info) -> strRelease source · Runtime guarantees · Capability guides
ComparisonPricingProvenance
Section titled “ComparisonPricingProvenance”from cayu.budgets import ComparisonPricingProvenanceBounded, allowlisted pricing source retained in comparison reports.
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 |
|---|---|---|
source |
str |
Field(max_length=_MAX_REFERENCE_CHARS) |
url |
str |
Field(max_length=_MAX_REFERENCE_CHARS) |
as_of |
str |
Field(max_length=_MAX_IDENTITY_CHARS) |
from_provenance (method)
Section titled “from_provenance (method)”ComparisonPricingProvenance.from_provenance(provenance: Provenance) -> ComparisonPricingProvenancevalidate_text (method)
Section titled “validate_text (method)”ComparisonPricingProvenance.validate_text(value: str, info) -> strRelease source · Runtime guarantees · Capability guides
COST_QUALITY_COMPARISON_SCHEMA_VERSION
Section titled “COST_QUALITY_COMPARISON_SCHEMA_VERSION”from cayu.budgets import COST_QUALITY_COMPARISON_SCHEMA_VERSIONCOST_QUALITY_COMPARISON_SCHEMA_VERSION = 3Release source · Runtime guarantees · Capability guides
CostAccountingTotals
Section titled “CostAccountingTotals”from cayu.budgets import CostAccountingTotalsRecomputed usage and priced subtotals for one evidence 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 |
|---|---|---|
attempt_count |
StrictInt |
Field(ge=0) |
first_attempt_count |
StrictInt |
Field(ge=0) |
retry_attempt_count |
StrictInt |
Field(ge=0) |
priced_attempt_count |
StrictInt |
Field(ge=0) |
unpriced_attempt_count |
StrictInt |
Field(ge=0) |
missing_usage_attempt_count |
StrictInt |
Field(ge=0) |
input_tokens |
StrictInt |
Field(ge=0) |
output_tokens |
StrictInt |
Field(ge=0) |
cache_read_input_tokens |
StrictInt |
Field(ge=0) |
cache_write_input_tokens |
StrictInt |
Field(ge=0) |
web_search_calls |
StrictInt |
Field(default=0, ge=0) |
web_search_outcome_unknown |
StrictInt |
Field(default=0, ge=0) |
uncached_input_tokens |
StrictInt |
Field(ge=0) |
currencies |
tuple[CostCurrencyTotal, ...] |
() |
copy_currencies (method)
Section titled “copy_currencies (method)”CostAccountingTotals.copy_currencies(value: object) -> objectRelease source · Runtime guarantees · Capability guides
CostBranchTotals
Section titled “CostBranchTotals”from cayu.budgets import CostBranchTotalsBases: 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 |
|---|---|---|
branch_id |
str |
required |
totals |
CostAccountingTotals |
required |
copy_totals (method)
Section titled “copy_totals (method)”CostBranchTotals.copy_totals(value: object) -> objectRelease source · Runtime guarantees · Capability guides
CostCurrencyTotal
Section titled “CostCurrencyTotal”from cayu.budgets import CostCurrencyTotalPriced subtotal in one currency; currencies are never combined.
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 |
Field(max_length=_MAX_IDENTITY_CHARS) |
priced_cost |
Decimal |
Field(ge=0) |
validate_currency (method)
Section titled “validate_currency (method)”CostCurrencyTotal.validate_currency(value: str) -> strvalidate_cost (method)
Section titled “validate_cost (method)”CostCurrencyTotal.validate_cost(value: Decimal) -> DecimalRelease source · Runtime guarantees · Capability guides
CostDirection
Section titled “CostDirection”from cayu.budgets import CostDirectionObserved direction of candidate cost relative to baseline cost.
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 |
|---|---|---|
SAVINGS |
class attribute |
'savings' |
BREAK_EVEN |
class attribute |
'break_even' |
INCREASED_COST |
class attribute |
'increased_cost' |
UNAVAILABLE |
class attribute |
'unavailable' |
Release source · Runtime guarantees · Capability guides
CostOperationTotals
Section titled “CostOperationTotals”from cayu.budgets import CostOperationTotalsBases: 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 |
|---|---|---|
operation |
CostQualityAttemptOperation |
required |
totals |
CostAccountingTotals |
required |
copy_totals (method)
Section titled “copy_totals (method)”CostOperationTotals.copy_totals(value: object) -> objectRelease source · Runtime guarantees · Capability guides
CostQualityAggregateReport
Section titled “CostQualityAggregateReport”from cayu.budgets import CostQualityAggregateReportVerified-pair arithmetic plus every typed exclusion.
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 |
|---|---|---|
status |
CostQualityComparisonStatus |
required |
pair_count |
StrictInt |
Field(ge=1) |
eligible_pair_ids |
tuple[str, ...] |
required |
exclusions |
tuple[CostQualityPairExclusion, ...] |
required |
findings |
tuple[CostQualityFinding, ...] |
required |
currency |
str | None |
required |
baseline_cost |
Decimal | None |
required |
candidate_cost |
Decimal | None |
required |
savings |
Decimal | None |
required |
savings_percentage |
Decimal | None |
required |
savings_percentage_state |
SavingsPercentageState |
required |
cost_direction |
CostDirection |
required |
copy_exclusions (method)
Section titled “copy_exclusions (method)”CostQualityAggregateReport.copy_exclusions(value: object) -> objectcopy_findings (method)
Section titled “copy_findings (method)”CostQualityAggregateReport.copy_findings(value: object) -> objectRelease source · Runtime guarantees · Capability guides
CostQualityAttemptOperation
Section titled “CostQualityAttemptOperation”from cayu.budgets import CostQualityAttemptOperationWhy one provider attempt was made.
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 |
|---|---|---|
AGENT_STEP |
class attribute |
'agent_step' |
COMPACTION |
class attribute |
'compaction' |
STRUCTURED_OUTPUT_REPAIR |
class attribute |
'structured_output_repair' |
EVALUATION |
class attribute |
'evaluation' |
REPAIR |
class attribute |
'repair' |
COMPARISON_CONTROL |
class attribute |
'comparison_control' |
Release source · Runtime guarantees · Capability guides
CostQualityComparisonStatus
Section titled “CostQualityComparisonStatus”from cayu.budgets import CostQualityComparisonStatusStrength of the cost-and-quality claim supported by retained evidence.
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 |
|---|---|---|
VERIFIED |
class attribute |
'verified' |
MEASURED_UNMATCHED |
class attribute |
'measured_unmatched' |
UNPRICED |
class attribute |
'unpriced' |
UNAVAILABLE |
class attribute |
'unavailable' |
Release source · Runtime guarantees · Capability guides
CostQualityFinding
Section titled “CostQualityFinding”from cayu.budgets import CostQualityFindingOne typed, bounded explanation of proof loss.
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 |
|---|---|---|
code |
CostQualityFindingCode |
required |
field |
str |
Field(max_length=_MAX_IDENTITY_CHARS) |
detail |
str |
Field(max_length=_MAX_REFERENCE_CHARS) |
validate_text (method)
Section titled “validate_text (method)”CostQualityFinding.validate_text(value: str, info) -> strRelease source · Runtime guarantees · Capability guides
CostQualityFindingCode
Section titled “CostQualityFindingCode”from cayu.budgets import CostQualityFindingCodeStable reason a pair or aggregate cannot make a stronger claim.
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 |
|---|---|---|
MISSING_SIDE |
class attribute |
'missing_side' |
WORKLOAD_MISMATCH |
class attribute |
'workload_mismatch' |
TASK_MISMATCH |
class attribute |
'task_mismatch' |
SOURCE_MISMATCH |
class attribute |
'source_mismatch' |
SOURCE_CHECKPOINT_MISMATCH |
class attribute |
'source_checkpoint_mismatch' |
ROLE_MISMATCH |
class attribute |
'role_mismatch' |
OUTPUT_BUDGET_MISMATCH |
class attribute |
'output_budget_mismatch' |
GENERATION_SETTINGS_MISMATCH |
class attribute |
'generation_settings_mismatch' |
MISSING_ATTEMPTS |
class attribute |
'missing_attempts' |
DUPLICATE_ATTEMPT |
class attribute |
'duplicate_attempt' |
ATTEMPT_SEQUENCE_INVALID |
class attribute |
'attempt_sequence_invalid' |
MISSING_ATTEMPT_IDENTITY |
class attribute |
'missing_attempt_identity' |
MISSING_USAGE |
class attribute |
'missing_usage' |
CONTRADICTORY_USAGE |
class attribute |
'contradictory_usage' |
MISSING_PRICING_PROVENANCE |
class attribute |
'missing_pricing_provenance' |
PRICING_CATALOG_MISMATCH |
class attribute |
'pricing_catalog_mismatch' |
PRICING_PROVENANCE_MISMATCH |
class attribute |
'pricing_provenance_mismatch' |
MIXED_CURRENCY |
class attribute |
'mixed_currency' |
UNPRICED_ATTEMPT |
class attribute |
'unpriced_attempt' |
QUALITY_EVIDENCE_MISSING |
class attribute |
'quality_evidence_missing' |
QUALITY_CONTRACT_MISMATCH |
class attribute |
'quality_contract_mismatch' |
QUALITY_EVIDENCE_INVALID |
class attribute |
'quality_evidence_invalid' |
QUALITY_GATE_FAILED |
class attribute |
'quality_gate_failed' |
QUALITY_GATE_UNAVAILABLE |
class attribute |
'quality_gate_unavailable' |
AGGREGATE_COHORT_MISMATCH |
class attribute |
'aggregate_cohort_mismatch' |
Release source · Runtime guarantees · Capability guides
CostQualityPairExclusion
Section titled “CostQualityPairExclusion”from cayu.budgets import CostQualityPairExclusionWhy one pair does not contribute to the verified aggregate percentage.
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 |
|---|---|---|
pair_id |
str |
required |
status |
CostQualityComparisonStatus |
required |
findings |
tuple[CostQualityFinding, ...] |
required |
copy_findings (method)
Section titled “copy_findings (method)”CostQualityPairExclusion.copy_findings(value: object) -> objectRelease source · Runtime guarantees · Capability guides
CostSessionTotals
Section titled “CostSessionTotals”from cayu.budgets import CostSessionTotalsBases: 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 |
totals |
CostAccountingTotals |
required |
copy_totals (method)
Section titled “copy_totals (method)”CostSessionTotals.copy_totals(value: object) -> objectRelease source · Runtime guarantees · Capability guides
PairedCostAttempt
Section titled “PairedCostAttempt”from cayu.budgets import PairedCostAttemptOne attributable provider attempt and its provider-reported cost evidence.
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 |
|---|---|---|
attempt_id |
str |
Field(max_length=_MAX_IDENTITY_CHARS) |
operation_id |
str |
Field(max_length=_MAX_IDENTITY_CHARS) |
session_id |
str |
Field(max_length=_MAX_IDENTITY_CHARS) |
branch_id |
str | None |
Field(default=None, max_length=_MAX_IDENTITY_CHARS) |
role |
str |
Field(max_length=_MAX_IDENTITY_CHARS) |
operation |
CostQualityAttemptOperation |
required |
attempt_ordinal |
StrictInt |
Field(ge=1, le=MAX_DURABLE_JSON_INTEGER) |
provider_name |
str | None |
Field(default=None, max_length=_MAX_IDENTITY_CHARS) |
model |
str | None |
Field(default=None, max_length=_MAX_IDENTITY_CHARS) |
source_checkpoint_id |
str | None |
Field(default=None, max_length=_MAX_IDENTITY_CHARS) |
cost |
ComparisonCostLineItem | None |
None |
usage_unavailable_reason |
str | None |
Field(default=None, max_length=_MAX_REFERENCE_CHARS) |
copy_cost (method)
Section titled “copy_cost (method)”PairedCostAttempt.copy_cost(value: object) -> objectvalidate_identity (method)
Section titled “validate_identity (method)”PairedCostAttempt.validate_identity(value: str, info) -> strvalidate_optional_text (method)
Section titled “validate_optional_text (method)”PairedCostAttempt.validate_optional_text(value: str | None, info) -> str | NoneRelease source · Runtime guarantees · Capability guides
PairedCostQualityComparisonReport
Section titled “PairedCostQualityComparisonReport”from cayu.budgets import PairedCostQualityComparisonReportVersioned, serialization-safe result of one pure comparison.
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 |
|---|---|---|
schema_version |
Literal[3] |
COST_QUALITY_COMPARISON_SCHEMA_VERSION |
status |
CostQualityComparisonStatus |
required |
pairs |
tuple[PairedCostQualityPairReport, ...] |
required |
aggregate |
CostQualityAggregateReport |
required |
copy_pairs (method)
Section titled “copy_pairs (method)”PairedCostQualityComparisonReport.copy_pairs(value: object) -> objectcopy_aggregate (method)
Section titled “copy_aggregate (method)”PairedCostQualityComparisonReport.copy_aggregate(value: object) -> objectRelease source · Runtime guarantees · Capability guides
PairedCostQualityComparisonRequest
Section titled “PairedCostQualityComparisonRequest”from cayu.budgets import PairedCostQualityComparisonRequestBounded input to the canonical paired cost-and-quality comparison.
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 |
|---|---|---|
pairs |
tuple[PairedCostQualityPair, ...] |
Field(min_length=1, max_length=_MAX_PAIRS) |
order_pairs (method)
Section titled “order_pairs (method)”PairedCostQualityComparisonRequest.order_pairs(value: tuple[PairedCostQualityPair, ...]) -> tuple[PairedCostQualityPair, ...]validate_request_work (method)
Section titled “validate_request_work (method)”PairedCostQualityComparisonRequest.validate_request_work() -> PairedCostQualityComparisonRequestRelease source · Runtime guarantees · Capability guides
PairedCostQualityPair
Section titled “PairedCostQualityPair”from cayu.budgets import PairedCostQualityPairA stable pair identity with optional sides so absence stays explicit.
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 |
|---|---|---|
pair_id |
str |
Field(max_length=_MAX_IDENTITY_CHARS) |
baseline |
PairedCostQualitySide | None |
None |
candidate |
PairedCostQualitySide | None |
None |
copy_sides (method)
Section titled “copy_sides (method)”PairedCostQualityPair.copy_sides(value: object) -> objectvalidate_pair_id (method)
Section titled “validate_pair_id (method)”PairedCostQualityPair.validate_pair_id(value: str) -> strRelease source · Runtime guarantees · Capability guides
PairedCostQualityPairReport
Section titled “PairedCostQualityPairReport”from cayu.budgets import PairedCostQualityPairReportOne pair’s raw accounting and strongest supportable claim.
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 |
|---|---|---|
pair_id |
str |
required |
status |
CostQualityComparisonStatus |
required |
findings |
tuple[CostQualityFinding, ...] |
required |
baseline |
PairedCostQualitySideReport | None |
required |
candidate |
PairedCostQualitySideReport | None |
required |
eligible_for_verified_aggregate |
bool |
required |
currency |
str | None |
required |
baseline_cost |
Decimal | None |
required |
candidate_cost |
Decimal | None |
required |
savings |
Decimal | None |
required |
savings_percentage |
Decimal | None |
required |
savings_percentage_state |
SavingsPercentageState |
required |
cost_direction |
CostDirection |
required |
copy_findings (method)
Section titled “copy_findings (method)”PairedCostQualityPairReport.copy_findings(value: object) -> objectcopy_sides (method)
Section titled “copy_sides (method)”PairedCostQualityPairReport.copy_sides(value: object) -> objectRelease source · Runtime guarantees · Capability guides
PairedCostQualitySide
Section titled “PairedCostQualitySide”from cayu.budgets import PairedCostQualitySideOne baseline or candidate strategy under a matched comparison contract.
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 |
|---|---|---|
strategy_id |
str |
Field(max_length=_MAX_IDENTITY_CHARS) |
workload_id |
str |
Field(max_length=_MAX_IDENTITY_CHARS) |
task_id |
str |
Field(max_length=_MAX_IDENTITY_CHARS) |
source_id |
str |
Field(max_length=_MAX_IDENTITY_CHARS) |
role |
str |
Field(max_length=_MAX_IDENTITY_CHARS) |
output_budget |
ComparableOutputBudget |
required |
generation_settings |
ComparableGenerationSettings |
required |
pricing_catalog |
ComparisonPricingCatalog | None |
None |
quality |
PairedQualityEvidence | None |
None |
attempts |
tuple[PairedCostAttempt, ...] |
Field(default_factory=tuple, max_length=_MAX_ATTEMPTS_PER_SIDE) |
copy_nested_contracts (method)
Section titled “copy_nested_contracts (method)”PairedCostQualitySide.copy_nested_contracts(value: object) -> objectcopy_attempts (method)
Section titled “copy_attempts (method)”PairedCostQualitySide.copy_attempts(value: object) -> objectvalidate_identity (method)
Section titled “validate_identity (method)”PairedCostQualitySide.validate_identity(value: str, info) -> strRelease source · Runtime guarantees · Capability guides
PairedCostQualitySideReport
Section titled “PairedCostQualitySideReport”from cayu.budgets import PairedCostQualitySideReportSafe, deterministic accounting projection for one supplied side.
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 |
|---|---|---|
strategy_id |
str |
required |
workload_id |
str |
required |
task_id |
str |
required |
source_id |
str |
required |
role |
str |
required |
output_budget |
ComparableOutputBudget |
required |
generation_settings |
ComparableGenerationSettings |
required |
pricing_catalog |
ComparisonPricingCatalog | None |
required |
pricing_provenance |
tuple[ComparisonPricingProvenance, ...] |
required |
quality |
PairedQualityEvidence | None |
required |
attempts |
tuple[PairedCostAttempt, ...] |
required |
whole_harness |
CostAccountingTotals |
required |
operations |
tuple[CostOperationTotals, ...] |
required |
sessions |
tuple[CostSessionTotals, ...] |
required |
branches |
tuple[CostBranchTotals, ...] |
required |
copy_nested_contracts (method)
Section titled “copy_nested_contracts (method)”PairedCostQualitySideReport.copy_nested_contracts(value: object) -> objectcopy_provenance (method)
Section titled “copy_provenance (method)”PairedCostQualitySideReport.copy_provenance(value: object) -> objectcopy_attempts (method)
Section titled “copy_attempts (method)”PairedCostQualitySideReport.copy_attempts(value: object) -> objectcopy_breakdowns (method)
Section titled “copy_breakdowns (method)”PairedCostQualitySideReport.copy_breakdowns(value: object, info) -> objectRelease source · Runtime guarantees · Capability guides
PairedQualityEvidence
Section titled “PairedQualityEvidence”from cayu.budgets import PairedQualityEvidenceApplication-owned result from one declared quality contract.
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 |
|---|---|---|
contract_name |
str |
Field(max_length=_MAX_IDENTITY_CHARS) |
contract_version |
str |
Field(max_length=_MAX_IDENTITY_CHARS) |
threshold |
Decimal |
Field(ge=0, le=1) |
role |
str |
Field(max_length=_MAX_IDENTITY_CHARS) |
status |
QualityEvidenceStatus |
required |
score |
Decimal | None |
Field(default=None, ge=0, le=1) |
references |
tuple[QualityEvidenceReference, ...] |
Field(default_factory=tuple, max_length=_MAX_QUALITY_REFERENCES) |
order_references (method)
Section titled “order_references (method)”PairedQualityEvidence.order_references(value: tuple[QualityEvidenceReference, ...]) -> tuple[QualityEvidenceReference, ...]validate_identity (method)
Section titled “validate_identity (method)”PairedQualityEvidence.validate_identity(value: str, info) -> strvalidate_decimal (method)
Section titled “validate_decimal (method)”PairedQualityEvidence.validate_decimal(value: Decimal | None, info) -> Decimal | NoneRelease source · Runtime guarantees · Capability guides
QualityEvidenceReference
Section titled “QualityEvidenceReference”from cayu.budgets import QualityEvidenceReferenceOpaque, non-secret identifier for application-owned quality evidence.
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 |
str |
Field(max_length=128) |
reference |
str |
Field(max_length=71) |
validate_kind (method)
Section titled “validate_kind (method)”QualityEvidenceReference.validate_kind(value: str, info) -> strvalidate_reference (method)
Section titled “validate_reference (method)”QualityEvidenceReference.validate_reference(value: str) -> strRelease source · Runtime guarantees · Capability guides
QualityEvidenceStatus
Section titled “QualityEvidenceStatus”from cayu.budgets import QualityEvidenceStatusOutcome of one application-owned quality gate.
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 |
|---|---|---|
PASSED |
class attribute |
'passed' |
FAILED |
class attribute |
'failed' |
UNAVAILABLE |
class attribute |
'unavailable' |
Release source · Runtime guarantees · Capability guides
SavingsPercentageState
Section titled “SavingsPercentageState”from cayu.budgets import SavingsPercentageStateWhy a savings percentage is present or absent.
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 |
|---|---|---|
COMPUTED |
class attribute |
'computed' |
ZERO_BASELINE |
class attribute |
'zero_baseline' |
UNAVAILABLE |
class attribute |
'unavailable' |