Skip to main content

laminar_db/ai/
mod.rs

1//! Backend-agnostic AI inference types: registry, provider trait, cache, call
2//! log, adapters, and backends. Inference runs on a Ring 1 worker, never Ring 0.
3
4#![deny(missing_docs)]
5#![warn(clippy::all, clippy::pedantic)]
6#![allow(clippy::duration_suboptimal_units)] // MSRV 1.85; from_mins/from_hours are 1.91+
7#![allow(clippy::module_name_repetitions)]
8#![allow(clippy::disallowed_types)] // cold path: registry/planning + background inference only
9#![allow(clippy::doc_markdown)] // product/provider names (ONNX, OpenAI, …) read better unticked
10
11pub mod adapter;
12#[cfg(any(feature = "remote", feature = "local"))]
13pub mod backends;
14pub mod cache;
15pub mod call_log;
16pub mod provider;
17pub mod registry;
18pub mod runtime;
19
20pub use adapter::{parse_response, AdapterError};
21pub use cache::{
22    content_hash, params_version, AiCacheKey, AiResultCache, AiResultCacheConfig, CachedOutput,
23};
24pub use call_log::{AiCallLog, AiCallRecord, CallOutcome};
25pub use provider::{
26    InferenceOutputs, InferenceParams, InferenceProvider, InferenceRequest, InferenceResponse,
27    ProviderError, Usage,
28};
29pub use registry::{BackendKind, ModelBackend, ModelEntry, ModelRegistry, RegistryError, Task};
30pub use runtime::{AiRuntime, AiRuntimeError, ResolvedModel};