[ENHANCEMENT]: Centralize Groq model configuration instead of hardcoding model IDs across backend modules

Aperta
#165 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

@subhamoydatta703 ci sta già lavorando.

Dal 9/10/2026.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python, typescript

Direzione di ricerca

Start with the six backend modules listed under Affected locations and inspect how their model IDs are passed to the Groq calls. Then read backend/.env.example, frontend/app/[locale]/analyze/results/page.tsx, and AGENTS.md to resolve the model source of truth. Done means the models are centrally configurable, existing defaults remain unchanged, and the backend, UI, and documentation agree.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement
Feature and its Use Cases

Summary

The Groq model IDs are hardcoded as string literals in six backend modules. Changing or replacing a model (for example if Groq deprecates one, or to compare cost and quality) requires editing every file, and the choice of model per task is not documented in one place.

Affected locations

  • backend/app/modules/langgraph_nodes/sentiment.py (line 52)
  • backend/app/modules/langgraph_nodes/judge.py (line 38)
  • backend/app/modules/langgraph_nodes/generate_perspective.py (line 25)
  • backend/app/modules/facts_check/llm_processing.py (lines 66 and 131)
  • backend/app/modules/bias_detection/check_bias.py (line 66)
  • backend/app/modules/chat/llm_processing.py (line 58)

Problem

  • Model IDs are duplicated across multiple files, so they can drift apart and are easy to miss when one changes.
  • There is no single place to see or change which model each task uses.
  • The results screen labels the judge as "Groq LLaMA 3.3" (frontend/app/[locale]/analyze/results/page.tsx, line 319) and AGENTS.md specifies "Groq SDK (LLaMA 3.3)", while the backend code uses different model IDs. The documentation, UI and code are therefore inconsistent.

Proposed solution

  1. Add a small shared configuration module that defines the models used for complex generation and for fast classification.
  2. Allow overriding them through environment variables (for example GROQ_MODEL and GROQ_FAST_MODEL), documented in backend/.env.example.
  3. Replace the hardcoded strings in the six modules with the shared configuration.
  4. Keep the models currently used in the code as the defaults, so this change does not alter runtime behavior unless a deployer sets the variables.
  5. Make the UI label, documentation and AGENTS.md consistent with the configured models.

Question for maintainers

The code, the results screen and AGENTS.md currently disagree about which model is used. Which should be the source of truth: the models in the code today, or the LLaMA 3.3 models named in the documentation and UI? I'd like to align with your preference before implementing.

Benefits

Simpler model upgrades or replacements, easier cost and quality tuning, and fewer inconsistencies.

Environment

  • Branch / commit: main at 70a2af4d9e98e659d1bc0bdf0d8551f91dee0638
Additional Context

Additional Context

Visual Reference

The "Tone & Reliability" card on the analysis results page displays "Model Judge: Groq LLaMA 3.3".

Tone & Reliability card on the results page showing Model Judge: Groq LLaMA 3.3

Inconsistency Between UI, Documentation and Code
  1. Results UI: the card shows "Model Judge: Groq LLaMA 3.3" (frontend/app/[locale]/analyze/results/page.tsx, lines 318-320).
  2. Documentation: AGENTS.md lists the stack as "Groq SDK (LLaMA 3.3)".
  3. Backend code: the LLM calls use different model IDs:
    • openai/gpt-oss-20b in judge.py and sentiment.py
    • openai/gpt-oss-120b in generate_perspective.py, check_bias.py and chat/llm_processing.py

The UI and documentation therefore name a different model from the one used by the backend. Centralizing the model configuration would make it possible to keep all three consistent.

Image
Code of Conduct
  • I have joined the Discord server and will post updates there
  • I have searched existing issues to avoid duplicates
Lingua principale
TypeScript
Stelle
58
Fork
90
Merge medio
11h 51m
PR unite (30g)
3

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di AOSSIE-Org/Perspective

Tutte le issue di AOSSIE-Org/Perspective

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.