Light Dark

Functions

detect-provider

fn (model: Str): Provider

Map a model name to its Provider enum. Matches on known prefixes (claude, gpt, o1/o3/o4, grok, gemini). Returns Err for unrecognized models.

provider-name

fn (provider: Provider): Str

Human-readable name for a Provider.

Types

ChatOptions

ChatOptions type {
    chat-fn: Fn,
    model: Str,
    system: Str?
}

Standard options for functions that need an AI chat function. Fields: chat-fn, model, system.

Provider

Known AI chat completion providers.