@tanstack/ai-groq has 7,596 recorded weekly downloads on npm, an increase of 38.8% over the past 30 days, ranking #1374 of 3,247 tracked listings.
About @tanstack/ai-groq
@tanstack/ai-groq
Groq adapter for TanStack AI
Installation
npm install @tanstack/ai-groq
# or
pnpm add @tanstack/ai-groq
# or
yarn add @tanstack/ai-groq
Setup
Get your API key from Groq Console and set it as an environment variable:
export GROQ_API_KEY="gsk_..."
Usage
Text/Chat Adapter
import { groqText } from '@tanstack/ai-groq'
import { chat } from '@tanstack/ai'
const adapter = groqText('openai/gpt-oss-120b')
const result = await chat({
adapter,
threadId: 'thread-1',
stream: false,
messages: [
{ role: 'user', content: 'Explain quantum computing in simple terms' },
],
})
console.log(result.text)
With Explicit API Key
import { createGroqText } from '@tanstack/ai-groq'
const adapter = createGroqText('openai/gpt-oss-120b', 'gsk_api_key')
Supported Models
Chat Models
meta-llama/llama-prompt-guard-2-86m- Meta Llama Prompt Guard (content moderation)meta-llama/llama-prompt-guard-2-22m- Meta Llama Prompt Guard (content moderation)openai/gpt-oss-120b- GPT OSS 120B (reasoning, tools, search)openai/gpt-oss-20b- GPT OSS 20B (reasoning, search)openai/gpt-oss-safeguard-20b- GPT OSS Safeguard 20B (content moderation, reasoning)qwen/qwen3.8-27b- Qwen3.8 27B (reasoning, tools, vision)
Features
- ✅ Streaming chat completions
- ✅ Structured output (JSON Schema)
- ✅ Function/tool calling
- ✅ Multimodal input (text + images for vision models)
- ✅ Summarization (
groqSummarize) - ❌ Embeddings (not supported by Groq)
- ❌ Image generation (not supported by Groq)
Tree-Shakeable Adapters
This package uses tree-shakeable adapters, so you only import what you need:
// Only imports text adapter
import { groqText } from '@tanstack/ai-groq'
This keeps your bundle size small!
License
MIT
Description from the npm listing.
- ai
- ai-sdk
- typescript
- tanstack
- groq
- adapter
- llm
- chat
- low-latency
- tool-calling
- structured-outputs
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (592)Similar npm AI SDKs plugins
All 20 @tanstack/ai-groq alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@tanstack/ai-groq. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.