blog: announce BytePlus adapter for TanStack AI - #1119
Conversation
Draft post for @tanstack/ai-byteplus covering Seed chat, Seedance, Seedream, and Seed Speech. Header image intentionally omitted for now. Closes #1118
📝 WalkthroughWalkthroughAdded a blog article for ChangesBytePlus adapter announcement
Estimated code review effort: 1 (Trivial) | ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
tanstack-com | 3a498b4 | Commit Preview URL | Aug 11 2026, 01:36 AM |
Lead with native TypeScript Seedance (direct BytePlus billing), add the hero still, rewrite voice for intro/why, and document Seedance 2.5 capabilities accurately (30s/720p; 4K via 2.0). Closes #1118
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 `@src/blog/tanstack-ai-byteplus-adapter.md`:
- Around line 58-63: Define the shared `arkApiKey` and `audioFile` inputs before
the examples using explicit application-provided placeholders, such as an
environment variable for the API key and a sample audio URL. Ensure both
snippets reference these declared values without adding imports for unavailable
`./config` or `./audio` modules.
🪄 Autofix
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 Plus
Run ID: 9a3ebeeb-4680-4686-a79d-c9547dec316a
⛔ Files ignored due to path filters (1)
public/blog-assets/tanstack-ai-byteplus-adapter/header.jpgis excluded by!**/*.jpg
📒 Files selected for processing (1)
src/blog/tanstack-ai-byteplus-adapter.md
| ```ts | ||
| import { createBytePlusText } from '@tanstack/ai-byteplus' | ||
|
|
||
| const adapter = createBytePlusText('dola-seed-2-1-turbo-260628', arkApiKey, { | ||
| baseURL: 'https://ark.eu-west.bytepluses.com/api/v3', | ||
| }) |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -eu
printf '%s\n' '--- target snippets ---'
sed -n '45,75p;220,250p' src/blog/tanstack-ai-byteplus-adapter.md
printf '%s\n' '--- identifier references and definitions ---'
rg -n --glob '!node_modules' --glob '!dist' '\b(arkApiKey|audioFile)\b' .
printf '%s\n' '--- nearby imports and code fences ---'
rg -n -C 4 'createBytePlusText|generateTranscription|byteplusTranscription|arkApiKey|audioFile' src/blog/tanstack-ai-byteplus-adapter.mdRepository: TanStack/tanstack.com
Length of output: 4325
🏁 Script executed:
#!/bin/bash
set -eu
printf '%s\n' '--- candidate files ---'
git ls-files | rg '(^|/)(package\.json|.*byteplus.*|.*transcription.*|.*adapter.*)$' | head -200
printf '%s\n' '--- API declarations and implementations ---'
rg -n -C 5 'createBytePlusText|function generateTranscription|const generateTranscription|generateTranscription\s*=|type GenerateTranscription|interface.*Transcription' \
--glob '!node_modules' --glob '!dist' .
printf '%s\n' '--- article context ---'
cat -n src/blog/tanstack-ai-byteplus-adapter.md | sed -n '1,90p;215,245p'
printf '%s\n' '--- existing local placeholder/import conventions ---'
rg -n -C 2 'process\.env|apiKey|audio(File|Data|Buffer)|application-provided|placeholder' src/blog | head -240Repository: TanStack/tanstack.com
Length of output: 18028
🌐 Web query:
TanStack AI BytePlus adapter createBytePlusText arkApiKey generateTranscription audioFile documentation
💡 Result:
To use BytePlus transcription with TanStack AI, you must use the Seed Speech product, which requires a separate API key from the standard ModelArk product [1][2][3]. Key Implementation Details: 1. Environment Variable: Use BYTEPLUS_VOICE_API_KEY for transcription. Do not use the ARK_API_KEY, which is reserved for chat, video, and image generation [1][2][3]. 2. Adapter Import: Import byteplusTranscription from @tanstack/ai-byteplus [2]. 3. Execution: Use the generateTranscription function from @tanstack/ai [2][4]. Example Usage: import { generateTranscription } from '@tanstack/ai'; import { byteplusTranscription } from '@tanstack/ai-byteplus'; const result = await generateTranscription({ adapter: byteplusTranscription('seed-asr'), audio: 'https://example.com/recording.mp3', // Can be a File, base64, data URL, or public URL language: 'en', modelOptions: { enable_punc: true, enable_speaker_info: true }, }); console.log(result.text); Configuration Notes: - The createBytePlusText function mentioned in your query is part of the ModelArk chat adapter family and is not used for transcription [1]. - BytePlus Seed Speech ASR is a synchronous API, meaning it processes audio and returns the transcript without requiring polling [2]. - Supported model options include enable_itn (for numbers and dates), enable_punc (punctuation), enable_ddc (filler/stutter removal), enable_speaker_info (speaker labels), and show_utterances [2].
Citations:
- 1: https://tanstack.com/ai/latest/docs/adapters/byteplus
- 2: https://tanstack.com/ai/latest/docs/media/transcription
- 3: https://tanstack.com/intent/registry/%40tanstack%2Fai
- 4: https://tanstack.com/ai/latest/docs/reference/functions/generateTranscription
🏁 Script executed:
#!/bin/bash
set -eu
python3 - <<'PY'
import re
from pathlib import Path
text = Path("src/blog/tanstack-ai-byteplus-adapter.md").read_text()
blocks = re.findall(r"```ts\n(.*?)```", text, flags=re.S)
targets = {
"regional endpoint": "createBytePlusText",
"transcription": "generateTranscription",
}
keywords = {
"const", "let", "var", "import", "from", "export", "async", "await",
"new", "return", "true", "false", "null", "undefined",
}
for name, needle in targets.items():
block = next(block for block in blocks if needle in block)
declared = set(re.findall(r"\b(?:const|let|var|function|class)\s+([A-Za-z_$][\w$]*)", block))
declared.update(re.findall(r"\bimport\s+\{([^}]+)\}\s+from", block))
declared = {part.strip().split(" as ")[-1] for item in declared for part in ([item] if "," not in item else item.split(","))}
declared.update(re.findall(r"\b(?:createBytePlusText|generateTranscription|byteplusTranscription)\b", block))
identifiers = re.findall(r"\b[A-Za-z_$][\w$]*\b", block)
free = sorted({
ident for ident in identifiers
if ident not in declared
and ident not in keywords
and ident not in {"baseURL", "adapter", "modelOptions", "enable_punc", "enable_speaker_info", "audio"}
})
print(f"{name}: {free}")
PYRepository: TanStack/tanstack.com
Length of output: 385
Declare the inputs used by both examples.
arkApiKey and audioFile are undefined in the snippets. Use explicit application-provided placeholders, such as process.env.ARK_API_KEY and a sample audio URL, or label both values as placeholders. Do not import ./config or ./audio unless those modules are included.
🤖 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 `@src/blog/tanstack-ai-byteplus-adapter.md` around lines 58 - 63, Define the
shared `arkApiKey` and `audioFile` inputs before the examples using explicit
application-provided placeholders, such as an environment variable for the API
key and a sample audio URL. Ensure both snippets reference these declared values
without adding imports for unavailable `./config` or `./audio` modules.
Summary
@tanstack/ai-bytepluswith a Seedance 2.5–first framing: native TypeScript access, direct BytePlus billing (no third-party middleman), plus the rest of the suitepublic/blog-assets/tanstack-ai-byteplus-adapter/header.jpgTest plan
pnpm dev→/blog)Closes #1118
Summary by CodeRabbit