Repository navigation
Update stale AI model messaging - #7
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The production UI credited a model the backend no longer serves.
The backend selects its model from
GROQ_MODEL(defaultopenai/gpt-oss-120bsince Groq retiredllama-3.3-70b-versatile), so a learner was told one thing while a different model produced theirquiz. 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:src/pages/Index.tsx:510Powered by Llama 3 70B via GroqAI powered by Groqsrc/pages/CreateAssessment.tsx:353Questions crafted using Llama 3 70B modelQuestions crafted by Groq-powered AITwo 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:/llama/ior/\b70b\b/illama,gpt-oss,70b) appears anywhere undersrc/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 ownregex. A future model swap now fails a test instead of shipping a stale claim.
Writing it required mocking
AuthContextandLink— this is the first test to renderIndex.tsx,which reads auth state for its greeting.
Not touched, deliberately
No backend behaviour, no deployment configuration, no API contract.
GROQ_MODEL, the provider seamand the Blueprint are unchanged; this only affects what a learner reads.
Verification
npm run typechecknpm run buildnpm run lint