Skip to contents

Creates a list of llm_config objects from a base configuration and sweeping parameter vectors. Uses expand.grid() internally.

Usage

expand_llm_config(base_config, ...)

Arguments

base_config

An llm_config object to use as the base.

...

Named vectors of parameter values to sweep (e.g., model, temperature). Parameters named provider, model, api_key, embedding, troubleshooting, or no_change are set as top-level config fields; all others are placed in model_params.

Value

A list of llm_config objects.

Examples

base <- llm_config("openai", "gpt-4.1-nano")
cfgs <- expand_llm_config(base,
                          temperature = c(0, 0.5, 1),
                          model = c("gpt-4.1-nano", "gpt-4.1-mini"))
length(cfgs)