Skip to content

feat(ai-groq): transcription#649

Merged
AlemTuzlak merged 8 commits into
TanStack:mainfrom
joksas:feat/groq-ai-transcription
Jul 1, 2026
Merged

feat(ai-groq): transcription#649
AlemTuzlak merged 8 commits into
TanStack:mainfrom
joksas:feat/groq-ai-transcription

Conversation

@joksas

@joksas joksas commented May 26, 2026

Copy link
Copy Markdown
Contributor

🎯 Changes

  • Adds Groq as a transcription provider. Groq's API is mostly OpenAI SDK-compatible, but its transcription endpoint additionally accepts HTTP URLs as input, so this is implemented as a custom integration rather than going through the SDK.
  • Fixes TranscriptionResult shape in docs.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

  • New Features

    • Added Groq as a transcription provider (Whisper models), supporting HTTP(S) audio URLs and local audio inputs. Exposes configurable temperature and timestamp granularity options, and returns verbose_json with segments/timestamps (plus confidence) or plain text.
  • Documentation

    • Updated Groq adapter and media transcription docs with new transcription usage, supported models/response formats, and clarification that srt/vtt are not supported.
  • Tests

    • Updated end-to-end transcription feature/provider coverage to include Groq.
@coderabbitai

coderabbitai Bot commented May 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds Groq transcription support with new model metadata, provider options, a transcription adapter, public exports, E2E wiring, and updated docs and documentation metadata.

Changes

Groq Transcription Support

Layer / File(s) Summary
Transcription Data Contracts
packages/ai-groq/src/model-meta.ts, packages/ai-groq/src/audio/transcription-provider-options.ts, packages/ai-groq/src/adapters/transcription.ts
Groq transcription models and provider options are defined, along with response shape interfaces for verbose and non-verbose transcription payloads.
Transcription Adapter Implementation
packages/ai-groq/src/adapters/transcription.ts
GroqTranscriptionAdapter builds multipart requests to Groq transcription endpoints, handles URL or local audio input, parses verbose/text/JSON responses, and normalizes audio inputs into File objects.
Factory Functions and Public API
packages/ai-groq/src/adapters/transcription.ts, packages/ai-groq/src/index.ts, .changeset/feat-groq-ai-transcription.md
Adds explicit and environment-based transcription factories and re-exports transcription symbols and model metadata from the package entrypoint; the changeset records the new minor release.
E2E Testing Integration
testing/e2e/src/lib/feature-support.ts, testing/e2e/src/lib/media-providers.ts
Groq is added to transcription feature support and wired into the E2E transcription provider factory map.
Documentation and Media Docs
docs/adapters/groq.md, docs/media/transcription.md, docs/config.json
Groq transcription support is documented in adapter and media docs, and documentation section timestamps are updated.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

  • TanStack/ai#635: Updates Groq adapter documentation and relates to the Groq transcription docs surfaced in this PR.

Suggested reviewers: AlemTuzlak

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately names the main change: Groq transcription support.
Description check ✅ Passed The description follows the required template and includes changes, checklist, and release impact sections.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/ai-groq/src/adapters/transcription.ts`:
- Around line 161-170: The adapter currently forwards
TranscriptionOptions.responseFormat (effectiveFormat) including 'srt'/'vtt' to
form.append('response_format', effectiveFormat) and later calls response.json()
for non-verbose_json/text branches; change this to explicitly reject unsupported
formats for Groq: add a check after computing effectiveFormat (the variable
named effectiveFormat in transcription.ts) and if effectiveFormat === 'srt' ||
effectiveFormat === 'vtt' throw a clear Error like "responseFormat 'srt'/'vtt'
not supported by Groq" (or alternatively map them to a supported value such as
'text' or 'json' if you prefer), and ensure form.append('response_format', ...)
and the subsequent response handling (the branches that call response.text() or
response.json(), e.g., the block that currently uses response.json() and
generateId(this.name)) only run for supported formats
('json','text','verbose_json').
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f2e8fc62-7779-4e78-9f21-0e407ea9246f

📥 Commits

Reviewing files that changed from the base of the PR and between ef029a0 and a8ced68.

📒 Files selected for processing (7)
  • .changeset/feat-groq-ai-transcription.md
  • packages/ai-groq/src/adapters/transcription.ts
  • packages/ai-groq/src/audio/transcription-provider-options.ts
  • packages/ai-groq/src/index.ts
  • packages/ai-groq/src/model-meta.ts
  • testing/e2e/src/lib/feature-support.ts
  • testing/e2e/src/lib/media-providers.ts
Comment thread packages/ai-groq/src/adapters/transcription.ts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/media/transcription.md`:
- Around line 99-102: The comment incorrectly states that segments include
word-level timing; update the documentation comment to clarify that verbose_json
is the default, segment timestamps live on result.segments (segment-level
start/end) and word-level timing is exposed separately on result.words
(top-level), and adjust any example text around result.segments and result.words
to reflect that contract (refer to symbols result.segments, result.words, and
verbose_json).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2f7c9fa6-04a5-47a4-a758-3fe3aee26176

