llmwire - v2.2.0
    Preparing search index...

    Interface OpenAIProviderConfig

    interface OpenAIProviderConfig {
        apiKey?: string;
        baseURL?: string;
        defaultMaxTokens?: number;
        defaultModel?: string;
        fetch?: FetchLike;
        headers?: Record<string, string>;
        modelCacheTtlMs?: number;
        modelFilter?: (id: string) => boolean;
        models?: string[];
        preset?:
            | "xai"
            | "deepseek"
            | "mistral"
            | "groq"
            | "openrouter"
            | "together"
            | "agent-platform";
        streamIdleTimeout?: number;
        streamUsage?: boolean;
        timeout?: number;
    }

    Hierarchy

    Index
    apiKey?: string
    baseURL?: string

    Origin, with or without /v1 (https://api.groq.com/openai/v1, http://localhost:1234).

    defaultMaxTokens?: number

    max_tokens when the request sets none. Default: omit (provider default).

    defaultModel?: string

    Used when the request names no model and discovery found none.

    fetch?: FetchLike

    Custom fetch (proxy agent, tracing, tests).

    headers?: Record<string, string>

    Sent on every request, after the provider's own headers.

    modelCacheTtlMs?: number

    How long (ms) a successful model listing is reused before discoverModels() fetches again. Default 300000; 0 disables.

    modelFilter?: (id: string) => boolean

    Keep only these ids from GET /models. Default: keep all.

    models?: string[]

    Seed the supported-model list so no discovery call is needed.

    preset?:
        | "xai"
        | "deepseek"
        | "mistral"
        | "groq"
        | "openrouter"
        | "together"
        | "agent-platform"

    A shipped host (groq, openrouter, ...): fills id, name, baseURL, apiKeyEnv and requireApiKey.

    streamIdleTimeout?: number

    Default idle timeout (ms) for this provider's streams.

    streamUsage?: boolean

    Send stream_options: { include_usage: true } on streams. Default true.

    timeout?: number

    Default whole-request timeout (ms) for this provider's JSON calls.