pub struct ProxyConfig {
pub anthropic_upstream: Option<String>,
pub openai_upstream: Option<String>,
pub gemini_upstream: Option<String>,
pub history_mode: Option<String>,
pub allow_insecure_http_upstream: Option<bool>,
}Expand description
API proxy upstream overrides. None = use provider default.
Fields§
§anthropic_upstream: Option<String>§openai_upstream: Option<String>§gemini_upstream: Option<String>§history_mode: Option<String>History-pruning strategy for proxied chat requests.
“cache-aware” (default) | “rolling” | “off”. See HistoryMode.
allow_insecure_http_upstream: Option<bool>Allow a non-loopback plaintext http:// upstream (trusted local network
only). Opt-in; see ProxyConfig::allows_insecure_http_upstream. (#440)
Implementations§
Source§impl ProxyConfig
impl ProxyConfig
Sourcepub fn resolved_history_mode(&self) -> HistoryMode
pub fn resolved_history_mode(&self) -> HistoryMode
Resolved history mode: LEAN_CTX_PROXY_HISTORY_MODE env var wins,
then [proxy].history_mode in config.toml, then cache-aware.
Unknown values fall back to the default so a typo can never silently
re-enable the cache-hostile rolling mode.
Sourcepub fn allows_insecure_http_upstream(&self) -> bool
pub fn allows_insecure_http_upstream(&self) -> bool
Whether a non-loopback plaintext http:// upstream is allowed. Opt-in
only — a deliberate downgrade for a trusted local-network service such as
http://host.docker.internal:2455 in front of codex-lb (#440).
LEAN_CTX_ALLOW_INSECURE_HTTP_UPSTREAM (any value) wins, then
[proxy] allow_insecure_http_upstream in config.toml, default false.
pub fn resolve_upstream(&self, provider: ProxyProvider) -> String
Trait Implementations§
Source§impl Clone for ProxyConfig
impl Clone for ProxyConfig
Source§fn clone(&self) -> ProxyConfig
fn clone(&self) -> ProxyConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProxyConfig
impl Debug for ProxyConfig
Source§impl Default for ProxyConfig
impl Default for ProxyConfig
Source§fn default() -> ProxyConfig
fn default() -> ProxyConfig
Source§impl<'de> Deserialize<'de> for ProxyConfigwhere
ProxyConfig: Default,
impl<'de> Deserialize<'de> for ProxyConfigwhere
ProxyConfig: Default,
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 ProxyConfig
impl RefUnwindSafe for ProxyConfig
impl Send for ProxyConfig
impl Sync for ProxyConfig
impl Unpin for ProxyConfig
impl UnsafeUnpin for ProxyConfig
impl UnwindSafe for ProxyConfig
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>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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