Skip to main content

DefaultsOrigin

Enum DefaultsOrigin 

Source
pub enum DefaultsOrigin {
    User,
    AutoDetected,
    Published,
    Measured,
}
Expand description

Whether a model’s stored inference_defaults were set by the user or written automatically at import time.

Model.inference_defaults is populated two ways: a user explicitly tunes it (gglib model update --presence-penalty …, or the WebUI edit form), or crate::services’s import path auto-writes InferenceConfig::reasoning_profile onto any model carrying the reasoning tag — a reasonable guess, not a user decision. Both end up in the same column with nothing distinguishing them, which meant an auto-written guess silently outranked the user’s own global settings in the resolution ladder (InferenceConfig::resolve_with_profile) exactly as if the user had tuned it themselves.

This type tracks which one actually happened, so resolution can rank AutoDetected below global settings while a real User choice keeps outranking them.

Variants§

§

User

Set explicitly by the user — a CLI flag, a model-update request, or a WebUI edit. Outranks global settings, same as before this type existed.

§

AutoDetected

Written automatically at import time from the model’s reasoning tag, never reviewed by a person. Ranks below global settings.

§

Published

Read at import time from the model author’s own generation_config.json on HuggingFace.

Ranks exactly where Self::AutoDetected does — below global settings — and is a distinct variant because of what it is, not where it sits. Both are written without a person reviewing them, so neither may outrank a setting somebody chose.

It never coexists with AutoDetected: the import prefers this when it can fetch one, because a published recipe is evidence about this model where InferenceConfig::reasoning_profile is a generic guess keyed off a tag. So “above generic tag guesses” holds by replacement rather than by rank, and no new ladder rung is needed to express it.

Kept apart from User for the reason that distinction exists at all: this is not a value anybody in this installation decided, so the agentic-turn ceiling may still cap it and global settings still win.

§

Measured

Written by a tune sweep: the winner of a measured comparison on this model, this quant, this hardware — not a person’s choice, and not a guess either.

Ranks exactly where Self::AutoDetected does — below global settings. The principle that puts it there is the ladder’s oldest one: nothing a person chose may be outranked by anything a person did not, and an automated apply is not a person. Like Self::Published, it never coexists with the other below-global origins: applying a winner overwrites inference_defaults, so “above the guesses” holds by replacement rather than by rank.

Unlike both of them, the agentic-turn ceiling never caps it. The sweep resolves its candidates against this model’s real context (#748) precisely so the winner transfers to production; a ceiling capping the stored winner would un-measure it on exactly the turns it was measured for. The ceiling exists to bound values nobody examined — a measured temperature is the most examined value in the system.

Trait Implementations§

Source§

impl Clone for DefaultsOrigin

Source§

fn clone(&self) -> DefaultsOrigin

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 DefaultsOrigin

Source§

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

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

impl<'de> Deserialize<'de> for DefaultsOrigin

Source§

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

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for DefaultsOrigin

Source§

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

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

impl FromStr for DefaultsOrigin

Source§

type Err = String

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl PartialEq for DefaultsOrigin

Source§

fn eq(&self, other: &DefaultsOrigin) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for DefaultsOrigin

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Copy for DefaultsOrigin

Source§

impl Eq for DefaultsOrigin

Source§

impl StructuralPartialEq for DefaultsOrigin

Auto Trait Implementations§

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> 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.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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
Source§

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