Skip to content

fix(groq): add default model name + clarify unvalidated manual entry warning - #1014

Merged
harry0703 merged 1 commit into
harry0703:mainfrom
kapil971390:fix/groq-model-validation
Jun 10, 2026
Merged

harry0703 merged 1 commit into
harry0703:mainfrom
kapil971390:fix/groq-model-validation

Conversation

@kapil971390

Copy link
Copy Markdown
Contributor

Fixes #1013

Changes

app/services/llm.py

  • Added default model_name = "llama-3.3-70b-versatile" when groq_model_name is not set in config — consistent with how other providers handle missing model names (g4f, gemini, mimo, aihubmix all set defaults here rather than relying solely on the WebUI default)

webui/Main.py

  • Updated caption shown when model list fails to load — now explicitly says the manually entered name won't be validated until generation, so users understand a wrong model name will fail at request time rather than immediately

Why

When get_groq_model_ids() fails (network issue, outage, bad API key), the UI falls back to a text input. The previous caption said "you can still enter a model name manually" but didn't warn that the name would go unvalidated. Combined with @st.cache_data(ttl=300), a user could spend 5 minutes trying a wrong model name before realising the issue.

The llm.py default also helps users who configure Groq via config.toml directly without the WebUI — they get a working default instead of a validation error if they forget to set groq_model_name.

…y warning

- 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 harry0703#1013
@harry0703
harry0703 merged commit 2d8bdce into harry0703:main Jun 10, 2026
@kapil971390

Copy link
Copy Markdown
Contributor Author

Thanks for the quick review and merge,
@harry0703! Happy to contribute. 🙏

helloquocbao pushed a commit to helloquocbao/MoneyPrinterTurbo that referenced this pull request Jun 21, 2026
…y warning (harry0703#1014)

- 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 harry0703#1013

Co-authored-by: kapilvus <kapilvus@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Groq: manually entered model name not validated when model list fails to load

3 participants