Skip to main content

Ai

Struct Ai 

Source
pub struct Ai {
    pub backend: Option<String>,
    pub model: Option<String>,
    pub coding_backend: Option<String>,
    pub coding_model: Option<String>,
    pub max_tool_iterations: u32,
    pub max_turn_seconds: u64,
    pub rounds: u32,
    pub skip_knobs: bool,
    pub cross_scheduler_refs: bool,
    pub build_fix_attempts: u32,
    pub runtime_fix_attempts: u32,
}

Fields§

§backend: Option<String>

Backend for the planner/reasoner role: an OpenAI-compatible API base URL (built-in openai backend), or one of the keywords claude, codex, opencode, cursor-agent (shell out to that agent CLI). Falls back to $SCX_FORGE_BACKEND.

§model: Option<String>

Planner/reasoner model for the built-in openai backend.

§coding_backend: Option<String>

Backend for the patch/apply (coding) role: an OpenAI-compatible API base URL or one of claude, codex, opencode, cursor-agent. Falls back to $SCX_FORGE_CODING_BACKEND, then to the planner backend. Set this (with coding_model) to run the coding role on a separate backend.

§coding_model: Option<String>

Patch/apply model for the built-in openai backend. Empty means use model.

§max_tool_iterations: u32

Max tool-calling iterations per LLM turn for the built-in openai backend.

§max_turn_seconds: u64

Wall-clock cap per planner or coding model turn.

§rounds: u32

Maximum optimization rounds, shared across both phases. The AI-driven knob-tuning phase ends when the model decides it is done; the remaining rounds (up to this cap) go to code changes.

§skip_knobs: bool

Skip the AI-driven knob-tuning phase and go straight to code changes.

§cross_scheduler_refs: bool

Allow read-only cross-scheduler reference tools (list_schedulers, grep_schedulers, read_scheduler_file) that inspect other scheduler crates under scheds/rust. Disabled by default: the model focuses only on the target crate, which keeps the prompt and tool surface (and thus token usage) smaller. Enable to let the planner port mechanisms from other schedulers.

§build_fix_attempts: u32

LLM edit attempts to fix a broken build before reverting the round.

§runtime_fix_attempts: u32

LLM edit attempts to fix a runtime scheduler failure before reverting.

Implementations§

Trait Implementations§

Source§

impl Clone for Ai

Source§

fn clone(&self) -> Ai

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Ai

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Ai

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Ai

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

§

impl Freeze for Ai

§

impl RefUnwindSafe for Ai

§

impl Send for Ai

§

impl Sync for Ai

§

impl Unpin for Ai

§

impl UnsafeUnpin for Ai

§

impl UnwindSafe for Ai

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more