UNPKG

@mastra/core

Version:

Mastra is a framework for building AI-powered applications and agents with a modern TypeScript stack.

21 lines 1.06 kB
import type { Processor, ProcessAPIErrorArgs, ProcessAPIErrorResult } from './index.js'; /** * Handles known "assistant response prefill" errors reactively. * * When an LLM API call fails because the conversation ends with an assistant * message and the provider interprets it as pre-filling, this processor appends * a `continue` system reminder message and signals a retry. * * This is a reactive complement to {@link TrailingAssistantGuard}, which * proactively prevents the error only for the structured output case. * `PrefillErrorHandler` catches the error for all other cases (e.g., tool * continuations, multi-turn conversations). * * @see https://github.com/mastra-ai/mastra/issues/13969 */ export declare class PrefillErrorHandler implements Processor<'prefill-error-handler'> { readonly id: "prefill-error-handler"; readonly name = "Prefill Error Handler"; processAPIError({ error, retryCount, sendSignal }: ProcessAPIErrorArgs): Promise<ProcessAPIErrorResult | void>; } //# sourceMappingURL=prefill-error-handler.d.ts.map