Coverage for src / local_deep_research / llm / providers / implementations / openrouter.py: 100%
12 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-14 23:55 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-14 23:55 +0000
1"""OpenRouter LLM provider for Local Deep Research."""
3from ..openai_base import OpenAICompatibleProvider
6class OpenRouterProvider(OpenAICompatibleProvider):
7 """OpenRouter provider using OpenAI-compatible endpoint.
9 OpenRouter provides access to many different models through a unified
10 OpenAI-compatible API, automatically supporting all current and future
11 models without needing code updates.
12 """
14 provider_name = "OpenRouter"
15 api_key_setting = "llm.openrouter.api_key"
16 default_base_url = "https://openrouter.ai/api/v1"
17 default_model = (
18 "meta-llama/llama-3.2-3b-instruct:free" # A free model as default
19 )
21 # Metadata for auto-discovery
22 provider_key = "OPENROUTER"
23 company_name = "OpenRouter"
24 is_cloud = True
26 @classmethod
27 def requires_auth_for_models(cls):
28 """OpenRouter doesn't require authentication for listing models."""
29 return False