pub struct RunnerConfig { /* private fields */ }Expand description
Deployment configuration shared by typed Rust construction and TOML loading.
Implementations§
Source§impl DeploymentConfig
impl DeploymentConfig
Sourcepub fn new() -> Self
pub fn new() -> Self
Starts an empty deployment. Build it with Runner::from_config.
Sourcepub fn add_http_client(
&mut self,
name: impl Into<String>,
format: WireFormat,
base_url: &str,
api_key_env: Option<String>,
) -> Result<(), RunnerError>
pub fn add_http_client( &mut self, name: impl Into<String>, format: WireFormat, base_url: &str, api_key_env: Option<String>, ) -> Result<(), RunnerError>
Adds a native HTTP client with TOML’s transport defaults. The credential is an environment variable name, not an API key. Invalid URLs and duplicate names return configuration errors.
Sourcepub fn add_target(
&mut self,
name: impl Into<String>,
model: impl Into<ModelId>,
llm_client: impl Into<String>,
labels: impl IntoIterator<Item = impl AsRef<str>>,
) -> Result<(), RunnerError>
pub fn add_target( &mut self, name: impl Into<String>, model: impl Into<ModelId>, llm_client: impl Into<String>, labels: impl IntoIterator<Item = impl AsRef<str>>, ) -> Result<(), RunnerError>
Adds a model and its deployment-approved labels; duplicate names are rejected. Model references and labels are validated when the runner is built.
Sourcepub fn set_target_labels(
&mut self,
name: &str,
labels: impl IntoIterator<Item = impl AsRef<str>>,
) -> Result<(), RunnerError>
pub fn set_target_labels( &mut self, name: &str, labels: impl IntoIterator<Item = impl AsRef<str>>, ) -> Result<(), RunnerError>
Replaces approvals on an existing LLM or typed decision target. Unknown names return an error; labels are validated when the runner is built.
Sourcepub fn add_route(
&mut self,
name: impl Into<String>,
id: impl Into<ModelId>,
algorithm: AlgorithmSpec,
eligibility: Option<TargetEligibilityConfig>,
) -> Result<(), RunnerError>
pub fn add_route( &mut self, name: impl Into<String>, id: impl Into<ModelId>, algorithm: AlgorithmSpec, eligibility: Option<TargetEligibilityConfig>, ) -> Result<(), RunnerError>
Adds an algorithm with optional eligibility; duplicate names are rejected. Runner construction validates references and alternatives before execution.
Sourcepub fn set_route_eligibility(
&mut self,
name: &str,
eligibility: Option<TargetEligibilityConfig>,
) -> Result<(), RunnerError>
pub fn set_route_eligibility( &mut self, name: &str, eligibility: Option<TargetEligibilityConfig>, ) -> Result<(), RunnerError>
Replaces eligibility before construction, using the TOML route name, not its model ID. Unknown names return an error.