pub struct Resolution {
pub model: String,
pub small_model: Option<String>,
pub fallback: Vec<String>,
pub base_prompts: BTreeMap<String, String>,
pub routing: Routing,
pub refusal: Option<String>,
}Expand description
Everything [capabilities.model_catalog] resolves into, alias-resolved:
the effective core.model, the small_model (if set), and the
fallback chain (if set). Shared by both resolution paths that carry a
capabilities.<name> table shaped like crate::configfile::CapabilityConfig
— the SDK’s crate::configfile::HarnessConfig resolver
(materialize_config) and the CLI’s own FileConfig-driven
build_config — so the alias/small-model/fallback resolution logic
lives in exactly one place.
Fields§
§model: Stringbase_model, alias-resolved.
small_model: Option<String>capabilities.model_catalog.small_model, alias-resolved, if set to
a non-empty string.
fallback: Vec<String>capabilities.model_catalog.fallback, alias-resolved in order, if
non-empty.
base_prompts: BTreeMap<String, String>BP-5 (capabilities.model_catalog.base_prompts, catalog D2
“Per-model-family base-prompt selection”): model-id glob → that
family’s base system prompt. Empty unless the config sets the table.
routing: RoutingBP-13: the whole routing table (aliases, per-model rules, allow/deny
lists) — carried forward onto crate::Config::model_routing so
every later routing decision asks THIS value rather than re-reading
the capability table behind this module’s back.
refusal: Option<String>BP-13: why model is refused by the config-layer allow/deny lists,
or None. Reported by the resolver, never silently applied.
Trait Implementations§
Source§impl Clone for Resolution
impl Clone for Resolution
Source§fn clone(&self) -> Resolution
fn clone(&self) -> Resolution
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 Resolution
impl Debug for Resolution
Source§impl Default for Resolution
impl Default for Resolution
Source§fn default() -> Resolution
fn default() -> Resolution
impl Eq for Resolution
Source§impl PartialEq for Resolution
impl PartialEq for Resolution
impl StructuralPartialEq for Resolution
Auto Trait Implementations§
impl Freeze for Resolution
impl RefUnwindSafe for Resolution
impl Send for Resolution
impl Sync for Resolution
impl Unpin for Resolution
impl UnsafeUnpin for Resolution
impl UnwindSafe for Resolution
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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
key and return true if they are equal.