1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! LLM provider trait, streaming types, and message data types.
//!
//! This module re-exports from [`agent_sdk_providers`] and [`agent_sdk_foundation`]
//! so that existing `crate::llm::*` paths continue to resolve.
// The providers crate only compiles its `attachments` module when at least
// one provider feature is enabled (the helpers are dead code otherwise), so
// this facade re-export must carry the matching gate.
#[cfg(any(
feature = "anthropic",
feature = "openai",
feature = "openai-codex",
feature = "gemini",
feature = "vertex",
feature = "cloudflare",
))]
pub mod attachments {
//! Attachment validation (facade for external consumers).
//!
//! The upstream helpers are all `pub(crate)`, so this glob re-exports no
//! public name today; the `allow` keeps the facade shell compiling until
//! a `pub` item lands upstream.
#[allow(unused_imports)]
pub use agent_sdk_providers::attachments::*;
}
pub mod router {
//! Model routing.
pub use agent_sdk_providers::router::*;
}
pub mod streaming {
//! Streaming types.
pub use agent_sdk_providers::streaming::*;
}
pub mod types {
//! LLM data types.
pub use agent_sdk_foundation::llm::*;
}
// Re-export everything at the llm:: level for backward compatibility
pub use agent_sdk_foundation::llm::*;
pub use agent_sdk_providers::provider::{LlmProvider, collect_stream};
pub use agent_sdk_providers::router::{ModelRouter, ModelTier, TaskComplexity};
pub use agent_sdk_providers::streaming::{
StreamAccumulator, StreamBox, StreamDelta, StreamErrorKind,
};