from enum import Enum

from analogai.deepthink.infrastructure.gateways.llm.enums.llm_gateway_type import (
    LlmGatewayType,
)


class LlmProvider(str, Enum):
    XAI = "xai"
    ANTHROPIC = "anthropic"
    OPENAI = "openai"
    AZURE = "azure"
    AZURE_OPENAI = "azure_openai"
    BEDROCK = "bedrock"

    @property
    def gateway_type(self) -> LlmGatewayType:
        mapping = {
            LlmProvider.ANTHROPIC: LlmGatewayType.ANTHROPIC,
            LlmProvider.OPENAI: LlmGatewayType.OPENAI,
            LlmProvider.AZURE: LlmGatewayType.AZURE,
            LlmProvider.AZURE_OPENAI: LlmGatewayType.AZURE_OPENAI,
            LlmProvider.XAI: LlmGatewayType.GROK,
            LlmProvider.BEDROCK: LlmGatewayType.BEDROCK,
        }
        return mapping[self]
