model: Model Shortcut

View source: R/model_defaults.R

modelR Documentation

Model Shortcut

Description

Shortcut for default model configuration. Call with no arguments to read the current default model, or pass a model to update it. This is equivalent to calling get_model() and set_model() directly. Runtime options can be supplied without new to update the current default model's options.

Usage

model(new, ...)

Arguments

new

Optional model identifier string or LanguageModelV1 object.

...

Runtime options forwarded to set_model().

Value

When new is missing, returns the current default model. Otherwise invisibly returns the previous default model.

Examples

model()
model("openai:gpt-4o-mini")
model(NULL)

aisdk documentation built on May 29, 2026, 9:07 a.m.