Expand description
Provider-neutral runner contracts for SIM model fabrics.
This crate defines the shared in-process objects used by SIM model runners:
ModelRequestfor normalized task and transcript inputModelResponsefor final content and usage outputModelEventandModelEventSinkfor streaming progressModelCardandModelBidfor routing and selectionModelRunnerfor executable runner implementations
Higher-level crates install concrete runners, policies, markets, and agent-model adapters on top of these contracts.
Structs§
- Injection
Fence - Deterministic model-input fence tied to immutable content.
- Model
Bid - One availability/score proposal produced for market-style runner selection.
- Model
Card - Metadata describing one runner/model candidate for routing and inspection.
- Model
Event - Structured streaming event emitted by a model runner.
- Model
Request - Normalized model request used across providers and local runners.
- Model
Response - Final response returned by a runner after inference completes.
- Model
Usage - Usage and accounting information attached to a model response.
- Output
Contract - Output obligations attached to a model request.
- VecEvent
Sink - In-memory event sink used by tests and buffered callers.
Constants§
- FENCE_
DATA_ RULE - Instruction every consumer emits next to fenced data.
- OUTPUT_
GRAMMAR_ EXTRA - Model-request extension key for a best-effort output grammar.
- OUTPUT_
GRAMMAR_ REQUIRED_ EXTRA - Model-request extension key marking whether the grammar is required.
- RETURN_
CODEC_ EXTRA - Model-request extension key for the required return codec.
- RETURN_
SHAPE_ EXTRA - Model-request extension key for the normalized return shape expression.
Statics§
- RECIPES
- Cookbook recipes embedded from this crate’s
recipes/directory.
Traits§
- Model
Event Sink - Sink for streaming model events emitted during inference.
- Model
Runner - Executable contract for a model backend or model-like runtime surface.
Functions§
- effective_
ceiling - Resolves capability symbols and intersects them with the active set.
- model_
bid_ class_ symbol - Returns the citizen class symbol for
ModelBid. - model_
card_ class_ symbol - Returns the citizen class symbol for
ModelCard. - model_
request_ class_ symbol - Returns the citizen class symbol for
ModelRequest. - model_
request_ kernel_ event - Converts a model request into a kernel chunk event with a content ref.
- model_
response_ class_ symbol - Returns the citizen class symbol for
ModelResponse. - model_
usage_ class_ symbol - Returns the citizen class symbol for
ModelUsage. - shape_
to_ grammar - Lowers a SIM
shapeinto a constrained-decoding grammar string. - terminal_
model_ content - Returns the terminal content item from a model response.