Skip to main content

Groq AI Provider Plugin

The Groq plugin provides ultra-fast AI inference through Groq's custom LPU (Language Processing Unit) hardware. It extends BaseAiProvider and uses the shared AiOperations layer that wraps LangChain under the hood.

Source: packages/plugins/groq/src/groq.plugin.ts

Overview

PropertyValue
Plugin IDgroq
Categoryai-provider
Capabilitiesai-provider
Version1.0.0
Configuration Modeuser-required
Provider Typegroq
Auto-enableNo
Built-inYes
Visibilitypublic

Groq runs open-source models such as Llama and Qwen at significantly higher speeds than conventional cloud providers, making it well suited for works with many items where generation speed is a priority.

Architecture

Groq exposes an OpenAI-compatible API endpoint, so the plugin uses the same AiOperations abstraction as other providers. The providerType: 'groq' flag ensures LangChain selects the correct configuration.

Configuration

Settings Schema

SettingTypeDefaultScopeDescription
apiKeystring(required)userGroq API key (marked as secret)
defaultModelstringqwen/qwen3-32bglobalUsed for all AI tasks unless a tier-specific model is set
simpleModelstringqwen/qwen3-32bglobalHandles tags, short descriptions, and quick classifications
mediumModelstringqwen/qwen3-32bglobalHandles listings, summaries, and content reformatting
complexModelstringqwen/qwen3-32bglobalHandles full page generation and multi-step analysis
baseUrlstringhttps://api.groq.com/openai/v1hiddenCustom API endpoint for proxies or compatible services
temperaturenumber0.7hiddenControls output randomness (0--2)
maxTokensnumber4096hiddenMaximum response length

Required Fields

  • apiKey -- users must provide their own Groq API key
  • defaultModel -- at least one model must be selected

Schema Extensions

The API key field uses x-secret: true to render a masked password input with a show/hide toggle in the dashboard:

{
"apiKey": {
"type": "string",
"title": "Groq API Key",
"x-secret": true,
"x-scope": "user"
}
}

The baseUrl field uses x-hidden: true to keep it out of the standard settings UI. It is only needed when routing requests through a proxy.

Model Capabilities

CapabilitySupported
Structured output (JSON mode)Yes
Streaming responsesYes
Tool callingYes
Vision (image input)Yes
EmbeddingsNo
Max context length128,000 tokens

Embedding Limitation

Groq does not currently support embedding models. Calling createEmbedding() throws an error:

async createEmbedding(_options: EmbeddingOptions): Promise<EmbeddingResponse> {
throw new Error('Embeddings not supported by Groq');
}

If your workflow requires embeddings (e.g., for semantic search within works), pair Groq with a second provider that supports embeddings, such as OpenAI or Ollama.

Tiered Model Assignment

TierUse CasesRecommended Models
SimpleTags, short descriptions, classificationsllama-3.1-8b-instant, gemma2-9b-it
MediumListings, summaries, content reformattingqwen/qwen3-32b, llama-3.3-70b-versatile
ComplexFull page generation, multi-step analysisqwen/qwen3-32b, llama-3.3-70b-versatile

If a tier-specific model is not set, the defaultModel is used for all tiers.

Lifecycle

Loading

async onLoad(context: PluginContext): Promise<void> {
await super.onLoad(context);
this.aiOps = new AiOperations({
apiKey: '',
model: 'qwen/qwen3-32b',
baseURL: 'https://api.groq.com/openai/v1',
temperature: 0.7,
maxTokens: 4096,
providerType: 'groq'
});
}

The apiKey is intentionally empty at load time. It is merged from the user's saved settings via resolveConfig() before each request.

Availability Check

isAvailable() calls AiOperations.testConnection() with the resolved configuration. It returns false if no API key is configured or the connection fails.

API Methods

MethodDescription
createChatCompletion(options)Single chat completion request
createStreamingChatCompletion(options)Streaming chat completion (async generator)
createEmbedding(options)Throws error -- not supported
listModels(settings)List available models from Groq
isAvailable(settings)Test API key and connection
getCapabilities()Return supported capabilities
healthCheck()Return plugin health status

Comparison: Groq vs Ollama

AspectGroqOllama
HostingCloud (Groq servers)Self-hosted
API key requiredYesUsually not
SpeedVery fast (custom LPU hardware)Depends on local hardware
CostFree tier + paid plansFree (your own hardware)
EmbeddingsNot supportedSupported
Data privacyData sent to Groq serversData stays local
Model availabilityCurated set of modelsAny Ollama-compatible model

Getting Started

  1. Obtain a free API key from console.groq.com/keys.
  2. Enable the Groq plugin in the Ever Works dashboard under Settings > Plugins.
  3. Enter your API key in the settings.
  4. Select your preferred models for each task complexity tier.
  5. Groq will be used for content generation during work builds and AI conversations.

Troubleshooting

IssueCauseSolution
Authentication errorInvalid or missing API keyVerify your key at console.groq.com
Rate limit exceededToo many requestsWait and retry, or upgrade your Groq plan
Embedding request failsGroq does not support embeddingsUse a different provider for embeddings
Model not availableModel removed from GroqCheck Groq docs for current model list and update your selection
Slow responsesNetwork latency to Groq serversCheck your connection; Groq inference itself is fast