-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Describe the bug
The AI proofreading feature suddenly returns a 401 Unauthorized error when using a valid Groq API Key.
Despite having worked perfectly for over 15 days, the error message now explicitly points to https://platform.openai.com, indicating that the keyboard is incorrectly routing requests to OpenAI's endpoint instead of Groq's.
To Reproduce
- Open HeliboardL Settings > AI Settings.
- Input a valid Groq API Key (starting with
gsk_). - Select a Groq-supported model (e.g.,
llama-3.3-70b-versatile). - Attempt to use the Proofreading feature on any text field.
- Observed Result: A popup appears with
API error (401)and a message directing the user to OpenAI's dashboard.
Expected behavior
The app should route requests to the Groq endpoint (https://api.groq.com/openai/v1) when a Groq key/model is selected. It should not default to OpenAI's servers.
Technical Analysis & Validation
I have verified that the API key is fully functional and the Groq service is active by manually executing the following curl command from the same device:
curl -X POST "[https://api.groq.com/openai/v1/chat/completions](https://api.groq.com/openai/v1/chat/completions)" \
-H "Authorization: Bearer [REDACTED_GROQ_KEY]" \
-H "Content-Type: application/json" \
-d '{
"model": "llama-3.3-70b-versatile",
"messages": [{"role": "user", "content": "hi"}]
}'
Result: The command returns a successful 200 OK with a valid JSON response from Groq. This confirms that the issue is a routing regression within the app and not a provider-side failure.
App version:
- v3.7.2 (standard)
Device Information
- Model: Redmi Note 13 Pro 5G
- OS: Xiaomi HyperOS 2.0.207.0 (Android 15)
