Skip to main content

Crate runifold_model

Crate runifold_model 

Source
Expand description

Provider-neutral model protocol and streaming primitives.

Structs§

CircuitBreakerConfig
Per-route circuit-breaker policy.
Citation
A normalized citation.
FeatureSupport
Support level plus machine-readable constraints.
GenerationOptions
Sampling and output-length options common to providers.
Message
An ordered message sent to or returned by a model.
ModelCallContext
Execution scope for one model invocation.
ModelCapabilities
Capabilities of a specific model endpoint.
ModelError
A structured model-layer error.
ModelFallbackPolicy
Explicit authority for selecting another physical model after a failure.
ModelRef
A provider-qualified model identity.
ModelRequest
A complete provider-neutral model request.
ModelResponse
A complete canonical model response.
ModelRetryPolicy
Explicit same-route retry and backoff authority.
ModelRoute
One named physical endpoint eligible for a logical model invocation.
ModelRouteHealth
Point-in-time health for one physical model route.
ModelRouter
Ordered, provider-neutral fallback routing behind the canonical Model boundary.
ModelRouterBuilder
Fluent, validation-preserving assembly of a ModelRouter.
ModelStreamAccumulator
Strictly reconstructs a canonical response from model stream events.
ModelUsage
Detailed usage reported by a model provider.
ModelWarning
A visible feature degradation or translation warning.
ProviderData
Provider-specific data retained without normalization.
ProviderEvent
A provider event retained without normalization.
ReasoningPart
Model reasoning retained for valid round trips.
StructuredOutputError
A local failure while decoding a model response into a Rust type.
SystemRouterClock
Monotonic system clock.
SystemRouterSleeper
Runtime-neutral production timer backed by futures-timer.
ToolCall
A completed tool call requested by a model.
ToolResult
A completed tool result supplied to a model.
ToolSpec
A model-facing tool definition.

Enums§

CircuitBreakerConfigError
Invalid circuit-breaker configuration.
CircuitState
Public route-health state.
ContentBlockKind
The type and initial metadata of a streamed content block.
ContentPart
One ordered unit of model-visible content.
FeaturePolicy
Behavior when a requested feature is not natively supported.
FinishReason
Why a model stopped producing output.
MediaSource
A serializable media source.
ModelErrorKind
A normalized model-layer error category.
ModelRetryPolicyError
Invalid retry-policy configuration.
ModelRouterBuildError
Invalid logical router configuration.
ModelStreamEvent
Canonical events emitted by a streaming model call.
OutputFormat
Desired final-output format.
RetryJitter
Jitter applied to an exponential retry delay.
Role
The author role of a model message.
StructuredOutputErrorKind
Stable category for local structured-output validation failures.
SupportLevel
How a model or adapter supports a feature.
ToolChoice
How a model may select tools.

Traits§

Model
Object-safe boundary implemented by model provider adapters.
ProviderModel
Stable provider identity carried by a concrete model adapter.
RouterClock
Clock used by model-routing resilience policy.
RouterSleeper
Asynchronous timer boundary used by retry backoff.

Type Aliases§

ExtensionMap
Namespaced extension fields.
ModelEventStream
A provider-neutral stream of canonical model events.
ModelFuture
A boxed, sendable future returned by a model implementation.
RouterSleepFuture
A boxed sleep future used by routing policy.