pub struct ProviderEntry {Show 28 fields
pub provider_type: ProviderKind,
pub name: Option<String>,
pub model: Option<String>,
pub base_url: Option<String>,
pub max_tokens: Option<u32>,
pub embedding_model: Option<String>,
pub stt_model: Option<String>,
pub embed: bool,
pub default: bool,
pub thinking: Option<ThinkingConfig>,
pub server_compaction: bool,
pub enable_extended_context: bool,
pub prompt_cache_ttl: Option<CacheTtl>,
pub reasoning_effort: Option<String>,
pub thinking_level: Option<GeminiThinkingLevel>,
pub thinking_budget: Option<i32>,
pub include_thoughts: Option<bool>,
pub api_key: Option<String>,
pub candle: Option<CandleInlineConfig>,
pub vision_model: Option<String>,
pub gonka_nodes: Vec<GonkaNode>,
pub gonka_chain_prefix: Option<String>,
pub cocoon_client_url: Option<String>,
pub cocoon_access_hash: Option<String>,
pub cocoon_health_check: bool,
pub cocoon_pricing: Option<CocoonPricing>,
pub instruction_file: Option<PathBuf>,
pub max_concurrent: Option<u32>,
}Expand description
Unified provider entry: one struct replaces CloudLlmConfig, OpenAiConfig,
GeminiConfig, OllamaConfig, CompatibleConfig, and OrchestratorProviderConfig.
Provider-specific fields use #[serde(default)] and are ignored by backends
that do not use them (flat-union pattern).
Fields§
§provider_type: ProviderKindRequired: provider backend type.
name: Option<String>Optional name for multi-provider configs. Auto-generated from type if absent.
model: Option<String>Model identifier. Required for most types.
base_url: Option<String>API base URL. Each type has its own default.
max_tokens: Option<u32>Max output tokens.
embedding_model: Option<String>Embedding model. When set, this provider supports embed() calls.
stt_model: Option<String>STT model. When set, this provider supports speech-to-text via the Whisper API or Candle-local inference.
embed: boolMark this entry as the embedding provider (handles embed() calls).
default: boolMark this entry as the default chat provider (overrides position-based default).
thinking: Option<ThinkingConfig>§server_compaction: bool§enable_extended_context: bool§prompt_cache_ttl: Option<CacheTtl>Prompt cache TTL variant. None keeps the default ~5-minute ephemeral TTL.
Set to "1h" to enable the extended 1-hour TTL (beta, ~2× write cost).
reasoning_effort: Option<String>§thinking_level: Option<GeminiThinkingLevel>§thinking_budget: Option<i32>§include_thoughts: Option<bool>§api_key: Option<String>§candle: Option<CandleInlineConfig>§vision_model: Option<String>§gonka_nodes: Vec<GonkaNode>Gonka network node pool. Required (non-empty) when type = "gonka".
gonka_chain_prefix: Option<String>bech32 chain prefix for address encoding. Defaults to "gonka" when omitted.
cocoon_client_url: Option<String>Cocoon sidecar HTTP URL. Defaults to "http://localhost:10000" when absent.
cocoon_access_hash: Option<String>Sentinel field for access hash. Leave empty in config; actual value
is resolved from the age vault as ZEPH_COCOON_ACCESS_HASH.
cocoon_health_check: boolWhether to perform a health check against /stats at provider construction time.
cocoon_pricing: Option<CocoonPricing>Manual per-1K-token pricing for this Cocoon provider.
Cocoon model names (e.g. Qwen/Qwen3-0.6B) are not in the built-in pricing table.
When this section is present, the values are registered with CostTracker at startup
so that token costs are tracked accurately.
Example TOML:
[llm.providers.cocoon_pricing]
prompt_cents_per_1k = 0.01
completion_cents_per_1k = 0.03instruction_file: Option<PathBuf>Provider-specific instruction file.
max_concurrent: Option<u32>Maximum concurrent LLM calls from orchestrated sub-agents to this provider.
When set, DagScheduler acquires a semaphore permit before dispatching a
sub-agent that targets this provider. Dispatch is deferred (using the existing
deferral_backoff mechanism) when the semaphore is saturated.
None (default) = unlimited — no admission control applied.
§Example (TOML)
[[llm.providers]]
name = "quality"
type = "openai"
model = "gpt-5"
max_concurrent = 3Implementations§
Source§impl ProviderEntry
impl ProviderEntry
Sourcepub fn effective_name(&self) -> String
pub fn effective_name(&self) -> String
Resolve the effective name: explicit name field or type string.
Sourcepub fn effective_model(&self) -> String
pub fn effective_model(&self) -> String
Resolve the effective model: explicit model field or the provider-type default.
Defaults mirror those used in build_provider_from_entry so that runtime.model_name
always reflects the actual model being used rather than the provider type string.
Sourcepub fn validate(&self) -> Result<(), ConfigError>
pub fn validate(&self) -> Result<(), ConfigError>
Validate this entry for cross-field consistency.
§Errors
Returns ConfigError when a fatal invariant is violated (e.g. compatible provider
without a name).
Sourcepub fn effective_gonka_chain_prefix(&self) -> &str
pub fn effective_gonka_chain_prefix(&self) -> &str
Resolve the effective Gonka chain prefix: explicit value or "gonka" default.
Trait Implementations§
Source§impl Clone for ProviderEntry
impl Clone for ProviderEntry
Source§fn clone(&self) -> ProviderEntry
fn clone(&self) -> ProviderEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProviderEntry
impl Debug for ProviderEntry
Source§impl Default for ProviderEntry
impl Default for ProviderEntry
Source§fn default() -> ProviderEntry
fn default() -> ProviderEntry
Source§impl<'de> Deserialize<'de> for ProviderEntry
impl<'de> Deserialize<'de> for ProviderEntry
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProviderEntry, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProviderEntry, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for ProviderEntry
impl Serialize for ProviderEntry
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for ProviderEntry
impl RefUnwindSafe for ProviderEntry
impl Send for ProviderEntry
impl Sync for ProviderEntry
impl Unpin for ProviderEntry
impl UnsafeUnpin for ProviderEntry
impl UnwindSafe for ProviderEntry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request