Nous.Errors.ResponseDenied exception (nous v0.21.1)

Copy Markdown View Source

Error when a :post_response hook denies a model response.

Returned as {:error, %ResponseDenied{}} by the agent run. The denied response never reaches :on_llm_new_message callbacks, PubSub, plugins' after_response/3, the transcript or tool execution. It is not Nous.Fallback.fallback_eligible?/1: a policy denial is not a provider failure, so it never switches to a fallback model.

Summary

Types

t()

@type t() :: %Nous.Errors.ResponseDenied{
  __exception__: true,
  message: String.t(),
  reason: String.t() | nil
}