llm_service.rs — Multi-Provider Inference & Routing
The llm_service.rs module powers Oxyde’s dynamic routing across multiple LLMs. It supports OpenAI, Groq, Anthropic, xAI, Perplexity, and more — with a uniform trait interface.
🌐 Core Trait
trait LLMProvider {
fn generate(&self, prompt: &str, stream: bool) -> Result<String>;
fn name(&self) -> &'static str;
}🧭 Provider Selection Logic
Factor
Notes
