pub struct ModelDialect {
pub id: String,
pub version: u32,
pub system_slots: SystemSlotPolicy,
pub tool_calls: ToolCallConvention,
pub reasoning: ReasoningTracePolicy,
pub boundary_marker: String,
pub context_window_tokens: u64,
pub max_output_tokens: u64,
pub token_accountant: TokenAccountantRef,
pub max_prompt_bytes: u64,
}Expand description
The typed structural profile of one resolved model route.
Fields§
§id: String§version: u32§system_slots: SystemSlotPolicy§tool_calls: ToolCallConvention§reasoning: ReasoningTracePolicy§boundary_marker: StringDelimiter between concatenated system sections.
context_window_tokens: u64§max_output_tokens: u64§token_accountant: TokenAccountantRef§max_prompt_bytes: u64Independent transport byte bound; not derived from tokens.
Implementations§
Source§impl ModelDialect
impl ModelDialect
pub fn dialect_ref(&self) -> DialectRef
Sourcepub fn native_tools_v1() -> Self
pub fn native_tools_v1() -> Self
A family with native tool calls and multiple system slots.
Sourcepub fn genai_single_slot_v1() -> Self
pub fn genai_single_slot_v1() -> Self
The live genai adapter: native tool calls behind one system slot.
The compiled system sections join with the stage’s declared
separator (see StageComposition::system_separator), which keeps
the migrated platform literals byte-identical on the wire.
Sourcepub fn with_context_window(self, tokens: u64) -> Self
pub fn with_context_window(self, tokens: u64) -> Self
The same dialect fitted to one route’s declared context window. The effective token budget is identity-bearing and enters the program digest, so narrowing it is recorded, never silent.
Sourcepub fn json_single_slot_v1() -> Self
pub fn json_single_slot_v1() -> Self
A family reached through a single-system-slot endpoint that emits tool calls as JSON in text.
Trait Implementations§
Source§impl Clone for ModelDialect
impl Clone for ModelDialect
Source§fn clone(&self) -> ModelDialect
fn clone(&self) -> ModelDialect
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModelDialect
impl Debug for ModelDialect
Source§impl<'de> Deserialize<'de> for ModelDialect
impl<'de> Deserialize<'de> for ModelDialect
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ModelDialect
impl PartialEq for ModelDialect
Source§fn eq(&self, other: &ModelDialect) -> bool
fn eq(&self, other: &ModelDialect) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ModelDialect
impl Serialize for ModelDialect
impl StructuralPartialEq for ModelDialect
Auto Trait Implementations§
impl Freeze for ModelDialect
impl RefUnwindSafe for ModelDialect
impl Send for ModelDialect
impl Sync for ModelDialect
impl Unpin for ModelDialect
impl UnsafeUnpin for ModelDialect
impl UnwindSafe for ModelDialect
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,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.