Skip to main content

meerkat_llm_core/
lib.rs

1//! meerkat-llm-core — provider-neutral LLM wire client trait + plumbing.
2//!
3//! Owns the `LlmClient` trait, request/response/event types, error taxonomy,
4//! block assembly, streaming helpers, realtime session traits, and test
5//! client. Provider-specific LLM clients (Anthropic, OpenAI, Gemini) live in
6//! their own crates and implement this trait.
7//!
8//! Deferral §3 B2 split (2026-04-18): this crate was extracted from
9//! `meerkat-client` alongside per-provider crates. The `meerkat` facade
10//! re-exports the public surface so downstream SDKs continue to work.
11
12#[cfg(target_arch = "wasm32")]
13pub mod tokio {
14    pub use tokio_with_wasm::alias::*;
15}
16
17pub mod adapter;
18pub mod block_assembler;
19pub mod error;
20pub mod factory;
21pub mod http;
22pub mod provider_runtime;
23pub mod realtime_session;
24pub mod streaming;
25pub mod test_client;
26pub mod types;
27
28pub use adapter::LlmClientAdapter;
29pub use block_assembler::{BlockAssembler, BlockKey, StreamAssemblyError};
30pub use error::LlmError;
31pub use factory::FactoryError;
32pub use realtime_session::{
33    RealtimeExternalSessionTarget, RealtimeSession, RealtimeSessionEvent, RealtimeSessionFactory,
34};
35pub use test_client::TestClient;
36pub use types::{
37    ImageGenerationExecutor, LlmClient, LlmDoneOutcome, LlmEvent, LlmRequest, LlmResponse,
38    LlmStream, ProviderGeneratedImage, ProviderImageGenerationOutput,
39    ProviderImageGenerationRequest, ToolCallBuffer, WebSearchExecutor,
40    dimensions_from_size_preference, media_type_from_format_preference,
41    normalize_base64_image_data,
42};