Skip to main content

flow_adapter_ai/
lib.rs

1//! `flow-adapter-ai` - the AI provider adapter for Flow (Claude / OpenAI /
2//! Gemini cloud providers plus the on-device `local` OpenAI-compatible server).
3//!
4//! Backs the unified `ai` node type. Cloud providers leave the user's
5//! machine - by design, gated by `allow_cloud_ai` - while the `local` provider
6//! stays on-device.
7//! See `docs/architecture/isolation-boundaries.md` for the
8//! security implications and `docs/adr/0006-unified-ai-node.md` for the
9//! intentional carve-out from the otherwise-zero-egress posture.
10
11pub mod error;
12pub mod providers;
13pub mod registry;
14pub mod request;
15pub mod stream;
16
17pub use error::CloudAiError;
18pub use providers::claude::ClaudeProvider;
19pub use providers::deepseek::DeepSeekProvider;
20pub use providers::gemini::GeminiProvider;
21pub use providers::local::{
22    local_chat_url, local_models_url, normalize_local_base, LocalOpenAiProvider,
23};
24pub use providers::nvidia::NvidiaProvider;
25pub use providers::openai::OpenAiProvider;
26pub use registry::{CloudAiProvider, CloudAiRegistry, ProviderCategory};
27pub use request::{
28    CloudAiRequest, CloudAiResponse, EmbeddingResponse, ToolDispatcher, ToolSpec,
29};
30pub use stream::{LlmStreamEvent, LlmStreamSink, NullStreamSink};