pub struct ModelRequest {
pub invocation_id: InvocationId,
pub frame: ContextFrame,
pub model: ModelRef,
pub tool_surface: ToolSurface,
pub generation: GenerationOptions,
pub cache: CacheDirective,
}Expand description
Everything one logical invocation needs. All fields stay unchanged across internal retries; the gateway owns any attempt numbering and retry policy.
Fields§
§invocation_id: InvocationIdIdentifies the turn + round this logical invocation belongs to; the same id recurs on every retry.
frame: ContextFrameThe ContextFrame the gateway renders into provider messages.
model: ModelRefWhich model to invoke.
tool_surface: ToolSurfaceThe ToolSurface offered alongside the frame.
generation: GenerationOptionsThe GenerationOptions governing sampling.
cache: CacheDirectiveThe prompt-cache instruction the translation face renders. Invariant across retries like the rest of the request.
Trait Implementations§
Source§impl Clone for ModelRequest
impl Clone for ModelRequest
Auto Trait Implementations§
impl Freeze for ModelRequest
impl RefUnwindSafe for ModelRequest
impl Send for ModelRequest
impl Sync for ModelRequest
impl Unpin for ModelRequest
impl UnsafeUnpin for ModelRequest
impl UnwindSafe for ModelRequest
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