pub enum EndpointPref {
Auto,
Pinned(LlmEndpoint),
}Expand description
Whether the wire endpoint is FIXED (Pinned) or DERIVED from the model
catalog (Auto). Carried by LlmProvider (below) so settle can resolve
it against the SETTLED base_url + model — the fix for a mid-session switch.
LlmOpts.endpoint stays a concrete LlmEndpoint: it is the RESOLVED value,
written by settle/to_llm_opts, so open_stream is untouched.
Variants§
Auto
Derive via crate::limits::model_protocol, falling back to Chat.
Pinned(LlmEndpoint)
A pinned wire (--endpoint chat|responses, endpoint = "..." at any layer).
Implementations§
Source§impl EndpointPref
impl EndpointPref
Sourcepub fn resolve(self, base_url: Option<&str>, model: &str) -> LlmEndpoint
pub fn resolve(self, base_url: Option<&str>, model: &str) -> LlmEndpoint
The concrete wire for model reachable at base_url.
Pinned(e) yields e unconditionally (a pin always wins). Auto asks the
catalog (crate::limits::model_protocol) and falls back to Chat when the
catalog has no fact (non-zen base, unknown/both-works/unspeakable id).
Trait Implementations§
Source§impl Clone for EndpointPref
impl Clone for EndpointPref
impl Copy for EndpointPref
Source§impl Debug for EndpointPref
impl Debug for EndpointPref
Source§impl Default for EndpointPref
impl Default for EndpointPref
impl Eq for EndpointPref
Source§impl From<Option<LlmEndpoint>> for EndpointPref
The CLI’s Config.endpoint: Option<LlmEndpoint> maps straight across:
None ⇒ Auto, Some(e) ⇒ Pinned(e).
impl From<Option<LlmEndpoint>> for EndpointPref
The CLI’s Config.endpoint: Option<LlmEndpoint> maps straight across:
None ⇒ Auto, Some(e) ⇒ Pinned(e).
Source§fn from(value: Option<LlmEndpoint>) -> Self
fn from(value: Option<LlmEndpoint>) -> Self
Source§impl PartialEq for EndpointPref
impl PartialEq for EndpointPref
impl StructuralPartialEq for EndpointPref
Auto Trait Implementations§
impl Freeze for EndpointPref
impl RefUnwindSafe for EndpointPref
impl Send for EndpointPref
impl Sync for EndpointPref
impl Unpin for EndpointPref
impl UnsafeUnpin for EndpointPref
impl UnwindSafe for EndpointPref
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.