/** * Battery-scoped exception constructors for LiteRT-LM adapter failures. * * @module @nhtio/adk/batteries/llm/litert_lm/exceptions * * @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. */ /** * Thrown when the resolved adapter options (constructor, executor overrides, or per-dispatch * `stash.liteRtLm`) fail validation against `liteRtLmOptionsSchema`. */ export declare const E_INVALID_LITERT_LM_OPTIONS: import("../../../factories").CreatedException<[ string ]>; /** * 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. */ export declare const E_LITERT_LM_CONTEXT_OVERFLOW: import("../../../factories").CreatedException<[ number, number, string, string ]>; /** * Thrown when the LiteRT-LM engine call or response stream fails. Non-fatal — surfaced via * `ctx.nack(...)`. */ export declare const E_LITERT_LM_STREAM_ERROR: import("../../../factories").CreatedException<[ string ]>; /** * Raised when a tool-call emitted by the model carries malformed `arguments`. * * @remarks * Unlike OpenAI-wire batteries (where tool-call `arguments` arrive as a JSON **string** that may * fail to parse), LiteRT-LM delivers `ToolCall.function.arguments` already as a parsed object * (`Record`). This exception therefore guards the rarer case where that field is * present but is not a plain object (e.g. an array or a primitive slipped through the wire shape). * * Non-fatal. The adapter does NOT throw this — it instantiates it inside `executeAndPersistToolCall`, * pulls `.message` into a {@link @nhtio/adk!Tokenizable}, and persists a `ToolCall` record with * `isError: true` so the model can self-correct on the next iteration. * * Printf args: `[reasonHeadline, rawArgs]`. */ export declare const E_LITERT_LM_INVALID_TOOL_CALL_ARGS: import("../../../factories").CreatedException<[ string, string ]>; /** * Raised when a {@link @nhtio/adk!Media} instance whose modality cannot be represented for the * LiteRT-LM model reaches the adapter under `unsupportedMediaPolicy: 'throw'`. * * @remarks * The `@litert-lm/core` types expose `audioModalityEnabled` / `visionModalityEnabled`, but the * preview `.litertlm` models are text-in/text-out today. Media this adapter cannot map (or that the * configured model does not accept) triggers this under the `'throw'` policy; switch to * `'fallback-stash'` or `'synthetic-description'` to degrade to a text representation instead. * * Printf args: `[kind, mimeType, filename]`. */ export declare const E_UNSUPPORTED_MEDIA_MODALITY: import("../../../factories").CreatedException<[ string, string, string ]>;