From 74fcb27cbcab81693756727e4c2d90ceeca789dd Mon Sep 17 00:00:00 2001 From: hlohaus <983577+hlohaus@users.noreply.github.com> Date: Mon, 22 Sep 2025 22:32:49 +0200 Subject: [PATCH] Add OpenRouterFree API key to environment and adjust max_tokens --- example.env | 1 + g4f/Provider/needs_auth/OpenRouter.py | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/example.env b/example.env index 46cb5f4a..cc0d2edf 100644 --- a/example.env +++ b/example.env @@ -16,6 +16,7 @@ DEEPINFRA_API_KEY= OPENAI_API_KEY= GROQ_API_KEY= OPENROUTER_API_KEY= +OPENROUTERFREE_API_KEY= OLLAMA_API_KEY= NVIDIA_API_KEY= PUTER_API_KEY= diff --git a/g4f/Provider/needs_auth/OpenRouter.py b/g4f/Provider/needs_auth/OpenRouter.py index dd045bd8..5fd5f055 100644 --- a/g4f/Provider/needs_auth/OpenRouter.py +++ b/g4f/Provider/needs_auth/OpenRouter.py @@ -10,12 +10,11 @@ class OpenRouter(OpenaiTemplate): working = True needs_auth = True default_model = "openrouter/auto" - active_by_default = True class OpenRouterFree(OpenRouter): - parent = "OpenRouter" label = "OpenRouter (free)" - max_tokens = 5012 + max_tokens = 4096 + active_by_default = True @classmethod def get_models(cls, api_key: str = None, **kwargs):