Auth Profile • AI Agent SDK
AuthProfile: Authentication profile for an LLM provider.
AuthProfile
Defined in the failover module.
AI Agent
Authentication profile for an LLM provider.
Attributes: name: Profile name for identification provider: Provider name (openai, anthropic, google, etc.) api_key: API key for authentication base_url: Optional base URL override model: Default model for this profile priority: Priority for failover (lower = higher priority) rate_limit_rpm: Requests per minute limit rate_limit_tpm: Tokens per minute limit status: Current status last_error: Last error message last_error_time: Timestamp of last error cooldown_until: Timestamp until which this profile is in cooldown metadata: Additional provider-specific configuration
Properties
strNo description available.
strNo description available.
strNo description available.
Optional[str]No description available.
Optional[str]No description available.
intNo description available.
Optional[int]No description available.
Optional[int]No description available.
ProviderStatusNo description available.
Optional[str]No description available.
Optional[float]No description available.
Optional[float]No description available.
Dict[str, Any]No description available.
Methods
Stable, non-secret identity for cross-replica quota coordination.
is_available()Check if this profile is currently available.
mark_rate_limited()Mark this profile as rate limited.
mark_error()Mark this profile as having an error.
reset()Reset this profile to available status.
Internal & Generic Methods
- from_dict: Create from dictionary.
- to_dict: Convert to dictionary (hides sensitive data).
Source
View on GitHubpraisonaiagents/llm/failover.py at line 43