feat: add Groq API as an alternative provider - #1
Merged
Conversation
Add a selectable API provider so transcription + cleanup can run on Groq's OpenAI-compatible REST endpoints instead of the ChatGPT WebView. ChatGPT Web stays the default; Groq is fully opt-in. - SpeechProvider protocol; ChatGPTBridge and new GroqClient conform - GroqClient: multipart /audio/transcriptions (whisper-large-v3-turbo) + JSON /chat/completions (llama-3.3-70b-versatile), Bearer auth - GroqSecrets: key resolution Keychain → GROQ_API_KEY env → .env file - AppState routes warm-up + pipeline through the active provider - Settings: provider picker + Groq key (Keychain) / model fields - Diagnostics --groq self-test path; README + design doc; v0.2.0 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
Adds Groq as a selectable API provider for both transcription and cleanup, alongside the existing ChatGPT Web (cookies) backend. ChatGPT Web stays the default, so existing behavior is unchanged; Groq is fully opt-in.
Groq uses OpenAI-compatible REST endpoints:
POST /openai/v1/audio/transcriptions(whisper-large-v3-turbo)POST /openai/v1/chat/completions(llama-3.3-70b-versatile)Changes
SpeechProviderprotocol —ChatGPTBridgeand newGroqClientconform.GroqClient— multipart transcription + JSON chat completion overURLSession, Bearer auth.GroqSecrets— key resolution: Keychain →GROQ_API_KEYenv →.env(cwd /$HOME).AppStateroutes warm-up + the recording pipeline through the active provider.SecureField+ transcribe/cleanup model fields.--selftest --groqpath in Diagnostics; README + design doc; version0.1.0 → 0.2.0.Testing
make build(swiftc-Owhole-module) — compiles clean, exit 0.--selftest --groqexecutes the Groq branch with correct model defaults and proper missing-key error handling.GROQ_API_KEYwas available in this environment. Verify end-to-end with:🤖 Generated with Claude Code