feat(ai-groq): transcription#649
Conversation
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds Groq transcription support with new model metadata, provider options, a transcription adapter, public exports, E2E wiring, and updated docs and documentation metadata. ChangesGroq Transcription Support
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (7)
.changeset/feat-groq-ai-transcription.mdpackages/ai-groq/src/adapters/transcription.tspackages/ai-groq/src/audio/transcription-provider-options.tspackages/ai-groq/src/index.tspackages/ai-groq/src/model-meta.tstesting/e2e/src/lib/feature-support.tstesting/e2e/src/lib/media-providers.ts
There was a problem hiding this comment.
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
📒 Files selected for processing (2)
docs/adapters/groq.mddocs/media/transcription.md
|
Actionable comments posted: 0 |
@tanstack/ai
@tanstack/ai-acp
@tanstack/ai-angular
@tanstack/ai-anthropic
@tanstack/ai-bedrock
@tanstack/ai-claude-code
@tanstack/ai-client
@tanstack/ai-code-mode
@tanstack/ai-code-mode-skills
@tanstack/ai-codex
@tanstack/ai-devtools-core
@tanstack/ai-elevenlabs
@tanstack/ai-event-client
@tanstack/ai-fal
@tanstack/ai-gemini
@tanstack/ai-grok
@tanstack/ai-grok-build
@tanstack/ai-groq
@tanstack/ai-isolate-cloudflare
@tanstack/ai-isolate-node
@tanstack/ai-isolate-quickjs
@tanstack/ai-mcp
@tanstack/ai-mistral
@tanstack/ai-ollama
@tanstack/ai-openai
@tanstack/ai-opencode
@tanstack/ai-openrouter
@tanstack/ai-preact
@tanstack/ai-react
@tanstack/ai-react-ui
@tanstack/ai-sandbox
@tanstack/ai-sandbox-cloudflare
@tanstack/ai-sandbox-daytona
@tanstack/ai-sandbox-docker
@tanstack/ai-sandbox-local-process
@tanstack/ai-sandbox-sprites
@tanstack/ai-sandbox-vercel
@tanstack/ai-solid
@tanstack/ai-solid-ui
@tanstack/ai-svelte
@tanstack/ai-utils
@tanstack/ai-vue
@tanstack/ai-vue-ui
@tanstack/openai-base
@tanstack/preact-ai-devtools
@tanstack/react-ai-devtools
@tanstack/solid-ai-devtools
commit: |
…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.
There was a problem hiding this comment.
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 winBroaden the URL scheme here.
The adapter forwards any
http(s)://URL, but this text narrows the contract tohttps://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
📒 Files selected for processing (3)
docs/adapters/groq.mddocs/config.jsondocs/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
|
View your CI Pipeline Execution ↗ for commit 411e337
☁️ Nx Cloud last updated this comment at |
🎯 Changes
TranscriptionResultshape in docs.✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit
New Features
verbose_jsonwith segments/timestamps (plus confidence) or plain text.Documentation
srt/vttare not supported.Tests