symfonic.capabilities.prompting.errors¶
errors ¶
The failure taxonomy of prompt compilation.
Every error here is raised before a provider call, so each one is a
configuration failure in the FERR sense: nothing has been sent, nothing has
been billed, and the adopter's own except ConfigurationError already
catches it. Separate classes exist so a caller can tell "this deployment is
misconfigured" from "this backend is down right now" without parsing a message.
BudgetExceededError ¶
Bases: PromptCompileError
Pinned contributions alone exceed the budget.
The alternative — dropping a pinned block or truncating it — produces a prompt whose missing half is invisible at run time, so this fails closed.
CacheRegionError ¶
Bases: PromptCompileError
A cache plan that a provider would reject, or that would silently self-invalidate.
ContributionContractError ¶
Bases: PromptCompileError
A declared contribution violates the contribution contract (shape, id, pairing).
InheritanceError ¶
Bases: PromptCompileError
A child request tried to widen what its parent declared.
PromptCompileError ¶
Bases: ConfigurationError
Root of the prompt-compiler taxonomy.
Parented on :class:ConfigurationError rather than on a fresh root: the
compiler runs inside plan compilation, and an adopter who already catches
configuration failures around Agent(...) must not have to learn a
second base class to keep catching them.
RenderGateError ¶
Bases: PromptCompileError
Content was refused at a render gate — a trust/tier mismatch, never a size.
Size limits drop and record a diagnostic. This class is reserved for the case where rendering at all would put attacker-influenced text where the model reads authored instruction.
SourceUnavailableError ¶
Bases: PromptCompileError
A contribution's source could not be read and its policy is fail_closed.
Raised rather than omitted because the authored tiers carry the agent's constraints: an agent running without its boundaries is worse than an agent that did not run.