unified-llm-client
    Preparing search index...

    Interface SessionApiOptions

    Configuration for SessionApi and createSessionApi().

    interface SessionApiOptions {
        allowClientOverrides?: ClientOverridePolicy;
        allowClientSessionIds?: boolean;
        allowImplicitSessionCreate?: boolean;
        basePath?: string;
        client: LLMClient;
        conversationDefaults?: SessionConversationConfig;
        contextManager?: ContextManager;
        exposeToolResults?: boolean;
        middleware?: SessionApiMiddleware[];
        maxBodyBytes?: number;
        sessionStore?: SessionStore<ConversationSnapshot>;
        tenantResolution?: TenantResolutionMode;
        tools?: CanonicalTool<JsonObject>[];
        withRequestContext?: <TValue>(
            context: SessionApiRequestContext,
            execute: () => Promise<TValue>,
        ) => Promise<TValue>;
    }
    Index

    Properties

    allowClientOverrides?: ClientOverridePolicy

    Allowlist controlling which policy fields an untrusted request body may set.

    false (deny all client overrides)
    
    allowClientSessionIds?: boolean

    Allows trusted callers to choose session and fork ids. Server-owned ids are the secure default.

    false
    
    allowImplicitSessionCreate?: boolean

    Preserves the legacy restore-or-create behavior for message endpoints.

    false
    
    basePath?: string
    client: LLMClient
    conversationDefaults?: SessionConversationConfig
    contextManager?: ContextManager
    exposeToolResults?: boolean

    When true, raw tool_result content parts are included verbatim in public session projections and SSE streams. Defaults to false: tool results are treated as server-internal and redacted before reaching clients, so raw database/RAG rows are not exposed before assistant-level filtering.

    false
    
    middleware?: SessionApiMiddleware[]
    maxBodyBytes?: number

    Maximum UTF-8 request-body size accepted by JSON POST routes.

    tenantResolution?: TenantResolutionMode
    withRequestContext?: <TValue>(
        context: SessionApiRequestContext,
        execute: () => Promise<TValue>,
    ) => Promise<TValue>