async-bulkhead-llm - v3.17.0
    Preparing search index...

    Type Alias LLMRunOptions<T>

    LLMRunOptions: LLMAcquireOptions & {
        borrowedConcurrencyDeadlineMs?: number;
        dedup?: boolean;
        dedupScope?: string;
        getUsage?: (result: T) => TokenUsage | undefined;
        mode?: LLMAdmissionMode;
        shadowReasons?: readonly LLMShadowableRejectReason[];
    }

    Options accepted by run().

    Type Parameters

    • T

    Type Declaration

    • OptionalborrowedConcurrencyDeadlineMs?: number

      Wall-clock lease for a borrowed concurrency slot. The timer starts after successful admission and applies only when resources.borrowedConcurrency is true. On expiry run() returns a LLMBorrowedConcurrencyDeadlineError, aborts the callback signal, and returns the local slot. Token accounting remains held until the callback actually settles. Must be a safe integer from 1 through 2,147,483,647.

    • Optionaldedup?: boolean

      Per-call deduplication opt-out.

    • OptionaldedupScope?: string

      Deduplication scope. Requests deduplicate only within the same scope and, when configured, the same admission class. Ignored when deduplication is disabled. Default: "".

    • OptionalgetUsage?: (result: T) => TokenUsage | undefined
    • Optionalmode?: LLMAdmissionMode

      Admission behavior. "enforce" is the default. In "observe" mode, configured capacity-related rejections execute without holding capacity.

    • OptionalshadowReasons?: readonly LLMShadowableRejectReason[]

      Capacity reasons observe mode may bypass. Defaults to all four LLMShadowableRejectReason values. Pass an empty array to observe the callback context without bypassing any rejection.