> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# failover • Rust AI Agent SDK

> Model Failover Module for PraisonAI Rust SDK

# failover

<Badge color="orange">Rust AI Agent SDK</Badge>

Model Failover Module for PraisonAI Rust SDK

Provides auth profile management and automatic failover between
LLM providers when rate limits or errors occur.

# Example

```rust,ignore theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
use praisonai::{FailoverManager, AuthProfile, FailoverConfig};

let mut manager = FailoverManager::new(FailoverConfig::default());
manager.add_profile(AuthProfile::new("openai-primary", "openai", "sk-..."));
manager.add_profile(AuthProfile::new("openai-backup", "openai", "sk-...").priority(1));

// Get next available profile
if let Some(profile) = manager.get_next_profile() {
println!("Using profile: {}", profile.name);
}
```

## Import

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
use praisonai::failover::*;
```

## Classes

<CardGroup cols={2}>
  <Card title="AuthProfile" icon="brackets-curly" href="../classes/AuthProfile">
    Authentication profile for an LLM provider.
  </Card>

  <Card title="FailoverConfig" icon="brackets-curly" href="../classes/FailoverConfig">
    Configuration for failover behavior.
  </Card>

  <Card title="FailoverManager" icon="brackets-curly" href="../classes/FailoverManager">
    Manages failover between multiple LLM auth profiles. Provides automatic failover when rate limits or errors occur, with configurable retry behavior...
  </Card>

  <Card title="FailoverStatus" icon="brackets-curly" href="../classes/FailoverStatus">
    Status information for the failover manager.
  </Card>

  <Card title="ProviderStatus" icon="brackets-curly" href="../classes/ProviderStatus">
    Status of an LLM provider.
  </Card>
</CardGroup>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Failover" icon="shield" href="/docs/rust/failover" />

  <Card title="Rust Retry" icon="rotate-right" href="/docs/rust/retry" />
</CardGroup>
