Repository navigation
feat(dictation): add rewrite_mode to DictationConfig - #196
Merged
Merged
Conversation
Adds `DictationConfig.rewrite_mode` and the `DictationRewriteMode` type (`"fast"` | `"smart"`), selecting the model tier that runs the Dictation API's transcript rewrite. Unset, the field is not sent and the server default (`fast`) applies. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TNBmFAJar33SLWN2rKnBzJ
ccampbell-aai
approved these changes
Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
rewrite_modetoDictationConfig, matching the Dictation API'srewrite_modeconfig field (live in prod since 2026-10-11). It picks the model tier that runs the transcript rewrite:"fast": the server default, lowest latency"smart": follows detailed formatting instructions more reliably, at higher latencyDictationRewriteMode = "fast" | "smart"type, exported from the package root viasrc/types.buildConfigJsonsendsrewrite_modeonly when set. Unset, the server default applies.LiteralUnion<…, string>, because the server rejects any other value with a 400.Companion Python SDK PR: assemblyai-python-sdk#270.
Test plan
pnpm test:unit: 349 passed. The 3 failures are the existingutils › user-agenttests on Node 22, which fail the same way onmainpnpm build+pnpm lint(eslint, tsc, prettier, publint): cleanrewrite_mode: "smart"🤖 Generated with Claude Code
https://claude.ai/code/session_01TNBmFAJar33SLWN2rKnBzJ