pub mod application_context;
pub mod cache;
pub mod cache_prompt;
pub mod cost_tracker; pub mod discovery;
pub mod error;
pub mod factory;
pub mod http;
pub mod imagegen;
pub mod inference_metrics; pub mod middleware;
pub mod model_config;
pub mod provider_catalog;
pub mod providers;
pub mod rate_limiter;
pub mod reasoning_capabilities;
pub mod registry;
pub mod reranker;
pub mod retry;
pub mod stream_tool_calls;
pub mod stream_tools;
pub mod tokenizer;
pub mod trace_context;
pub mod traits;
pub use application_context::{
ApplicationContext, ApplicationContextBuilder, AttributionPolicy, AttributionProviderKind,
AttributionWarning,
};
pub use cache::{CacheConfig, CacheStats, CachedProvider, LLMCache};
pub use cache_prompt::{
apply_cache_control, parse_cache_stats, CachePromptConfig, CacheStats as PromptCacheStats,
};
pub use cost_tracker::{
format_cost, format_tokens, CostEntry, CostSummary, ModelPricing, SessionCostTracker,
};
pub use discovery::{
find_static_models, search_models, search_static_models, static_lookup_by_name,
CapabilityFilter, DiscoveredModel, DiscoveryError, DiscoverySource, DiscoveryStrategy,
ModelCapability, ModelDiscoveryProvider, ModelDiscoveryService, ModelMatchKind,
ModelSearchMatch, ModelSearchQuery,
};
pub use error::{LlmError, Result, RetryStrategy};
pub use factory::{ProviderFactory, ProviderType};
#[cfg(feature = "bedrock")]
pub use imagegen::BedrockStabilityImageGen;
pub use imagegen::{
AspectRatio, AzureImageGen, FalImageGen, GeminiImageGenProvider, GeneratedImage, ImageFormat,
ImageGenData, ImageGenError, ImageGenFactory, ImageGenOptions, ImageGenProvider,
ImageGenRequest, ImageGenResponse, ImageResolution, MockImageGenProvider, NvidiaImageGen,
OpenAIImageGen, SafetyLevel, ThinkingLevel, VertexAIImageGen, XAIImageGen,
};
pub use inference_metrics::InferenceMetrics; pub use middleware::{
LLMMiddleware, LLMMiddlewareStack, LLMRequest, LogLevel, LoggingLLMMiddleware,
MetricsLLMMiddleware, MetricsSummary,
};
pub use model_config::{
DefaultsConfig, ModelCapabilities, ModelCard, ModelConfigError, ModelCost, ModelType,
ModelsConfig, ProviderConfig, ProviderType as ConfigProviderType,
};
pub use provider_catalog::{
AttributionSupport, ProviderCatalog, ProviderDescriptor, ProviderFeatures,
};
pub use providers::azure_openai::{AzureCredential, AzureOpenAIProvider};
pub use providers::gemini::GeminiProvider;
pub use providers::jina::JinaProvider;
pub use providers::llamacpp::{
api_key_from_env as llamacpp_api_key_from_env, builder as llamacpp_builder,
from_env as llamacpp_from_env, from_env_with_model as llamacpp_from_env_with_model,
host_from_env as llamacpp_host_from_env, normalize_llamacpp_host,
resolve_llamacpp_runtime_config, LlamaCppProvider, DEFAULT_LLAMACPP_HOST,
DEFAULT_LLAMACPP_PORT, LLAMACPP_IDENTITY,
};
pub use providers::lmstudio::{LMStudioProvider, LmStudioModelMetadata};
pub use providers::local_openai_common::{
normalize_local_openai_host, parse_openai_models_list, LocalOpenAiIdentity,
LocalOpenAiProvider, LocalOpenAiRuntimeConfig,
};
pub use providers::mlx_lm::{
api_key_from_env as mlx_lm_api_key_from_env, builder as mlx_lm_builder,
from_env as mlx_lm_from_env, from_env_with_model as mlx_lm_from_env_with_model,
host_from_env as mlx_lm_host_from_env, normalize_mlx_lm_host, resolve_mlx_lm_runtime_config,
MlxLmProvider, DEFAULT_MLX_LM_HOST, DEFAULT_MLX_LM_PORT, MLX_LM_IDENTITY,
};
pub use providers::mock::MockProvider;
pub use providers::mtplx::{
list_cached_model_ids, load_mtplx_settings_file, normalize_mtplx_host,
resolve_mtplx_runtime_config, MtplxProvider, MtplxRuntimeConfig, DEFAULT_MTPLX_HOST,
DEFAULT_MTPLX_PORT,
};
pub use providers::ollama::{
OllamaModelDetails, OllamaModelInfo, OllamaModelsResponse, OllamaProvider,
};
pub use providers::omlx::{
api_key_from_env, host_from_env, load_omlx_settings_file, normalize_omlx_host,
resolve_omlx_runtime_config, OmlxProvider, OmlxRuntimeConfig, DEFAULT_OMLX_HOST,
DEFAULT_OMLX_PORT,
};
pub use providers::openai::OpenAIProvider;
pub use providers::vllm_mlx::{
api_key_from_env as vllm_mlx_api_key_from_env, builder as vllm_mlx_builder,
from_env as vllm_mlx_from_env, from_env_with_model as vllm_mlx_from_env_with_model,
host_from_env as vllm_mlx_host_from_env, normalize_vllm_mlx_host,
resolve_vllm_mlx_runtime_config, VllmMlxProvider, DEFAULT_VLLM_MLX_HOST, DEFAULT_VLLM_MLX_PORT,
VLLM_MLX_IDENTITY,
};
pub use providers::mistral::MistralProvider;
#[cfg(feature = "bedrock")]
pub use providers::bedrock::BedrockProvider;
pub use providers::anthropic::AnthropicProvider;
pub use providers::openrouter::{
ModelArchitecture as OpenRouterModelArchitecture, ModelInfo as OpenRouterModelInfo,
ModelPricing as OpenRouterModelPricing, ModelsResponse as OpenRouterModelsResponse,
OpenRouterProvider,
};
pub use providers::openai_compatible::OpenAICompatibleProvider;
pub use providers::vscode::{
Model as CopilotModel, ModelsResponse as CopilotModelsResponse, VsCodeCopilotProvider,
};
pub use providers::xai::XAIProvider;
pub use providers::{trace_llm_arc, TracingProvider};
pub use stream_tool_calls::StreamToolCallAccumulator;
pub use stream_tools::{
finalize_streamed_tool_calls_with_repair, FinalizeStreamToolCallsOptions, PartialStreamToolCall,
};
pub use trace_context::with_trace_context;
pub use providers::nvidia::{NvidiaModelInfo, NvidiaModelsResponse, NvidiaProvider};
pub use providers::cohere::CohereProvider;
pub use rate_limiter::{RateLimitedProvider, RateLimiter, RateLimiterConfig};
pub use reasoning_capabilities::{
capabilities as reasoning_capabilities_for, clamp_options_reasoning_effort,
clamp_reasoning_effort, lowest_for_structured_output, parse_openai_reasoning_effort,
ReasoningCapabilities, EFFORT_SCALE,
};
pub use registry::ProviderRegistry;
pub use reranker::{
create_bm25_reranker, create_cross_encoder_reranker, create_production_reranker,
try_http_cross_encoder_reranker, BM25Reranker, BiEncoderReranker, HttpReranker, HybridReranker,
MockReranker, RRFReranker, RerankConfig, RerankResult, Reranker, ScoreAggregation,
TermOverlapReranker,
};
pub use retry::RetryExecutor;
pub use tokenizer::Tokenizer;
pub use traits::{
CacheControl, ChatMessage, ChatRole, CompletionOptions, EmbeddingProvider, FunctionCall,
FunctionDefinition, ImageData, LLMProvider, LLMResponse, ToolCall, ToolChoice, ToolDefinition,
ToolResult,
};