pub struct ProviderConfig {Show 25 fields
pub base_url: String,
pub api_key: Option<String>,
pub api_key_env: Option<String>,
pub model: String,
pub temperature: Option<f64>,
pub timeout_secs: u64,
pub stream: bool,
pub max_retries: u32,
pub retry_after_send: bool,
pub retry_base_delay_ms: u64,
pub context_budget_tokens: usize,
pub max_tokens: Option<u32>,
pub profile: Option<String>,
pub top_p: Option<f64>,
pub seed: Option<i64>,
pub stop: Option<Vec<String>>,
pub reasoning_effort: Option<String>,
pub parallel_tool_calls: Option<bool>,
pub vision: Option<bool>,
pub tool_choice: Option<ToolChoice>,
pub extra_body: Option<Value>,
pub fallback: Option<Vec<String>>,
pub aux: Option<String>,
pub delegate: Option<String>,
pub route: Vec<RouteConfig>,
}Fields§
§base_url: StringBase URL of an OpenAI-compatible API, e.g. a local server. No default.
api_key: Option<String>Prefer api_key_env or ECLIPSE_API_KEY over storing a key here.
api_key_env: Option<String>Name of an environment variable holding the key.
model: String§temperature: Option<f64>§timeout_secs: u64§stream: boolAsk the endpoint for a token-by-token (SSE) reply. Endpoints that ignore the
request and answer with plain JSON still work; set false to never ask.
max_retries: u32Extra attempts after a request fails with HTTP 408, 429 or 5xx, or could not be sent at all — refused, DNS, TLS (0 = never retry).
Waits retry_base_delay_ms, then double, then double again: 2 s, 4 s, 8 s with the defaults.
Other 4xx statuses are never retried: a wrong key or a rejected option fails the same way
every time. A failure that happened after the request went out — a reset mid-generation, a
silent connection — is only repeated when retry_after_send says
so, because repeating a billed request can pay for it twice.
retry_after_send: boolRepeat a request that failed after it went out — the connection dropped mid-generation, or
nothing came back for timeout_secs. Off by default: /chat/completions is billed and not
idempotent, so a repeat can pay for the same work twice, up to max_retries + 1 times a turn.
A connect-stage failure (refused, DNS, TLS) never reached the server and is always repeated.
retry_base_delay_ms: u64§context_budget_tokens: usizeSoft cap on the conversation sent to the model, in estimated tokens (characters / 4, a rough heuristic). When exceeded, the oldest turns are dropped and replaced by a marker note. 0 = disabled.
max_tokens: Option<u32>Cap on the reply, in tokens. Sent under the field name the profile asks for.
None = do not send a cap.
profile: Option<String>Wire profile: openai (default), llamacpp, or one a plugin declares. Profiles
change how the request is shaped, never what the model is asked.
top_p: Option<f64>Nucleus sampling. Unset = do not send. Most local servers default to 1.0 anyway; set this when a model rambles.
seed: Option<i64>Ask for a reproducible sample where the backend supports it. Unset = do not send.
stop: Option<Vec<String>>Up to four sequences the reply must stop at. Unset = do not send.
reasoning_effort: Option<String>low, medium or high on backends that have a reasoning knob. Unset = the route’s own
declared default, which is medium on both shipped profiles, and nothing at all on a
backend that declares no default (#276); a spelling this backend does not know comes back
as a 400 naming the field.
parallel_tool_calls: Option<bool>Ask for several tool calls in one reply. Unset = do not send.
vision: Option<bool>Whether this route’s model can see images. Overrides the wire profile’s declaration:
Some(true) enables vision on a profile that says nothing (such as llamacpp),
Some(false) forces vision off even if a profile says true, and None inherits
the profile.
tool_choice: Option<ToolChoice>auto, none, required, or a tool name. Overrides the profile’s default; unset
leaves the profile’s own value (auto where the backend understands the field).
extra_body: Option<Value>JSON merged into every request body, after the config’s own fields and before a
per-turn patch. The escape hatch for chat_template_kwargs and backend quirks this
build does not model.
fallback: Option<Vec<String>>The order routes are tried in when a request fails for a transient reason. Only
meaningful directly under [provider]; a route that carries one is a config error.
Unset means “just the default route”, which is what a config without routes does.
aux: Option<String>The route that does the agent’s own housekeeping — the summary of trimmed turns — and
never the user’s work. Only meaningful directly under [provider]; a route that carries
one is a config error. Unset means “the route this run is on”.
delegate: Option<String>The route a delegate call’s child agent runs on unless the call names one. Only
meaningful directly under [provider]; a route that carries one is a config error.
Unset means “the route this run is on”.
route: Vec<RouteConfig>[[provider.route]]: named, complete provider configurations. Only meaningful
directly under [provider].