aeat.adapters.outbound.llm._errors module¶
Error hierarchy for the LLM subpackage.
All public LLM exceptions inherit from
LLMError, which extends
AeatError. Provider adapters surface
LLMProviderError and
LLMRateLimitError, cache and usage storage
surface LLMCacheError, and strict model
validators surface LLMValidationError.
- exception LLMError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
AeatErrorBase exception for public LLM package failures.
- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception LLMProviderError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
LLMErrorRaised when a provider adapter cannot return a completion.
- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception LLMPdfRasterisationError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
LLMErrorRaised when
rasterise_pdf_pages_to_base64_png()fails.- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception LLMCacheError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
LLMErrorRaised when
LLMCachestorage fails.- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception LLMRateLimitError(message, retry_after_seconds=None)[source]¶
Bases:
LLMProviderErrorRaised when a provider rejects a request because of rate limits.
Inherits from
LLMProviderErrorso callers can catch all provider-boundary failures together.- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception LLMConfigError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
LLMErrorRaised when
LLMClientconfiguration is invalid.- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- exception LLMValidationError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
LLMError,ValueErrorRaised when an LLM-related object fails validation.
Inherits from both
LLMErrorandValueErrorto remain compatible with Pydantic’s validator-failure contract while allowing catch-allLLMErrorhandlers to detect integrity failures.- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