Skip to content

buildRefusalMessage

buildRefusalMessage(info): string

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/core/refusal.ts:145

Build the clear, user-facing message shown when the model declines. Framed as the model / provider’s own policy decision (not a Gaunt Sloth fault) and stated as terminal — a refusal is deterministic for the same input, so retrying as-is will not help. Any model-provided explanation is included verbatim. This string is BOTH surfaced to the console and RETURNED as the turn’s answer, so the non-interactive caller writes it to the output file and exits ok (it is a successful, if declined, response — not a failure to be re-wrapped as “Failed to get answer”).

RefusalInfo

string