Repository navigation
feat(dictation): add rewrite_mode to DictationConfig - #270
Merged
Merged
Conversation
Adds `DictationConfig.rewrite_mode` and the `DictationRewriteMode` enum (`fast` | `smart`), selecting the model tier that runs the Dictation API's transcript rewrite. Unset, the field is omitted 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 latencysmart— follows detailed formatting instructions more reliably, at higher latencyDictationRewriteMode(str, Enum)exported fromassemblyai,assemblyai.dictationandassemblyai.dictation.v1.rewrite_mode: Optional[DictationRewriteMode] = None. Left unset, it is omitted from the config JSON and the server default applies. Plain strings are accepted, and unknown tiers fail validation client-side, consistent withDictationConfig'sextra="forbid"stance.Companion Node SDK PR: assemblyai-node-sdk#196.
Test plan
pytest tests/unit: 741 passed (pydantic 2.x)mypy==1.5.1 --follow-imports=silent --ignore-missing-importson the changedassemblyai/files (the CI lint job): cleanruff format --check/ruff checkon the changedassemblyai/files: cleanrewrite_mode="smart"🤖 Generated with Claude Code
https://claude.ai/code/session_01TNBmFAJar33SLWN2rKnBzJ