pub mod anthropic;
pub mod azure;
pub mod base;
pub mod bedrock;
pub mod gemini;
pub mod groq;
pub mod mistral;
pub mod ollama;
pub mod openai;
pub mod schema_adapter;
pub use base::ProviderAdapter;
pub use schema_adapter::adapt_for_provider;
pub fn detect_provider_from_key(api_key: &str) -> Option<&'static str> {
if api_key.starts_with("sk-ant-") {
Some("anthropic")
} else if api_key.starts_with("sk-") {
Some("openai")
} else if api_key.starts_with("gsk_") {
Some("groq")
} else if api_key.starts_with("AIza") {
Some("gemini")
} else {
None
}
}
#[cfg(test)]
mod tests;