Files
leleka/crates/backend-api/src/lib.rs
T
Pavlo RatushnyiandClaude Sonnet 5.5 b686f6ab75 STRA-338: rename the 854 mechanically named modules (impl_*, *_fn, *_<N>) after what they hold; mechanical_names census 854 -> 0
git mv of the files and of the module directories next to them, mod declarations, #[path] attributes and
the paths that name the modules, rewritten by scripts/dev/rename_mechanical.py from a reviewed name table.
Two files lost one to two lines so the 400-line limit holds again (qsa_prompt_index, original_verify_expert_probe).
limits-baseline.json: test fn_lines 0 -> 1 is --allow-increase for crates/deploy builtin_profiles.rs:149 (37 lines,
the speed-vs-strata session's file, not touched here); the prod params census falls 108 -> 1 (w_launch, extern C ABI).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 13:43:56 +01:00

71 lines
2.3 KiB
Rust

//! Versioned, runtime-independent contract between Leleka and inference backends.
//!
//! This crate deliberately contains no CUDA, model loader, Strata, or Python
//! dependency. It defines the boundary those implementations must satisfy.
use std::fmt;
use std::sync::mpsc::{self, Receiver, RecvError, SendError, Sender, SyncSender, TrySendError};
use std::sync::{
Arc, Mutex,
atomic::{AtomicBool, Ordering},
};
mod load_mode;
mod recent_ids;
#[cfg(feature = "scripted")]
pub mod scripted;
pub use load_mode::{InferenceMode, KarExpertLoad, KarPrefillMode, LOAD_CONFIG_VERSION};
pub use recent_ids::{DEFAULT_RECENT_IDS, RecentIds};
#[cfg(test)]
mod tests;
mod max_output_tokens_types;
#[allow(unused_imports)]
pub use max_output_tokens_types::BACKEND_API_VERSION;
#[allow(unused_imports)]
pub use max_output_tokens_types::Backend;
#[allow(unused_imports)]
pub use max_output_tokens_types::BackendCapabilities;
#[allow(unused_imports)]
pub use max_output_tokens_types::BackendError;
#[allow(unused_imports)]
pub use max_output_tokens_types::BackendIdentity;
#[allow(unused_imports)]
pub use max_output_tokens_types::ContractError;
#[allow(unused_imports)]
pub use max_output_tokens_types::ErrorCode;
#[allow(unused_imports)]
pub use max_output_tokens_types::FinishReason;
#[allow(unused_imports)]
pub use max_output_tokens_types::GenerationEvent;
#[allow(unused_imports)]
pub use max_output_tokens_types::GenerationRequest;
#[allow(unused_imports)]
pub use max_output_tokens_types::GenerationSink;
#[allow(unused_imports)]
pub use max_output_tokens_types::GenerationTerminal;
#[allow(unused_imports)]
pub use max_output_tokens_types::LoadedModel;
#[allow(unused_imports)]
pub use max_output_tokens_types::MAX_OUTPUT_TOKENS;
#[allow(unused_imports)]
pub use max_output_tokens_types::ModelDescriptor;
#[allow(unused_imports)]
pub use max_output_tokens_types::RuntimeConfig;
#[allow(unused_imports)]
pub use max_output_tokens_types::SamplingOptions;
#[allow(unused_imports)]
pub use max_output_tokens_types::SupportedModelTuple;
#[allow(unused_imports)]
pub use max_output_tokens_types::Usage;
mod event_sender_types;
#[allow(unused_imports)]
use event_sender_types::EventSender;
#[allow(unused_imports)]
pub use event_sender_types::GenerationStream;
#[allow(unused_imports)]
pub use event_sender_types::StreamError;
mod backend_identity;