@nhtio/adk/batteries/llm/litert_lm/exceptions
Battery-scoped exception constructors for LiteRT-LM adapter failures.
Remarks
Battery-scoped exception classes for the LiteRT-LM adapter. These exceptions are owned by the battery (not the ADK core) and are minted via createException from @nhtio/adk/factories. Re-exported from the battery's barrel.
Variables
| Variable | Description |
|---|---|
| E_INVALID_LITERT_LM_OPTIONS | Thrown when the resolved adapter options (constructor, executor overrides, or per-dispatch stash.liteRtLm) fail validation against liteRtLmOptionsSchema. |
| E_LITERT_LM_CONTEXT_OVERFLOW | Thrown when the total token weight of the resolved request exceeds contextWindow. Only raised when tokenEncoding is non-null. Carries { total, contextWindow, tokenEncoding, perBucket } in the message so middleware can target shedding. |
| E_LITERT_LM_INVALID_TOOL_CALL_ARGS | Raised when a tool-call emitted by the model carries malformed arguments. |
| E_LITERT_LM_STREAM_ERROR | Thrown when the LiteRT-LM engine call or response stream fails. Non-fatal — surfaced via ctx.nack(...). |
| E_UNSUPPORTED_MEDIA_MODALITY | Raised when a @nhtio/adk!Media instance whose modality cannot be represented for the LiteRT-LM model reaches the adapter under unsupportedMediaPolicy: 'throw'. |