llmwire - v2.2.0
    Preparing search index...

    Interface OpenAICompatibleConfig

    Options every built-in provider accepts.

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

    Hierarchy (View Summary)

    Index
    apiKey?: string
    apiKeyEnv?: string[]

    Environment variables consulted for the key, in order.

    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.

    id?: string

    Provider id used in routing and errors (openai, groq, ...).

    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.

    name?: string

    Display name.

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

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

    requireApiKey?: boolean

    Refuse requests without an API key (cloud APIs). Default false.

    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.