Exception summaries and iteration error normalization.
Formats exception chains for logs and model feedback, classifies
infrastructure, provider, user-configuration and Python failures, and turns
an exception inside an iteration into the ::iteration-error result that the
iteration loop either feeds back to the model or stops the turn on.
Exception summaries and iteration error normalization. Formats exception chains for logs and model feedback, classifies infrastructure, provider, user-configuration and Python failures, and turns an exception inside an iteration into the `::iteration-error` result that the iteration loop either feeds back to the model or stops the turn on.
(handle-iteration-exception! e ctx)Error path for the main-loop try/catch around run-iteration.
Infrastructure failures are terminal for the turn; model/format/code
failures still return {::iteration-error ...} for RLM self-correction.
Error path for the main-loop try/catch around `run-iteration`.
Infrastructure failures are terminal for the turn; model/format/code
failures still return `{::iteration-error ...}` for RLM self-correction.(op-error err)(op-error err {:keys [code phase]})Coerce engine/model error values into the canonical structured :error map.
Iteration blocks require :error to be nil or a map. Preflight gates and
answer validators naturally produce strings; wrap them before persistence so
a useful model-facing error does not become :vis/invalid-iteration-block.
Coerce engine/model error values into the canonical structured :error map. Iteration blocks require `:error` to be nil or a map. Preflight gates and answer validators naturally produce strings; wrap them before persistence so a useful model-facing error does not become `:vis/invalid-iteration-block`.
(output-budget-exhausted-data? data)Svar's canonical output-budget failure for every wire. Svar owns the same-request re-send with a larger budget; after the failure crosses that boundary, only a smaller NEXT Vis iteration can recover.
Svar's canonical output-budget failure for every wire. Svar owns the same-request re-send with a larger budget; after the failure crosses that boundary, only a smaller NEXT Vis iteration can recover.
(python-error-content error)Terminal local-runtime card, never provider retry or model-switch advice.
Terminal local-runtime card, never provider retry or model-switch advice.
(user-error-content iteration-error-data)Terminal content for a turn killed by a user-fixable configuration error.
The generic provider card (provider_unavailable) would swallow the ONE
thing the user needs — the name of the unset env var — so render the
actionable message itself. Returns nil for every other failure, leaving the
provider card path untouched.
Terminal content for a turn killed by a user-fixable configuration error. The generic provider card (`provider_unavailable`) would swallow the ONE thing the user needs — the name of the unset env var — so render the actionable message itself. Returns nil for every other failure, leaving the provider card path untouched.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |