Summary
The @tanstack/ai-grok adapter currently exposes text, image, and summarize adapters, but lacks audio and speech support. xAI's Grok API supports audio capabilities that should be exposed via the SDK's tree-shakeable adapter pattern.
Proposed adapters
Following the pattern established in @tanstack/ai-fal (packages/typescript/ai-fal/src/adapters/):
grokAudio — audio generation
grokSpeech — text-to-speech
grokTranscription — speech-to-text (if supported by Grok API)
Acceptance criteria
References
- Existing Grok adapter:
packages/typescript/ai-grok/
- Reference implementation (audio/speech):
packages/typescript/ai-fal/src/adapters/
- xAI API docs: https://docs.x.ai/
Summary
The
@tanstack/ai-grokadapter currently exposestext,image, andsummarizeadapters, but lacks audio and speech support. xAI's Grok API supports audio capabilities that should be exposed via the SDK's tree-shakeable adapter pattern.Proposed adapters
Following the pattern established in
@tanstack/ai-fal(packages/typescript/ai-fal/src/adapters/):grokAudio— audio generationgrokSpeech— text-to-speechgrokTranscription— speech-to-text (if supported by Grok API)Acceptance criteria
packages/typescript/ai-grok/src/adapters/packages/typescript/ai-grok/src/index.tsvia the/adapterssubpathmodel-meta.tsfor any new audio/speech modelsCLAUDE.mdrequirements (updatefeature-support.ts+test-matrix.ts)pnpm changesetReferences
packages/typescript/ai-grok/packages/typescript/ai-fal/src/adapters/