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
str
No description available.
str
No description available.
str
No description available.
Optional[str]
No description available.
Optional[str]
No description available.
int
No description available.
Optional[int]
No description available.
Optional[int]
No description available.
ProviderStatus
No description available.
Optional[str]
No description available.
Optional[float]
No description available.
Optional[float]
No description available.
Dict[str, Any]
No description available.
Methods
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
Internal & Generic Methods
- from_dict: Create from dictionary.
- to_dict: Convert to dictionary (hides sensitive data).
Source
View on GitHub
praisonaiagents/llm/failover.py at line 39
