One explicit, fixed model configuration: a ReqLLM model, a prompt adapter, adapter options, and ReqLLM request options.
{:ok, config} =
Tune.ModelConfig.new(
model: "openai:gpt-4o-mini",
adapter: Tune.Adapter.Chat,
request_options: [temperature: 0.0]
)The adapter is always explicit. Request options pass through to ReqLLM,
except options that would replace the prepared output contract, change the
prompt, add tools, stream, or repair output. Managed requests always send
json_repair: false.
Request options can hold credentials. They are never copied into prepared requests, steps, results, or artifacts.
Summary
Functions
Returns non-secret identifiers for provenance and reports.
Builds a model configuration.
Returns ReqLLM options for one managed request.
Types
Functions
Returns non-secret identifiers for provenance and reports.
@spec new(t() | keyword()) :: {:ok, t()} | {:error, Exception.t()}
Builds a model configuration.
Options:
:model- required ReqLLM model input, resolved throughReqLLM.model/1:adapter- required module implementingTune.Adapter:adapter_options- options validated by the adapter:request_options- ReqLLM generation options
@spec request_options(t(), ReqLLM.Output.t(), non_neg_integer() | nil) :: keyword()
Returns ReqLLM options for one managed request.
output is the prepared output descriptor. remaining_ms, when given, caps
:total_timeout so the request cannot outlive the run deadline.