pub struct Config {Show 19 fields
pub provider: Option<String>,
pub model: Option<String>,
pub api_key: Option<String>,
pub base_url: Option<String>,
pub vertex_project_id: Option<String>,
pub vertex_location: Option<String>,
pub package_manager: Option<String>,
pub architect_model: Option<String>,
pub actuator_model: Option<String>,
pub verifier_model: Option<String>,
pub speculator_model: Option<String>,
pub providers: BTreeMap<String, ProviderEntry>,
pub models: Option<ModelsConfig>,
pub external_tools: Vec<ExternalToolConfig>,
pub ensemble: Option<Value>,
pub verification: Option<VerificationConfig>,
pub exploration: Option<ExplorationConfig>,
pub prompts: Option<PromptsConfig>,
pub context: Option<ContextConfig>,
}Expand description
Main configuration struct.
All fields are optional. Documented aliases are accepted on load so that
older field names keep working (provider_type, default_provider,
default_model).
Fields§
§provider: Option<String>Provider id, e.g. openai, anthropic, gemini, vertex, ollama.
model: Option<String>Default chat/simple-chat model.
api_key: Option<String>API key for the configured provider. Optional; may also come from env.
base_url: Option<String>Optional base URL override for OpenAI-compatible / local endpoints.
vertex_project_id: Option<String>Google Cloud project id for Vertex AI. Optional; may also come from
VERTEX_PROJECT_ID or Google Cloud project environment variables.
vertex_location: Option<String>Vertex AI location. Optional; may also come from VERTEX_LOCATION.
package_manager: Option<String>Preferred package manager for greenfield project init. Optional and
fully plugin-driven: the active language plugin maps it to its own init
command and default (e.g. Python → uv, JS → npm). Unknown values fall
back to each plugin’s default. Examples: uv, poetry, pdm, pipenv
(Python); pnpm, yarn (JS).
architect_model: Option<String>Agent Architect-tier model override.
actuator_model: Option<String>Agent Actuator-tier model override.
verifier_model: Option<String>Agent Verifier-tier model override.
speculator_model: Option<String>Agent Speculator-tier model override.
providers: BTreeMap<String, ProviderEntry>The [providers.<id>] table: several credentials coexisting in one
process (PSP-9 system 1). Empty for single-provider configurations,
which continue to use the flat fields above.
models: Option<ModelsConfig>The [models] table: per-tier fully qualified provider::model
routes. When present it takes precedence over the flat
*_model fields.
external_tools: Vec<ExternalToolConfig>Shared MCP server configuration. Omitted modes default to agent-only.
ensemble: Option<Value>Detector for the removed PSP-9 [ensemble] block. Deserialization
only: a present block fails validation with a pointed migration
error naming [exploration] (PSP-10 cutover), never a silent
ignore.
verification: Option<VerificationConfig>Verification acceptance-stage options ([verification]).
exploration: Option<ExplorationConfig>Bounded search configuration ([exploration]; PSP-10 system 20).
prompts: Option<PromptsConfig>Prompt bundles and activation bounds ([prompts]; PSP-10
system 25).
context: Option<ContextConfig>Resident-context reserves ([context]; PSP-10 Definition 6).
Implementations§
Source§impl Config
impl Config
Sourcepub fn from_toml_str(content: &str) -> Result<Self>
pub fn from_toml_str(content: &str) -> Result<Self>
Parse a Config from a TOML string. A partial document is valid.
Sourcepub fn load_from_path(path: &Path) -> Result<Self>
pub fn load_from_path(path: &Path) -> Result<Self>
Load a Config from a file path. Returns Config::default() when the
file does not exist, so callers can always work with effective values.
Sourcepub fn to_toml_string(&self) -> Result<String>
pub fn to_toml_string(&self) -> Result<String>
Serialize this config to a TOML string.
pub fn validate(&self) -> Result<()>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.