@nhtio/adk/batteries/llm/transformers_js/exceptions
Battery-scoped exception constructors for the transformers.js LLM adapter.
Remarks
Battery-scoped exception classes for the transformers.js (@huggingface/transformers) LLM adapter, minted via createException from @nhtio/adk/factories and re-exported from the battery barrel.
Variables
| Variable | Description |
|---|---|
| E_INVALID_TRANSFORMERS_JS_OPTIONS | Thrown when the resolved adapter options (constructor, executor overrides, or per-dispatch stash.transformersJs) fail validation against transformersJsOptionsSchema. |
| E_TRANSFORMERS_JS_CONTEXT_OVERFLOW | Thrown when the total token weight of the resolved request exceeds contextWindow. Only raised when tokenEncoding is non-null. |
| E_TRANSFORMERS_JS_INVALID_TOOL_CALL_ARGS | Raised when a tool call parsed out of model output carries malformed arguments (not a JSON object). |
| E_TRANSFORMERS_JS_STREAM_ERROR | Thrown when the transformers.js pipeline fails to load (e.g. the @huggingface/transformers peer is not installed) or the generation call errors. Non-fatal — surfaced via ctx.nack(...). |
| E_TRANSFORMERS_JS_TOOL_PARSE_FAILED | Raised when the model emitted text that looked like a tool call but no configured parser could extract a well-formed call from it. |
| E_UNSUPPORTED_MEDIA_MODALITY | Raised when a @nhtio/adk!Media instance whose modality the configured model cannot consume reaches the adapter under unsupportedMediaPolicy: 'throw'. |