Spaces:
Paused
Paused
File size: 854 Bytes
044f6a3 5ee03d6 d5a43fd 044f6a3 5ee03d6 d5a43fd 044f6a3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # src/rotator_library/provider_factory.py
from .providers.gemini_auth_base import GeminiAuthBase
from .providers.qwen_auth_base import QwenAuthBase
from .providers.iflow_auth_base import IFlowAuthBase
from .providers.antigravity_auth_base import AntigravityAuthBase
PROVIDER_MAP = {
"gemini_cli": GeminiAuthBase,
"qwen_code": QwenAuthBase,
"iflow": IFlowAuthBase,
"antigravity": AntigravityAuthBase,
}
def get_provider_auth_class(provider_name: str):
"""
Returns the authentication class for a given provider.
"""
provider_class = PROVIDER_MAP.get(provider_name.lower())
if not provider_class:
raise ValueError(f"Unknown provider: {provider_name}")
return provider_class
def get_available_providers():
"""
Returns a list of available provider names.
"""
return list(PROVIDER_MAP.keys()) |