Skip to main content

Module shared

Module shared 

Source
Expand description

Shared V4 value types used across all non-chat model traits.

Aligned with Vercel AI SDK SharedV4* types (reference/ai/packages/provider/src/shared/v4/).

These types are the common currency passed between the user-facing API and the provider-facing traits (EmbeddingModel, ImageModel, …). They are deliberately opaque to the core: providers read/write provider-specific keys inside them.

Re-exports§

pub use crate::types::Warning;

Structs§

AbortSignal
A cancellation signal analogous to the Web AbortSignal.
AspectRatio
Aspect ratio in {width}:{height} format (e.g. "16:9").
RequestInfo
Optional request information for telemetry and debugging.
ResponseInfo
Response information for telemetry and debugging.
Size
Image/video size in {width}x{height} format (e.g. "1024x1024").

Enums§

FileBytes
Either raw bytes or a base64-encoded string.
FileData
File data as a tagged discriminated union.

Type Aliases§

SharedHeaders
Additional HTTP headers sent with a provider request.
SharedProviderMetadata
Additional provider-specific metadata (outputs), keyed by provider name.
SharedProviderOptions
Additional provider-specific options (inputs), keyed by provider name.
SharedProviderReference
A mapping of provider names to provider-specific file identifiers.