pub struct ProviderEntry {Show 30 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 stt_model_sha256: 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 vision: Option<bool>,
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.
stt_model_sha256: Option<String>Optional SHA-256 hex digest of the Candle-local Whisper model safetensors file.
Only consulted when provider_type = "candle". When set, the file is verified
before loading; mismatch aborts startup with an error.
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>§vision: Option<bool>Explicit vision-capability override for type = "openai" / type = "compatible"
providers.
None (default) auto-detects via the built-in OpenAI model-name prefix table
(e.g. gpt-4o → capable, gpt-3.5-turbo → not capable), which fails safe to false
for any unrecognised model name — the common case for arbitrary compatible endpoints.
Set explicitly to override the auto-detected value in either direction. Ignored by
other provider types.
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 more