📥 Commits

Reviewing files that changed from the base of the PR and between 362ea79 and b5d8da6.

📒 Files selected for processing (2)
  • docs/adapters/groq.md
  • docs/media/transcription.md
Comment thread docs/media/transcription.md Outdated
@coderabbitai

coderabbitai Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

Actionable comments posted: 0

@pkg-pr-new

pkg-pr-new Bot commented Jun 24, 2026

Copy link
Copy Markdown

Open in StackBlitz

@tanstack/ai

npm i https://pkg.pr.new/@tanstack/ai@649

@tanstack/ai-acp

npm i https://pkg.pr.new/@tanstack/ai-acp@649

@tanstack/ai-angular

npm i https://pkg.pr.new/@tanstack/ai-angular@649

@tanstack/ai-anthropic

npm i https://pkg.pr.new/@tanstack/ai-anthropic@649

@tanstack/ai-bedrock

npm i https://pkg.pr.new/@tanstack/ai-bedrock@649

@tanstack/ai-claude-code

npm i https://pkg.pr.new/@tanstack/ai-claude-code@649

@tanstack/ai-client

npm i https://pkg.pr.new/@tanstack/ai-client@649

@tanstack/ai-code-mode

npm i https://pkg.pr.new/@tanstack/ai-code-mode@649

@tanstack/ai-code-mode-skills

npm i https://pkg.pr.new/@tanstack/ai-code-mode-skills@649

@tanstack/ai-codex

npm i https://pkg.pr.new/@tanstack/ai-codex@649

@tanstack/ai-devtools-core

npm i https://pkg.pr.new/@tanstack/ai-devtools-core@649

@tanstack/ai-elevenlabs

npm i https://pkg.pr.new/@tanstack/ai-elevenlabs@649

@tanstack/ai-event-client

npm i https://pkg.pr.new/@tanstack/ai-event-client@649

@tanstack/ai-fal

npm i https://pkg.pr.new/@tanstack/ai-fal@649

@tanstack/ai-gemini

npm i https://pkg.pr.new/@tanstack/ai-gemini@649

@tanstack/ai-grok

npm i https://pkg.pr.new/@tanstack/ai-grok@649

@tanstack/ai-grok-build

npm i https://pkg.pr.new/@tanstack/ai-grok-build@649

@tanstack/ai-groq

npm i https://pkg.pr.new/@tanstack/ai-groq@649

@tanstack/ai-isolate-cloudflare

npm i https://pkg.pr.new/@tanstack/ai-isolate-cloudflare@649

@tanstack/ai-isolate-node

npm i https://pkg.pr.new/@tanstack/ai-isolate-node@649

@tanstack/ai-isolate-quickjs

npm i https://pkg.pr.new/@tanstack/ai-isolate-quickjs@649

@tanstack/ai-mcp

npm i https://pkg.pr.new/@tanstack/ai-mcp@649

@tanstack/ai-mistral

npm i https://pkg.pr.new/@tanstack/ai-mistral@649

@tanstack/ai-ollama

npm i https://pkg.pr.new/@tanstack/ai-ollama@649

@tanstack/ai-openai

npm i https://pkg.pr.new/@tanstack/ai-openai@649

@tanstack/ai-opencode

npm i https://pkg.pr.new/@tanstack/ai-opencode@649

@tanstack/ai-openrouter

npm i https://pkg.pr.new/@tanstack/ai-openrouter@649

@tanstack/ai-preact

npm i https://pkg.pr.new/@tanstack/ai-preact@649

@tanstack/ai-react

npm i https://pkg.pr.new/@tanstack/ai-react@649

@tanstack/ai-react-ui

