mlx-bun library API
    Preparing search index...
    interface PiBackendOptions {
        apiKey?: string;
        audio?: boolean;
        contextWindow?: number;
        genDefaults?: ReadyGenDefaults;
        memory?: () => Promise<MemorySurface | undefined>;
        model?: () => | Pick<
            PiBackendOptions,
            | "audio"
            | "modelId"
            | "contextWindow"
            | "vision"
            | "thinking"
            | "genDefaults",
        >
        | Promise<
            Pick<
                PiBackendOptions,
                | "audio"
                | "modelId"
                | "contextWindow"
                | "vision"
                | "thinking"
                | "genDefaults",
            >,
        >;
        modelId?: string;
        paths: PiBackendPaths;
        port: number
        | (() => number);
        readOnly?: boolean;
        thinking?: boolean;
        transcription?: () => Promise<boolean>;
        vision?: boolean;
    }
    Index
    apiKey?: string

    The bearer token Pi sends to that loopback; default the shared local key.

    audio?: boolean
    contextWindow?: number
    genDefaults?: ReadyGenDefaults
    memory?: () => Promise<MemorySurface | undefined>

    The app memory owner supplies its tools and skill paths; absent means disabled.

    model?: () => | Pick<
        PiBackendOptions,
        | "audio"
        | "modelId"
        | "contextWindow"
        | "vision"
        | "thinking"
        | "genDefaults",
    >
    | Promise<
        Pick<
            PiBackendOptions,
            | "audio"
            | "modelId"
            | "contextWindow"
            | "vision"
            | "thinking"
            | "genDefaults",
        >,
    >

    What the served model is, read when each chat connects; overrides the static fields below. A host that swaps models supplies it.

    modelId?: string
    port: number | (() => number)

    Resolved on connection so a server binding port zero can report its actual port.

    readOnly?: boolean
    thinking?: boolean
    transcription?: () => Promise<boolean>
    vision?: boolean