#![cfg_attr(
not(test),
deny(clippy::unwrap_used, clippy::expect_used, clippy::panic)
)]
#[cfg(feature = "anthropic")]
pub(crate) mod anthropic;
#[cfg(any(feature = "anthropic", feature = "bedrock-mantle"))]
pub(crate) mod anthropic_wire;
#[cfg(feature = "bedrock")]
pub(crate) mod bedrock;
#[cfg(feature = "bedrock-mantle")]
pub(crate) mod bedrock_mantle;
pub(crate) mod capabilities;
pub(crate) mod config;
pub(crate) mod dummy;
pub(crate) mod error;
#[cfg(any(
feature = "anthropic",
feature = "openai",
feature = "ollama",
feature = "bedrock-mantle"
))]
mod http_error;
pub(crate) mod identifiers;
pub(crate) mod media;
pub(crate) mod message;
#[cfg(feature = "ollama")]
pub(crate) mod ollama;
#[cfg(feature = "openai")]
pub(crate) mod openai;
#[cfg(any(feature = "openai", feature = "ollama", feature = "bedrock-mantle"))]
pub(crate) mod openai_wire;
pub(crate) mod provider;
pub(crate) mod response;
pub(crate) mod retry;
pub(crate) mod sse;
#[cfg(any(
feature = "anthropic",
feature = "openai",
feature = "ollama",
feature = "bedrock",
feature = "bedrock-mantle"
))]
pub(crate) mod streaming_timing;
#[cfg(feature = "anthropic")]
pub use anthropic::{AnthropicConfig, AnthropicDeps, AnthropicLanguageModel};
#[cfg(feature = "bedrock")]
pub use bedrock::{BedrockProvider, BedrockProviderConfig, BedrockProviderDeps};
#[cfg(feature = "bedrock-mantle")]
pub use bedrock_mantle::{
BedrockMantleAuth, BedrockMantleProvider, BedrockMantleProviderConfig,
BedrockMantleProviderDeps,
};
pub use capabilities::{
AcceptsAudioBytes, AcceptsDocumentBytes, AcceptsImageBytes, AcceptsImageS3, AcceptsImageUrl,
AcceptsVideoBytes, AcceptsVideoS3, CapabilityError, MediaKind, MediaSupport, ModelCapabilities,
ReasoningCapability, ReasoningMode, ReasoningParamConflicts, ReasoningValidationError,
};
pub use config::{
CacheTtl, InvalidReasoningEffort, LanguageModelConfig, LatencyMode, PromptCaching,
ReasoningConfig, ReasoningEffort, ResponseFormat,
};
pub use dummy::DummyLM;
pub use error::LanguageModelError;
pub use identifiers::{ApiKey, ApiKeyError, ModelId};
pub use media::{
AwsAccountId, AwsAccountIdError, HttpsUrl, HttpsUrlError, MediaSource, MediaType,
MediaTypeError, ProviderFileId, ProviderFileIdError, S3Uri, S3UriError, SourceKind,
all_source_kinds,
};
pub use message::{ContentPart, Message, Role};
#[cfg(feature = "ollama")]
pub use ollama::{OllamaConfig, OllamaDeps, OllamaLanguageModel};
#[cfg(feature = "openai")]
pub use openai::{OpenAiConfig, OpenAiDeps, OpenAiLanguageModel};
pub use provider::{ChatModelInfo, GenerateRequest, LanguageModelProvider, ResponseFormatKind};
pub use response::{LanguageModelResponse, StopReason, StreamDelta, Usage};
pub use retry::{RetryConfig, with_retry};
pub use sse::{SseEvent, SseStream, parse_sse_stream};