//! LLM Provider Implementations
//!
//! This crate contains thin HTTP adapters that implement the `ModelProvider` trait
//! from `enact-core`. Providers are replaceable and side-effect free outside HTTP calls.
//!
//! All retries, rate limiting, and quotas are enforced by the kernel, not by providers.
//!
//! ## CRITICAL: Provider Module Scope
//!
//! Providers MUST NOT import:
//! - `enact_core::kernel::*`
//! - `enact_core::execution_state`
//! - `enact_core::flow`
//! - `enact_core::policy`
//!
//! Providers should only see:
//! - `ChatRequest` / `ChatResponse` (from `enact_core::providers`)
//! - Tool schemas (read-only)
//! - HTTP helper utilities

pub mod bridge;
pub mod config;
pub mod factory;
mod http;

#[cfg(feature = "provider-anthropic")]
mod anthropic;
#[cfg(feature = "provider-azure")]
mod azure;
mod azure_speech;
#[cfg(feature = "provider-gemini")]
mod gemini;
#[cfg(feature = "provider-openai-compatible")]
mod openai_compatible;
#[cfg(feature = "provider-openrouter")]
mod openrouter;

// Re-export ModelProvider trait and types from enact-core
pub use enact_core::providers::{
    ChatChoice, ChatMessage, ChatRequest, ChatResponse, ChatUsage, EmbeddingData, EmbeddingRequest,
    EmbeddingResponse, EmbeddingUsage, ModelCapabilities, ModelProvider,
};

// Re-export HTTP helpers
pub use http::{
    post_binary, post_json, post_multipart, BinaryRequestSpec, BinaryResponse, HttpRequestSpec,
    MultipartRequestSpec,
};

// Re-export provider implementations conditionally
#[cfg(feature = "provider-anthropic")]
pub use anthropic::Anthropic;
#[cfg(feature = "provider-azure")]
pub use azure::AzureOpenAI;
pub use azure_speech::AzureSpeech;
#[cfg(feature = "provider-gemini")]
pub use gemini::Gemini;
#[cfg(feature = "provider-openai-compatible")]
pub use openai_compatible::OpenAICompatible;
#[cfg(feature = "provider-openrouter")]
pub use openrouter::OpenRouter;
