fix: resolve Groq STT key from model_list when providers.groq is absent#602
Merged
xiaket merged 1 commit intosipeed:mainfrom Feb 22, 2026
Merged
Conversation
When users migrate from the legacy `providers` config to the new `model_list` format, voice transcription silently breaks on Telegram, Discord and Slack channels. The gateway was reading the Groq API key exclusively from `cfg.Providers.Groq.APIKey`, which is empty once the key is defined only inside a `model_list` entry. The transcriber was never initialized, so voice messages fell back to a plain `[voice]` placeholder. This fix also scans `model_list` for any entry whose `model` field starts with `groq/` and uses its `api_key` as a fallback, preserving full backward compatibility with the legacy `providers.groq` field.
Contributor
|
Not following PR template. Please update to follow template. |
Contributor
Author
|
my bad, didn't see a mention of the PR template in the readme, fixing this! |
Contributor
Author
|
fixed, sorry! |
alexhoshina
approved these changes
Feb 21, 2026
Collaborator
alexhoshina
left a comment
There was a problem hiding this comment.
great pr. PTAL @yinwm
Huaaudio
approved these changes
Feb 21, 2026
Collaborator
Huaaudio
left a comment
There was a problem hiding this comment.
LGTM, simple yet effective fix.
zenixls2
pushed a commit
to zenixls2/picoclaw
that referenced
this pull request
Feb 22, 2026
…nt (sipeed#602) When users migrate from the legacy `providers` config to the new `model_list` format, voice transcription silently breaks on Telegram, Discord and Slack channels. The gateway was reading the Groq API key exclusively from `cfg.Providers.Groq.APIKey`, which is empty once the key is defined only inside a `model_list` entry. The transcriber was never initialized, so voice messages fell back to a plain `[voice]` placeholder. This fix also scans `model_list` for any entry whose `model` field starts with `groq/` and uses its `api_key` as a fallback, preserving full backward compatibility with the legacy `providers.groq` field.
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
After migrating from the legacy
providersconfig to the newmodel_listformat, voice transcription silently breaks on Telegram, Discord, and Slack. Voice messages fall back to a plain[voice]placeholder because the Groq API key is read exclusively fromcfg.Providers.Groq.APIKey, which is empty post-migration.This fix adds fallback logic to scan
model_listfor any entry with agroq/-prefixed model and uses itsapi_keyif the legacy field is absent. The legacyproviders.groq.api_keystill takes precedence, so backward compatibility is fully preserved.🗣️ Type of Change
🤖 AI Code Generation
🔗 Related Issue
Closes #601
📚 Technical Context (Skip for Docs)
cmd_gateway.goonly checkedcfg.Providers.Groq.APIKey. Users who fully migrated tomodel_listhad no way to provide a Groq key through the legacy field, causing the transcriber to never be initialised.🧪 Test Environment
📸 Evidence (Optional)
Click to view Logs/Screenshots
Gateway startup log after fix:
Voice messages are now correctly transcribed instead of falling back to
[voice].☑️ Checklist