pub struct CallShape {
pub model: String,
pub max_tokens: Option<Ceiling>,
pub effort: Option<Effort>,
pub context_tokens: u64,
}Expand description
Which model this run calls, how much it may say, and how hard it may
think — the frozen [model] config section as the turn sees it.
effort comes from kernel::FrozenConfig and cannot change within
the run: the provider renders it into the cached prompt prefix.
Fields§
§model: String§max_tokens: Option<Ceiling>The model’s own ceiling, from the endpoint book. None when no
catalogue row states one: the request then carries no ceiling and
the wire that requires one refuses the call.
effort: Option<Effort>§context_tokens: u64The model’s window, from the endpoint book. Zero when the book does not say, in which case the context reminder stays silent.
Implementations§
Source§impl CallShape
impl CallShape
Sourcepub fn verified_against(&self, frozen: &CallShape) -> Result<(), AxError>
pub fn verified_against(&self, frozen: &CallShape) -> Result<(), AxError>
Refuses a shape that differs from the one a session froze.
The model, its output ceiling and its effort are the fields that
reach the provider’s wire; changing any of them mid-session
invalidates the message cache breakpoints the frozen prefix is
paid for, which is why they freeze with the session rather than
with a form. context_tokens is not one of them: it sizes this
machine’s own reminder and never leaves it.
This is the runtime’s half of the interception the dispatch face
owes: Command::Dispatch { effort } writes a room’s effort, and
whoever lets that write through asks here first.
§Errors
ConfigInvalid, naming the field that moved and the two ways
out.