gpt4free/g4f/Provider/needs_auth/OpenRouter.py
hlohaus e7a1bcdf54 fix: improve message formatting and set default activation for providers
- In PerplexityLabs.py, added logic to filter consecutive assistant messages and update message array accordingly
- Modified PerplexityLabs.py to change "messages" field to use the new formatted message list
- Adjusted error handling in PerplexityLabs.py to include a newline in error messages
- Import os in BlackForestLabs_Flux1KontextDev.py and replace media filename assignment with basename if media is None
- In Groq.py, set "active_by_default" to True for the provider
- In OpenRouter.py, added "active_by_default" as True
- In Together.py, set "active_by_default" to True
- In HuggingFaceInference.py, set "working" to False
- In models.py, changed default_model to "openai/gpt-oss-120b" instead of previous value
- In backend_api.py, added a null check in jsonify_provider_models to return 404 if response is None, and simplified get_provider_models call
2025-08-06 04:46:28 +02:00

12 lines
No EOL
337 B
Python

from __future__ import annotations
from ..template import OpenaiTemplate
class OpenRouter(OpenaiTemplate):
label = "OpenRouter"
url = "https://openrouter.ai"
login_url = "https://openrouter.ai/settings/keys"
api_base = "https://openrouter.ai/api/v1"
working = True
needs_auth = True
active_by_default = True