Member Junction
    Preparing search index...
    interface AIConfig {
        apiKey: string;
        callTimeoutMs?: number;
        effortLevel?: number;
        maxTokens?: number;
        model: string;
        modelOverrides?: Record<string, ModelOverride>;
        pricing?: TokenPricingConfig;
        provider:
            | "gemini"
            | "openai"
            | "anthropic"
            | "groq"
            | "mistral"
            | "vertex"
            | "azure"
            | "cerebras"
            | "openrouter"
            | "xai"
            | "bedrock";
        rateLimits?: RateLimitConfig;
        requestsPerMinute?: number;
        retry?: RetryConfig;
        temperature?: number;
    }
    Index

    Properties

    apiKey: string
    callTimeoutMs?: number

    Wall-clock ceiling, in milliseconds, on EACH model call. 0 disables the bound. Default: 120000 (two minutes).

    Every LLM call in this package was previously unbounded. The retry machinery below cannot help: it only engages once a promise settles, and a provider that accepts the socket and then stops sending never settles one. maxTokens bounds the RESPONSE, not the wait.

    The bound is applied two ways at once, mirroring how AIPromptRunner bounds its own calls: the request is aborted through ChatParams.cancellationToken (which the provider drivers forward to their SDKs, so the socket is torn down rather than abandoned) AND the awaited promise is rejected, so a driver that ignores the signal still cannot park a caller forever.

    effortLevel?: number
    maxTokens?: number
    model: string
    modelOverrides?: Record<string, ModelOverride>

    Per-purpose model overrides. Keys are purpose names (e.g., "fkPruning"). Each override can specify a different model, temperature, maxTokens, and effortLevel. If a purpose is not listed, the default model/settings from the parent AIConfig are used.

    provider:
        | "gemini"
        | "openai"
        | "anthropic"
        | "groq"
        | "mistral"
        | "vertex"
        | "azure"
        | "cerebras"
        | "openrouter"
        | "xai"
        | "bedrock"
    rateLimits?: RateLimitConfig

    Rate limiting configuration for API calls

    requestsPerMinute?: number

    Use rateLimits.requestsPerMinute instead

    retry?: RetryConfig

    Retry configuration for failed API calls (429, network errors)

    temperature?: number