From 9d1bda424190ada261a71ec6da0de542d82b8d7d Mon Sep 17 00:00:00 2001 From: kapilvus Date: Wed, 10 Jun 2026 13:42:23 +0530 Subject: [PATCH] fix(groq): add default model name and clarify unvalidated manual entry warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - llm.py: add fallback model_name 'llama-3.3-70b-versatile' for groq provider, consistent with other providers (g4f, gemini, mimo, aihubmix) that set defaults in _generate_response rather than relying only on WebUI - webui/Main.py: clarify caption when model list fails to load — explicitly note that manually entered model names are not validated until generation, so users understand a wrong name will fail at request time Fixes #1013 --- app/services/llm.py | 2 ++ webui/Main.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/services/llm.py b/app/services/llm.py index b2b654f65a..dd26446bd3 100644 --- a/app/services/llm.py +++ b/app/services/llm.py @@ -212,6 +212,8 @@ def _generate_response(prompt: str) -> str: elif llm_provider == "groq": api_key = config.app.get("groq_api_key") model_name = config.app.get("groq_model_name") + if not model_name: + model_name = "llama-3.3-70b-versatile" base_url = config.app.get("groq_base_url", "") if not base_url: base_url = "https://api.groq.com/openai/v1" diff --git a/webui/Main.py b/webui/Main.py index 76af5fbdc1..19c26beae9 100644 --- a/webui/Main.py +++ b/webui/Main.py @@ -590,7 +590,7 @@ def get_groq_model_ids(api_key: str, base_url: str) -> list[str]: ) if effective_api_key: st.caption( - "Unable to load Groq model list right now. You can still enter a model name manually." + "Unable to load Groq model list right now. You can still enter a model name manually — note it won't be validated until generation." ) else: st.caption(