Expand description
Provider-neutral model protocol and streaming primitives.
Structs§
- Circuit
Breaker Config - Per-route circuit-breaker policy.
- Citation
- A normalized citation.
- Feature
Support - Support level plus machine-readable constraints.
- Generation
Options - Sampling and output-length options common to providers.
- Message
- An ordered message sent to or returned by a model.
- Model
Call Context - Execution scope for one model invocation.
- Model
Capabilities - Capabilities of a specific model endpoint.
- Model
Error - A structured model-layer error.
- Model
Fallback Policy - Explicit authority for selecting another physical model after a failure.
- Model
Ref - A provider-qualified model identity.
- Model
Request - A complete provider-neutral model request.
- Model
Response - A complete canonical model response.
- Model
Retry Policy - Explicit same-route retry and backoff authority.
- Model
Route - One named physical endpoint eligible for a logical model invocation.
- Model
Route Health - Point-in-time health for one physical model route.
- Model
Router - Ordered, provider-neutral fallback routing behind the canonical
Modelboundary. - Model
Router Builder - Fluent, validation-preserving assembly of a
ModelRouter. - Model
Stream Accumulator - Strictly reconstructs a canonical response from model stream events.
- Model
Usage - Detailed usage reported by a model provider.
- Model
Warning - A visible feature degradation or translation warning.
- Provider
Data - Provider-specific data retained without normalization.
- Provider
Event - A provider event retained without normalization.
- Reasoning
Part - Model reasoning retained for valid round trips.
- Structured
Output Error - A local failure while decoding a model response into a Rust type.
- System
Router Clock - Monotonic system clock.
- System
Router Sleeper - Runtime-neutral production timer backed by
futures-timer. - Tool
Call - A completed tool call requested by a model.
- Tool
Result - A completed tool result supplied to a model.
- Tool
Spec - A model-facing tool definition.
Enums§
- Circuit
Breaker Config Error - Invalid circuit-breaker configuration.
- Circuit
State - Public route-health state.
- Content
Block Kind - The type and initial metadata of a streamed content block.
- Content
Part - One ordered unit of model-visible content.
- Feature
Policy - Behavior when a requested feature is not natively supported.
- Finish
Reason - Why a model stopped producing output.
- Media
Source - A serializable media source.
- Model
Error Kind - A normalized model-layer error category.
- Model
Retry Policy Error - Invalid retry-policy configuration.
- Model
Router Build Error - Invalid logical router configuration.
- Model
Stream Event - Canonical events emitted by a streaming model call.
- Output
Format - Desired final-output format.
- Retry
Jitter - Jitter applied to an exponential retry delay.
- Role
- The author role of a model message.
- Structured
Output Error Kind - Stable category for local structured-output validation failures.
- Support
Level - How a model or adapter supports a feature.
- Tool
Choice - How a model may select tools.
Traits§
- Model
- Object-safe boundary implemented by model provider adapters.
- Provider
Model - Stable provider identity carried by a concrete model adapter.
- Router
Clock - Clock used by model-routing resilience policy.
- Router
Sleeper - Asynchronous timer boundary used by retry backoff.
Type Aliases§
- Extension
Map - Namespaced extension fields.
- Model
Event Stream - A provider-neutral stream of canonical model events.
- Model
Future - A boxed, sendable future returned by a model implementation.
- Router
Sleep Future - A boxed sleep future used by routing policy.