feat: add Groq (groq.com) as an AI assistant provider - #82
Conversation
Adds Groq / GroqCloud as a selectable provider under Settings > AI Assistant, following the existing provider pattern. Kept deliberately distinct from the existing Grok (xAI) provider: - uses the official `groq` SDK rather than Grok's OpenAI-compatible endpoint, so the two share no client construction path - combo label "Groq (GroqCloud)", positioned after Mistral rather than next to "Grok (xAI)" - module docstring cross-references grok_provider.py - regression test asserts a GroqProvider is never a GrokProvider Model IDs come from Groq's deprecation page, not its model list. /docs/models still tags llama-3.3-70b-versatile and llama-3.1-8b-instant as production, but both were shut down on 2026-08-16 for free and developer tier and now return 404 model_not_found. Default is openai/gpt-oss-120b. Follows the repo conventions in .claude/rules/ai-providers.md: explicit timeout=120.0, embed_model_id set for the per-recording embedding cache, per-provider key/model isolation, and on-demand SDK install via PROVIDER_PACKAGES. Because nothing previously asserted a provider's default model, both the provider default and the provider_factory default are now pinned in tests against a DECOMMISSIONED_GROQ_MODELS set. Closes ObscureAintSecure#81
|
Reviewed and merging. This is a well-put-together PR. What I checked beyond the diff itself: the six places on master that name a provider ( The implementation matches The deprecation finding is the valuable part. Pinning the default against Note this is the first PR on the repo actually verified by CI (added in #12 last week; your run needed approval as a first-time contributor). 392 passed. I could not independently verify |
Closes #81
Adds Groq (groq.com / GroqCloud) as a selectable provider under Settings > AI Assistant, following the existing provider pattern.
Keeping it distinct from Grok (xAI)
The names collide constantly, so this is separated at four levels:
groqSDK rather than Grok's OpenAI-compatible endpoint, so the two share no client construction pathgrok_provider.pytest_groq_is_distinct_from_grokasserts aGroqProvideris never aGrokProvider, and a smoke check confirms the two keep separate keys and model listsModel IDs come from the deprecation page, not the model list
Worth calling out, since it cost me a debugging round. Groq's
/docs/modelspage still listsllama-3.3-70b-versatileandllama-3.1-8b-instantas production models. They are not. Groq announced deprecation on 2026-06-17 and shut both down on 2026-08-16 for free and developer tier:Auth and endpoint are both fine, so it reads as an API key problem.
/docs/deprecationsis the accurate source.Shipped list:
openai/gpt-oss-120b(default),openai/gpt-oss-20b,qwen/qwen3.6-27b. The last is Groq's own recommended migration target for Llama 3.3 70B, but their model docs still tag it Preview, so it is offered and not defaulted. The model combo issetEditable(True)for every provider, so newer IDs can be typed in without a code change.Conventions
Follows
.claude/rules/ai-providers.md:timeout=120.0on the client, per the 120s conventionembed_model_id = "st:all-MiniLM-L6-v2", embeddings via the sharedget_sentence_transformercacheprovider_settingsPROVIDER_PACKAGESpyproject.tomlgroqextra plusall-ai,requirements.txt, and a regenerateduv.lock(uv lock --checkpasses, resolves 206 packages, adds groq v1.6.0)Tests
Full suite green: 392 passed.
Nothing in the suite previously asserted a provider's default model, which is how a decommissioned default nearly shipped. Defaults are now pinned against a
DECOMMISSIONED_GROQ_MODELSset, covering the provider default and theprovider_factorydefault separately, since they are written in two places and only the factory one applies when a config omitsmodel.Two things for you to decide
.claude/rules/ai-providers.mdto document the stale-model-list gotcha. Happy to drop that hunk if you would rather own that file yourself.groqversion floor is>=0.11.0to matchanthropic>=0.40.0and friends, but the SDK resolved to 1.6.0 and has since crossed a major. Say the word if you want>=1.0.0.Not verified: no live Groq API call was made against a paid or enterprise-tier key, only against the free/developer tier where the 404 above reproduced.