pub struct LlmConfig {
pub enabled: bool,
pub selection_model: String,
pub monitor_model: String,
pub web_model: String,
pub model: String,
pub review_every_ticks: u64,
pub monitor_review_every_ticks: Option<u64>,
pub web_research_every_reviews: u64,
pub max_tokens: u32,
pub veto_entries: bool,
pub allow_llm_exits: bool,
pub prompts: LlmPromptsConfig,
}Fields§
§enabled: boolEnable OpenRouter LLM reviews during agent ticks.
selection_model: StringHigh-intelligence model for entry veto when rules produce candidate trades.
monitor_model: StringCost-efficient model for periodic open-position reviews.
web_model: StringModel with web search for macro/event context (selection phase, periodic).
model: StringLegacy fallback if selection_model / monitor_model are empty in old configs.
review_every_ticks: u64Run LLM review every N agent ticks when flat (no open positions).
With open positions, effective_monitor_review_ticks applies to both selection and monitor.
monitor_review_every_ticks: Option<u64>Monitor-phase interval when open spreads are above dte_close (long-dated / low gamma).
Falls back to review_every_ticks when unset or when any position is in the gamma window.
web_research_every_reviews: u64Use web_model every N selection/monitor LLM reviews (when applicable).
max_tokens: u32§veto_entries: boolWhen true, LLM can veto new entries when it recommends defer/skip.
allow_llm_exits: boolWhen true, high-urgency LLM close recommendations trigger exits.
prompts: LlmPromptsConfigPer-phase role, instructions, and strategy context (configurable per rules file).
Implementations§
Source§impl LlmConfig
impl LlmConfig
pub fn effective_selection_model(&self) -> &str
pub fn effective_monitor_model(&self) -> &str
Sourcepub fn resolve_model(&self, phase: LlmPhase, use_web: bool) -> &str
pub fn resolve_model(&self, phase: LlmPhase, use_web: bool) -> &str
Resolve which OpenRouter model to call for this phase.
Sourcepub fn effective_monitor_review_ticks(
&self,
min_open_dte: Option<i64>,
dte_close: u32,
) -> u64
pub fn effective_monitor_review_ticks( &self, min_open_dte: Option<i64>, dte_close: u32, ) -> u64
Monitor LLM cadence: slower above gamma window (DTE > dte_close), faster inside it.
Sourcepub fn effective_llm_review_ticks(
&self,
has_open_positions: bool,
min_open_dte: Option<i64>,
dte_close: u32,
) -> u64
pub fn effective_llm_review_ticks( &self, has_open_positions: bool, min_open_dte: Option<i64>, dte_close: u32, ) -> u64
Shared cadence for selection and monitor LLM reviews.
pub fn monitor_interval_minutes( &self, tick_interval_seconds: u64, min_open_dte: Option<i64>, dte_close: u32, ) -> u64
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LlmConfig
impl<'de> Deserialize<'de> for LlmConfig
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 LlmConfig
impl RefUnwindSafe for LlmConfig
impl Send for LlmConfig
impl Sync for LlmConfig
impl Unpin for LlmConfig
impl UnsafeUnpin for LlmConfig
impl UnwindSafe for LlmConfig
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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 more