pub struct ProfileDef {
pub name: String,
pub tool_choice: bool,
pub stream_usage: bool,
pub max_tokens_field: Option<String>,
pub supports_tools: bool,
pub body: Option<Value>,
pub reasoning: Option<Policy>,
pub models: BTreeMap<String, ModelReasoningDef>,
pub request: Option<RequestDef>,
pub vision: Option<bool>,
}Fields§
§name: String§tool_choice: boolSend tool_choice: "auto" with tool calls.
stream_usage: boolAsk the server to report token usage on the final stream chunk.
max_tokens_field: Option<String>Field name for the reply cap (max_tokens or max_completion_tokens).
supports_tools: boolAdvertise tools at all (some local backends break on tools).
body: Option<Value>Merged into every request body; anything here wins, so a backend quirk needs no
code change (e.g. chat_template_kwargs or reasoning_effort).
reasoning: Option<Policy>How this backend takes a reasoning effort — the field, the levels it has, what turns it off
and any vendor renames. Declared here and not in code: a new backend quirk is a manifest
edit, and a model that differs is one entry in models below.
models: BTreeMap<String, ModelReasoningDef>Per-model overrides, keyed by the model id this profile serves.
request: Option<RequestDef>Standing request policy: context size, reply cap, temperature, formats it rejects, aux model.
vision: Option<bool>Can this route see an image? Reported, not inferred: nothing here sends one yet, but the answer belongs beside the profile rather than in somebody’s memory.