Skip to content

Exceptions

llm_annotator.clients.exceptions

Project-specific exceptions.

LLMClientError

Bases: Exception

Base exception raised by Client modules.

ConfigurationError

Bases: LLMClientError

Raised when runtime configuration is invalid.

ProviderError

Bases: LLMClientError

Raised when a provider call fails.

ParsingError

Bases: LLMClientError

Raised when model output cannot be parsed.

TooManyConsecutiveFailedBatchesError

Bases: LLMClientError

Raised by an Annotator when too many batches fail in a row.

Unlike the other exceptions in this module, this is raised by orchestration code in annotator.py rather than by a Client itself, as a circuit breaker: it stops a run from burning compute against a provider that is silently failing every request (e.g. a vLLM server that died mid-run) instead of continuing until the job's time limit is hit.