feat: integrate Groq API and resolve next-intl parsing issues - #421
Open
Arifuzzamanjoy wants to merge 2 commits into
Open
feat: integrate Groq API and resolve next-intl parsing issues#421Arifuzzamanjoy wants to merge 2 commits into
Arifuzzamanjoy wants to merge 2 commits into
Conversation
This commit introduces native support for the Groq API as an AI provider alongside OpenAI and Anthropic. It also resolves a series of translation parsing errors that were crashing the settings pages. Changes included: - Replaced t() with t.raw() for strings containing raw HTML tags or literal curly braces to bypass ICU parsing errors. - Cleaned up invalid HTML attributes inside ICU translation tags (scopesHint). - Relaxed the ai_configs_provider_check database constraint to allow 'groq'. - Replicated OpenAI's provider adapter for Groq's compatibility API endpoint. - Updated Settings UI and translations to natively support Groq with llama-3.1-8b-instant as the default model.
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.
Description: Hey! This PR tackles two things:
Groq API Support: Added Groq as an official AI provider so users can bring their own Groq keys (which are insanely fast). Hooked it up using their OpenAI compatibility layer, set the default model to llama-3.1-8b-instant, and ran a quick DB migration to accept 'groq' in the ai_configs table.
Translation Crashes: Fixed the INVALID_MESSAGE runtime errors that were causing the Settings pages to crash. next-intl was choking on raw HTML tags and literal curly braces {{1}} in a few of the translation strings. I swapped out t() for t.raw() in the affected components to bypass the ICU parser, and cleaned up an invalid HTML attribute in the JSON files.
Everything is tested, and the test suite is fully green (645/645 passing).