Polyman Documentation - v3.1.0
    Preparing search index...

    The small ways servers differ from OpenAI. Presets set these per server.

    interface Quirks {
        streamOptions: boolean;
        maxTokensField: "max_tokens" | "max_completion_tokens";
        reasoningFields: readonly string[];
        repairToolArgs: boolean;
        tools: boolean;
        extraBody?: (req: ChatRequest) => Record<string, unknown>;
    }
    Index
    streamOptions: boolean

    Send stream_options.include_usage. When a server rejects it, the request is sent once more without it, and it stays off for this provider.

    maxTokensField: "max_tokens" | "max_completion_tokens"

    Name of the max output tokens field in the request body.

    reasoningFields: readonly string[]

    Delta fields that hold reasoning text, checked in order. DeepSeek uses reasoning_content, OpenRouter uses reasoning. Never sent back.

    repairToolArgs: boolean

    Try to fix tool arguments that are not valid JSON (text after the object, code fences). Small local models need it.

    tools: boolean

    Whether the server supports tools. When false, a request with tools fails with tools_not_supported before it is sent.

    extraBody?: (req: ChatRequest) => Record<string, unknown>

    More fields for the request body, merged after the standard ones. OpenRouter uses it for usage.include and provider routing.