airflow.providers.common.ai.exceptions¶
Exceptions¶
Raised when the HITL review loop exhausts max iterations without approval or rejection. |
|
Base class for file-analysis validation errors. |
|
Raised when a file format is not supported by LLM file analysis. |
|
Raised when file-analysis safety limits are exceeded. |
|
Raised when image/PDF inputs are used without |
|
Raised by an LLM operator whose |
|
Raised when a managed agent cannot be reached and retrying will not help. |
|
Base class for |
|
Raised when a batch exceeds a provider's request-count or payload-size limit. |
|
Raised when a per-request |
|
Raised when the connection/model combination has no batch adapter at all. |
|
Raised for a connection type common.ai recognizes but does not yet support for batch. |
|
Raised on retry when the recorded input fingerprint no longer matches and |
|
Raised when |
|
Base class for |
|
Raised when the wall-clock defer budget is exhausted before the batch reaches a terminal state. |
|
Raised when an intent record has no matching batch and |
|
Raised when |
|
Raised when the batch was cancelled (by |
|
Raised when checking the provider for an orphaned batch failed. |
|
Raised when the run-stable state file exists but cannot be read or parsed. |
Module Contents¶
- exception airflow.providers.common.ai.exceptions.HITLMaxIterationsError[source]¶
Bases:
airflow.providers.common.compat.sdk.AirflowExceptionRaised when the HITL review loop exhausts max iterations without approval or rejection.
- exception airflow.providers.common.ai.exceptions.LLMFileAnalysisError[source]¶
Bases:
ValueErrorBase class for file-analysis validation errors.
- exception airflow.providers.common.ai.exceptions.LLMFileAnalysisUnsupportedFormatError[source]¶
Bases:
LLMFileAnalysisErrorRaised when a file format is not supported by LLM file analysis.
- exception airflow.providers.common.ai.exceptions.LLMFileAnalysisLimitExceededError[source]¶
Bases:
LLMFileAnalysisErrorRaised when file-analysis safety limits are exceeded.
- exception airflow.providers.common.ai.exceptions.LLMFileAnalysisMultimodalRequiredError[source]¶
Bases:
LLMFileAnalysisUnsupportedFormatErrorRaised when image/PDF inputs are used without
multi_modal=True.
- exception airflow.providers.common.ai.exceptions.LowConfidenceError[source]¶
Bases:
ValueErrorRaised by an LLM operator whose
DecisionPolicysayson_uncertain="fail".The model’s confidence in its answer was under the policy’s bar, or the model reported no confidence at all. Airflow’s default retry behaviour retries it like any other exception; match it in a retry rule to fail fast instead.
- exception airflow.providers.common.ai.exceptions.ManagedAgentInvocationError[source]¶
Bases:
RuntimeErrorRaised when a managed agent cannot be reached and retrying will not help.
Reserved for terminal conditions – bad credentials, a missing agent, a revoked quota. Transient failures should propagate unchanged so Airflow’s task-level retry handles them, and requests the model could fix by rephrasing should raise
pydantic_ai.exceptions.ModelRetryinstead.
- exception airflow.providers.common.ai.exceptions.LLMBatchInputError[source]¶
Bases:
ValueErrorBase class for
@task.llm_batcherrors detected before a batch is submitted.
- exception airflow.providers.common.ai.exceptions.LLMBatchLimitExceededError[source]¶
Bases:
LLMBatchInputErrorRaised when a batch exceeds a provider’s request-count or payload-size limit.
- exception airflow.providers.common.ai.exceptions.LLMBatchModelMismatchError[source]¶
Bases:
LLMBatchInputErrorRaised when a per-request
modeloverride resolves to a different adapter than the batch.
- exception airflow.providers.common.ai.exceptions.UnsupportedBatchProviderError[source]¶
Bases:
LLMBatchInputErrorRaised when the connection/model combination has no batch adapter at all.
- exception airflow.providers.common.ai.exceptions.BatchProviderNotYetSupportedError[source]¶
Bases:
LLMBatchInputErrorRaised for a connection type common.ai recognizes but does not yet support for batch.
Distinct from
UnsupportedBatchProviderError: that one means “this path does not exist”; this one means “this path is known but not built yet” (e.g. Azure OpenAI, Bedrock, Vertex).
- exception airflow.providers.common.ai.exceptions.LLMBatchStaleStateError[source]¶
Bases:
LLMBatchInputErrorRaised on retry when the recorded input fingerprint no longer matches and
on_stale_state="fail".
- exception airflow.providers.common.ai.exceptions.LLMBatchOutputTypeError[source]¶
Bases:
LLMBatchInputErrorRaised when
output_typeitself cannot produce a JSON Schema (not a per-item validation failure).
- exception airflow.providers.common.ai.exceptions.LLMBatchJobError[source]¶
Bases:
RuntimeErrorBase class for
@task.llm_batcherrors detected after a batch is submitted.
- exception airflow.providers.common.ai.exceptions.LLMBatchTimeoutError[source]¶
Bases:
LLMBatchJobErrorRaised when the wall-clock defer budget is exhausted before the batch reaches a terminal state.
- exception airflow.providers.common.ai.exceptions.LLMBatchOrphanedIntentError[source]¶
Bases:
LLMBatchJobErrorRaised when an intent record has no matching batch and
on_orphaned_intent="fail".A previous attempt crashed between submitting the batch and recording that it succeeded; provider-side recovery (
find_orphaned_batch()) found nothing. Unlike a stale-fingerprint mismatch, there is no old batch id to cancel as a loss-limiting step here – resubmitting risks paying twice if the original request actually reached the provider and simply could not be recovered.
- exception airflow.providers.common.ai.exceptions.LLMBatchPartialFailureError[source]¶
Bases:
LLMBatchJobErrorRaised when
fail_on_partial_error=Trueand any request did not produce a valid result.Covers provider-side errors, output-validation failures, expired, cancelled and missing requests alike; the manifest’s
countssays which.
- exception airflow.providers.common.ai.exceptions.LLMBatchCancelledError[source]¶
Bases:
LLMBatchJobErrorRaised when the batch was cancelled (by
cancel_on_kill/cancel_on_timeoutor out of band).Whatever finished before the cancel is fetched and landed first, so the results file is complete for the requests that did run. The recorded state is deleted, so the next attempt submits a fresh batch instead of re-attaching to the cancelled one.
- exception airflow.providers.common.ai.exceptions.LLMBatchOrphanLookupError[source]¶
Bases:
LLMBatchJobErrorRaised when checking the provider for an orphaned batch failed.
A previous attempt wrote an intent record but no batch id, and the lookup that would tell “the submit never reached the provider” apart from “it did, and is billing” raised. Neither answer is known, so the operator refuses to resubmit; the error is retryable.
- exception airflow.providers.common.ai.exceptions.LLMBatchStateReadError[source]¶
Bases:
LLMBatchJobErrorRaised when the run-stable state file exists but cannot be read or parsed.
Distinct from “no recorded state” (a plain, expected
None– seebatch/state.py’sread_state): an I/O failure or a corrupt/malformed state file must never be silently treated as “safe to submit a new batch”, since that is exactly the condition that causes a duplicate, billable submission. This is deliberately retryable (a transient object-storage blip resolves on its own); a task that fails with this error should be retried, not have its state file deleted.