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

Abierto
#165 3 comentarios 0 reacciones 0 asignados Ver en GitHub

@subhamoydatta703 ya está trabajando en esto.

Desde el 9/10/2026.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
52/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python, typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
Lenguaje dominante
TypeScript
Estrellas
58
Forks
90
Merge medio
11 h 51 min
PR fusionados (30 d)
3

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de AOSSIE-Org/Perspective

Todos los issues de AOSSIE-Org/Perspective

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.