jeevesagent.core.errors¶
Exception hierarchy.
All harness-raised exceptions inherit from JeevesAgentError so
callers can catch the family without binding to specific subtypes.
Exceptions¶
Invalid, missing, or revoked API credentials. |
|
A run was halted because a budget limit was hit. |
|
A user-driven interruption (signal, timeout) ended the run. |
|
Invalid or unresolvable configuration passed to |
|
The provider's safety system blocked the request or response. |
|
A certified value failed its freshness policy. |
|
The request was malformed or violated the provider's API |
|
Base class for all harness errors. |
|
A certified value failed its lineage policy. |
|
An MCP transport, handshake, or protocol error. |
|
The memory backend failed an operation. |
|
A call to the underlying model adapter failed. |
|
The model's final answer did not validate against the supplied |
|
A model call failed in a way that retrying will not fix. |
|
A tool call was denied by the permission layer or a user hook. |
|
The provider returned a 429 / quota-exhausted response. |
|
The durable runtime journal is unreadable or inconsistent. |
|
The sandbox refused or failed to execute a tool. |
|
A tool invocation failed at the tool's own boundary. |
|
A model call failed in a way that may succeed on retry. |
Module Contents¶
- exception jeevesagent.core.errors.AuthenticationError(message: str, *, cause: BaseException | None = None)[source]¶
Bases:
PermanentModelErrorInvalid, missing, or revoked API credentials.
Initialize self. See help(type(self)) for accurate signature.
- exception jeevesagent.core.errors.BudgetExceeded(reason: str)[source]¶
Bases:
JeevesAgentErrorA run was halted because a budget limit was hit.
Initialize self. See help(type(self)) for accurate signature.
- reason¶
- exception jeevesagent.core.errors.CancelledByUser[source]¶
Bases:
JeevesAgentErrorA user-driven interruption (signal, timeout) ended the run.
Initialize self. See help(type(self)) for accurate signature.
- exception jeevesagent.core.errors.ConfigError[source]¶
Bases:
JeevesAgentErrorInvalid or unresolvable configuration passed to
Agent.Initialize self. See help(type(self)) for accurate signature.
- exception jeevesagent.core.errors.ContentFilterError(message: str, *, cause: BaseException | None = None)[source]¶
Bases:
PermanentModelErrorThe provider’s safety system blocked the request or response.
Typically a permanent failure for the same prompt; users may rephrase but the framework should not silently retry.
Initialize self. See help(type(self)) for accurate signature.
- exception jeevesagent.core.errors.FreshnessError[source]¶
Bases:
JeevesAgentErrorA certified value failed its freshness policy.
Initialize self. See help(type(self)) for accurate signature.
- exception jeevesagent.core.errors.InvalidRequestError(message: str, *, cause: BaseException | None = None)[source]¶
Bases:
PermanentModelErrorThe request was malformed or violated the provider’s API contract — bad parameters, oversized prompt, unknown model name, etc. Fix the request, don’t retry.
Initialize self. See help(type(self)) for accurate signature.
- exception jeevesagent.core.errors.JeevesAgentError[source]¶
Bases:
ExceptionBase class for all harness errors.
Initialize self. See help(type(self)) for accurate signature.
- exception jeevesagent.core.errors.LineageError[source]¶
Bases:
JeevesAgentErrorA certified value failed its lineage policy.
Initialize self. See help(type(self)) for accurate signature.
- exception jeevesagent.core.errors.MCPError[source]¶
Bases:
JeevesAgentErrorAn MCP transport, handshake, or protocol error.
Initialize self. See help(type(self)) for accurate signature.
- exception jeevesagent.core.errors.MemoryStoreError[source]¶
Bases:
JeevesAgentErrorThe memory backend failed an operation.
Initialize self. See help(type(self)) for accurate signature.
- exception jeevesagent.core.errors.ModelError(message: str, *, cause: BaseException | None = None)[source]¶
Bases:
JeevesAgentErrorA call to the underlying model adapter failed.
Base of the model-error taxonomy: catch this to handle every model failure regardless of whether it is transient or permanent. The SDK exception that triggered the classification is attached via
__cause__(andcause) so debug code can still inspect the raw error.Initialize self. See help(type(self)) for accurate signature.
- cause = None¶
- exception jeevesagent.core.errors.OutputValidationError(message: str, *, raw: str, schema: type, cause: BaseException | None = None)[source]¶
Bases:
JeevesAgentErrorThe model’s final answer did not validate against the supplied
output_schema.Raised by
Agent.run()when the caller passedoutput_schema=and the model’s final assistant text could not be parsed/validated as the requested Pydantic model — even after the optional one-shot “retry with the validation error” turn.Carries the raw model output (
raw), the underlying Pydanticpydantic.ValidationError(cause, also exposed via__cause__), and the schema that was being targeted (schema) so callers can build whatever recovery strategy they need (re-prompt with extra examples, fall back to free-text, etc.).Initialize self. See help(type(self)) for accurate signature.
- cause = None¶
- raw¶
- schema¶
- exception jeevesagent.core.errors.PermanentModelError(message: str, *, cause: BaseException | None = None)[source]¶
Bases:
ModelErrorA model call failed in a way that retrying will not fix.
Wrong API key, malformed request, content-filter rejection, deprecated model name, etc. The retry layer raises these immediately without backoff so callers can fail fast and surface the real problem.
Initialize self. See help(type(self)) for accurate signature.
- exception jeevesagent.core.errors.PermissionDenied(tool: str, reason: str)[source]¶
Bases:
JeevesAgentErrorA tool call was denied by the permission layer or a user hook.
Initialize self. See help(type(self)) for accurate signature.
- reason¶
- tool¶
- exception jeevesagent.core.errors.RateLimitError(message: str, *, retry_after: float | None = None, cause: BaseException | None = None)[source]¶
Bases:
TransientModelErrorThe provider returned a 429 / quota-exhausted response.
Carries
retry_afterwhen the provider supplied one. Subclass ofTransientModelErrorso generic transient handlers cover it; catchRateLimitErrorspecifically when you need to surface “slow down” to the caller (e.g. propagate a 429 to your own clients).Initialize self. See help(type(self)) for accurate signature.
- exception jeevesagent.core.errors.RuntimeJournalError[source]¶
Bases:
JeevesAgentErrorThe durable runtime journal is unreadable or inconsistent.
Initialize self. See help(type(self)) for accurate signature.
- exception jeevesagent.core.errors.SandboxError[source]¶
Bases:
JeevesAgentErrorThe sandbox refused or failed to execute a tool.
Initialize self. See help(type(self)) for accurate signature.
- exception jeevesagent.core.errors.ToolError[source]¶
Bases:
JeevesAgentErrorA tool invocation failed at the tool’s own boundary.
Initialize self. See help(type(self)) for accurate signature.
- exception jeevesagent.core.errors.TransientModelError(message: str, *, retry_after: float | None = None, cause: BaseException | None = None)[source]¶
Bases:
ModelErrorA model call failed in a way that may succeed on retry.
Covers HTTP 5xx responses, network errors, timeouts, and provider-side rate limits. The retry layer treats this family as retryable and applies backoff.
retry_after(in seconds) carries a provider-supplied hint when one is available — e.g. anRetry-AfterHTTP header on a 429 response. The retry layer respects the larger of the policy’s computed backoff andretry_afterso we never wait less than the provider asked for.Initialize self. See help(type(self)) for accurate signature.
- retry_after = None¶