pub enum KeySource {
ProcessEnv,
AliasFallback(String),
ConfigEnvVar(String),
ConfigFile(String),
None,
Error(String),
}Expand description
Provenance tag for a resolved API-key value.
Variants§
ProcessEnv
AI_MEMORY_LLM_API_KEY process env var (highest precedence).
AliasFallback(String)
Per-vendor process env-var fallback (XAI_API_KEY,
OPENAI_API_KEY, ANTHROPIC_API_KEY, etc.). The string field
carries the name of the var that won (for observability).
ConfigEnvVar(String)
[llm].api_key_env config-pointed env var. The string field
carries the resolved env-var name.
ConfigFile(String)
[llm].api_key_file config-pointed file path. The string field
carries the resolved (tilde-expanded) path.
None
No API key resolved. Correct for backend = "ollama"
(no auth); a misconfiguration for OpenAI-compatible vendors.
Error(String)
Error reading the resolved key source. The string carries the human-readable error for the doctor probe to surface.
Implementations§
Trait Implementations§
impl Eq for KeySource
impl StructuralPartialEq for KeySource
Auto Trait Implementations§
impl Freeze for KeySource
impl RefUnwindSafe for KeySource
impl Send for KeySource
impl Sync for KeySource
impl Unpin for KeySource
impl UnsafeUnpin for KeySource
impl UnwindSafe for KeySource
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
Mutably borrows from an owned value. Read more
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§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
Compare self to
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
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>
Converts
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>
Converts
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