"""OpenRouter LLM provider for Local Deep Research."""

from ..openai_base import OpenAICompatibleProvider


class OpenRouterProvider(OpenAICompatibleProvider):
    """OpenRouter provider using OpenAI-compatible endpoint.

    OpenRouter provides access to many different models through a unified
    OpenAI-compatible API, automatically supporting all current and future
    models without needing code updates.
    """

    provider_name = "OpenRouter"
    api_key_setting = "llm.openrouter.api_key"
    default_base_url = "https://openrouter.ai/api/v1"
    default_model = ""  # User must explicitly pick a model — no silent fallback

    # Metadata for auto-discovery
    provider_key = "OPENROUTER"
    company_name = "OpenRouter"
    is_cloud = True

    @classmethod
    def requires_auth_for_models(cls):
        """OpenRouter doesn't require authentication for listing models."""
        return False
