IFClite TypeScript API
    Preparing search index...

    Interface ModelRequest<Message, Route>

    interface ModelRequest<Message, Route extends string = string> {
        budget: RootBudget;
        maxOutputTokens: number;
        messages: readonly Message[];
        model: string;
        onChunk?: (text: string) => void;
        outputSchema?: JsonResponseSchema;
        prepareInput?: () => string;
        promptVersion?: string;
        route: Route;
        routeCeiling: number;
        signal?: AbortSignal;
        system?: string;
        timeoutMs: number;
        transport: AiTransport<Message>;
    }

    Type Parameters

    • Message
    • Route extends string = string
    Index
    budget: RootBudget

    Shared by every request made for the same task.

    maxOutputTokens: number

    Requested output ceiling; clamped to routeCeiling and the root budget.

    messages: readonly Message[]
    model: string
    onChunk?: (text: string) => void
    outputSchema?: JsonResponseSchema
    prepareInput?: () => string

    Explicit native JSON producer: serialize {messages, system?, outputSchema?} once. Preparation runs under the parent deadline. The core dispatches the parsed snapshot and digests that same data. Without this boundary, opaque messages remain untouched and their logical digest stays unknown. Serialization must be owned by the producer.

    promptVersion?: string

    A bounded producer-owned prompt version. Generic hosts may leave it unknown.

    route: Route

    Recorded on the receipt.

    routeCeiling: number

    The hard output ceiling the route enforces.

    signal?: AbortSignal

    Caller cancellation. An abort resolves as cancelled, never as an error.

    system?: string
    timeoutMs: number

    Overall deadline from send to last byte.

    transport: AiTransport<Message>