npm i https://pkg.pr.new/@tanstack/ai-react-ui@649

@tanstack/ai-sandbox

npm i https://pkg.pr.new/@tanstack/ai-sandbox@649

@tanstack/ai-sandbox-cloudflare

npm i https://pkg.pr.new/@tanstack/ai-sandbox-cloudflare@649

@tanstack/ai-sandbox-daytona

npm i https://pkg.pr.new/@tanstack/ai-sandbox-daytona@649

@tanstack/ai-sandbox-docker

npm i https://pkg.pr.new/@tanstack/ai-sandbox-docker@649

@tanstack/ai-sandbox-local-process

npm i https://pkg.pr.new/@tanstack/ai-sandbox-local-process@649

@tanstack/ai-sandbox-sprites

npm i https://pkg.pr.new/@tanstack/ai-sandbox-sprites@649

@tanstack/ai-sandbox-vercel

npm i https://pkg.pr.new/@tanstack/ai-sandbox-vercel@649

@tanstack/ai-solid

npm i https://pkg.pr.new/@tanstack/ai-solid@649

@tanstack/ai-solid-ui

npm i https://pkg.pr.new/@tanstack/ai-solid-ui@649

@tanstack/ai-svelte

npm i https://pkg.pr.new/@tanstack/ai-svelte@649

@tanstack/ai-utils

npm i https://pkg.pr.new/@tanstack/ai-utils@649

@tanstack/ai-vue

npm i https://pkg.pr.new/@tanstack/ai-vue@649

@tanstack/ai-vue-ui

npm i https://pkg.pr.new/@tanstack/ai-vue-ui@649

@tanstack/openai-base

npm i https://pkg.pr.new/@tanstack/openai-base@649

@tanstack/preact-ai-devtools

npm i https://pkg.pr.new/@tanstack/preact-ai-devtools@649

@tanstack/react-ai-devtools

npm i https://pkg.pr.new/@tanstack/react-ai-devtools@649

@tanstack/solid-ai-devtools

npm i https://pkg.pr.new/@tanstack/solid-ai-devtools@649

commit: 411e337

…ption

# Conflicts:
#	docs/media/transcription.md
#	packages/ai-groq/src/index.ts
#	packages/ai-groq/src/model-meta.ts
#	testing/e2e/src/lib/feature-support.ts
…ests

The transcription adapter issues a raw fetch (to support Groq's URL input),
but only sent Authorization, silently dropping any defaultHeaders from config.
This broke custom-header use cases and the E2E harness's X-Test-Id isolation.
Also bump updatedAt on the edited Groq/Transcription docs pages.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/media/transcription.md (1)

88-88: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Broaden the URL scheme here.

The adapter forwards any http(s):// URL, but this text narrows the contract to https:// only. That under-documents supported input and can mislead users.

Suggested doc tweak
-... or an `https://` URL (which is forwarded to Groq without re-uploading).
+... or an `http://` or `https://` URL (which is forwarded to Groq without re-uploading).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/media/transcription.md` at line 88, The transcription docs currently
understate the supported remote audio URL input by mentioning only https://,
while the adapter accepts http(s):// URLs. Update the wording in the
transcription section to describe the full supported URL scheme, and keep the
rest of the input type list aligned with the behavior exposed by the
transcription adapter.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@docs/media/transcription.md`:
- Line 88: The transcription docs currently understate the supported remote
audio URL input by mentioning only https://, while the adapter accepts
http(s):// URLs. Update the wording in the transcription section to describe the
full supported URL scheme, and keep the rest of the input type list aligned with
the behavior exposed by the transcription adapter.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5d91d1f2-0331-431b-90ac-434a3b4e24d1

📥 Commits

Reviewing files that changed from the base of the PR and between a514c3d and 411e337.

📒 Files selected for processing (3)
  • docs/adapters/groq.md
  • docs/config.json
  • docs/media/transcription.md
✅ Files skipped from review due to trivial changes (1)
  • docs/config.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/adapters/groq.md
@nx-cloud

nx-cloud Bot commented Jul 1, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 411e337

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 1m 35s View ↗
nx run-many --targets=build --exclude=examples/... ✅ Succeeded 5s View ↗

☁️ Nx Cloud last updated this comment at 2026-07-01 13:30:53 UTC

@AlemTuzlak AlemTuzlak merged commit 011ef69 into TanStack:main Jul 1, 2026
10 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants