airflow.providers.common.ai.mixins.usage_budget¶
Classes¶
Protocol for the operator attributes and methods |
|
Mixin that bounds |
Module Contents¶
- class airflow.providers.common.ai.mixins.usage_budget.UsageBudgetHostProtocol[source]¶
Bases:
ProtocolProtocol for the operator attributes and methods
UsageBudgetMixinrelies on.
- class airflow.providers.common.ai.mixins.usage_budget.UsageBudgetMixin[source]¶
Mixin that bounds
usage_limitsacross every attempt of a task instance.On Airflow >= 3.3 with
usage_limitsset, cumulative usage is persisted in the task state store (seeTaskStateStoreUsageBudget) so a task retry resumes from the usage earlier attempts already spent instead of starting a fresh count.Operators that use this mixin must provide
usage_limits,logandrun_agent_sync(seeCancellableAgentRunMixin).