Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

1.0 KB
Raw Blame
"""OpenRouter LLM provider for Local Deep Research."""

from ..base import Exposure
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
    # Egress exposure (ADR-0007): cloud inference sink — data leaves the box.
    egress_exposure = Exposure.EXPOSING

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