Skip to content

Update stale AI model messaging - #7

Merged
prathamkashyap merged 1 commit into
mainfrom
fix/ai-model-messaging
Oct 4, 2026
Merged

prathamkashyap merged 1 commit into
mainfrom
fix/ai-model-messaging

Conversation

@prathamkashyap

Copy link
Copy Markdown
Owner

Why

The production UI credited a model the backend no longer serves.

src/pages/Index.tsx            "Powered by Llama 3 70B via Groq"
src/pages/CreateAssessment.tsx "Questions crafted using Llama 3 70B model"

The backend selects its model from GROQ_MODEL (default openai/gpt-oss-120b since Groq retired
llama-3.3-70b-versatile), so a learner was told one thing while a different model produced their
quiz. A model change is a deployment variable, not a copy change — the UI should not have needed
editing when the model moved, and it did.

The change

Both strings now name the provider, which stays true across any future GROQ_MODEL:

File Before After
src/pages/Index.tsx:510 Powered by Llama 3 70B via Groq AI powered by Groq
src/pages/CreateAssessment.tsx:353 Questions crafted using Llama 3 70B model Questions crafted by Groq-powered AI

Two lines of source. No layout, styling or structural change.

Tests

New src/test/aiModelCopy.test.tsx — 5 tests, the first coverage this copy has had:

  • the dashboard credits Groq and names no model
  • the upload page describes Groq-powered generation and names no model
  • neither rendered page matches /llama/i or /\b70b\b/i
  • a source scan asserting no model identifier (llama, gpt-oss, 70b) appears anywhere under
    src/

That last one is the point of the change. It reads source rather than the DOM, because a string can
sit in a branch no test renders, and it excludes src/test/ so the guard does not flag its own
regex. A future model swap now fails a test instead of shipping a stale claim.

Writing it required mocking AuthContext and Link — this is the first test to render Index.tsx,
which reads auth state for its greeting.

Not touched, deliberately

No backend behaviour, no deployment configuration, no API contract. GROQ_MODEL, the provider seam
and the Blueprint are unchanged; this only affects what a learner reads.

Verification

Check Before After
Frontend 209 / 17 files 214 / 18 files
Playwright E2E 26 passed, 2 skipped unchanged (no spec asserts this copy)
npm run typecheck exit 0 exit 0
npm run build exit 0 exit 0
npm run lint exit 0, 0 errors exit 0, 0 errors

@prathamkashyap
prathamkashyap merged commit ffe7353 into main Oct 4, 2026
3 checks passed
@prathamkashyap
prathamkashyap deleted the fix/ai-model-messaging branch October 4, 2026 17:28
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.

1 participant