Skip to main content

Crate runifold_model

Crate runifold_model 

Source
Expand description

Provider-neutral model protocol and streaming primitives.

Structs§

Artifact
Bytes loaded from an artifact store together with verified metadata.
ArtifactPage
One bounded page of artifact references in stable identity order.
ArtifactRef
A stable, integrity-bound reference to binary artifact content.
ArtifactResolvingModel
Model decorator that resolves lazy artifact references immediately before provider transport while keeping transcripts and checkpoints reference-only.
ArtifactScope
Validated tenant or application isolation boundary for artifacts.
ArtifactWrite
Idempotent artifact creation request.
BatchProfile
Offline execution defaults that validate a complete response before commit.
CapabilityAudit
Machine-readable inventory of one model endpoint’s declared capabilities.
CapabilityAuditEntry
One stable feature declaration and its actionable diagnostic.
CircuitBreakerConfig
Per-route circuit-breaker policy.
Citation
A normalized citation.
FeatureSupport
Support level plus machine-readable constraints.
GeneratedImage
One generated image.
GenerationOptions
Sampling and output-length options common to providers.
ImageGenerationRequest
Provider-neutral image-generation request.
ImageGenerationResponse
Complete image-generation result.
InMemoryArtifactStore
Cloneable bounded in-memory artifact store for tests and local processes.
InteractiveProfile
User-facing latency defaults that commit canonical stream events promptly.
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.
ModelCapabilityCatalog
Application-owned capability declarations keyed by exact provider and model.
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.
ProductionProfile
Long-lived service defaults prioritizing correctness and Provider policy.
ProviderData
Provider-specific data retained without normalization.
ProviderEvent
A provider event retained without normalization.
ProviderRuntimeProfile
Provider-recommended defaults for one fully composed model runtime.
ProviderToolSpec
A provider-native hosted tool that has no lossless canonical function-tool form.
ReasoningPart
Model reasoning retained for valid round trips.
SpeechRequest
Provider-neutral text-to-speech request.
SpeechResponse
Complete synthesized speech bytes.
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.
TranscriptionRequest
Provider-neutral audio-transcription request.
TranscriptionResponse
Complete transcription result.

Enums§

ArtifactError
Typed artifact persistence or integrity failure.
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.
ImageFormat
Image output encoding requested from a generation model.
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.
ResponseMode
How the provider should deliver a model response.
RetryJitter
Jitter applied to an exponential retry delay.
Role
The author role of a model message.
SpeechFormat
Audio encoding requested from a speech model.
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.

Constants§

DEFAULT_MAX_ARTIFACT_BYTES
Maximum artifact size accepted by the reference store and resolver.
MAX_ARTIFACT_IDEMPOTENCY_KEY_BYTES
Maximum UTF-8 byte length of an artifact idempotency key.
MAX_ARTIFACT_NAME_BYTES
Maximum UTF-8 byte length of an artifact display name.
MAX_ARTIFACT_PAGE_SIZE
Maximum number of artifact references returned or deleted per operation.

Traits§

ArtifactStore
Binary artifact persistence boundary.
ImageGenerationModel
Independent image-generation model boundary.
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.
RuntimeProfilePreset
A reviewed workload preset layered over a Provider’s protocol-safe policy.
SpeechModel
Independent text-to-speech model boundary.
TranscriptionModel
Independent speech-to-text model boundary.

Type Aliases§

ArtifactFuture
A boxed artifact-store future.
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.