Skip to content

feat(dictation): add rewrite_mode to DictationConfig - #196

Merged
aurpsis-aai merged 1 commit into
mainfrom
aurpsis/dictation-rewrite-mode
Oct 16, 2026
Merged

aurpsis-aai merged 1 commit into
mainfrom
aurpsis/dictation-rewrite-mode

Conversation

@aurpsis-aai

Copy link
Copy Markdown
Contributor

Summary

Adds rewrite_mode to DictationConfig, matching the Dictation API's rewrite_mode config 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 latency
const result = await client.dictation.transcribeLive(micStream, {
  llm_instruction: "Lowercase unless a name, no final punctuation.",
  rewrite_mode: "smart",
});
  • New DictationRewriteMode = "fast" | "smart" type, exported from the package root via src/types.
  • buildConfigJson sends rewrite_mode only when set. Unset, the server default applies.
  • The type is a closed union, not LiteralUnion<…, string>, because the server rejects any other value with a 400.
  • README, CLAUDE.md and CHANGELOG updated; version 4.41.5 → 4.41.6.

Companion Python SDK PR: assemblyai-python-sdk#270.

Test plan

  • pnpm test:unit: 349 passed. The 3 failures are the existing utils › user-agent tests on Node 22, which fail the same way on main
  • pnpm build + pnpm lint (eslint, tsc, prettier, publint): clean
  • Live call against the Dictation API with rewrite_mode: "smart"

🤖 Generated with Claude Code

https://claude.ai/code/session_01TNBmFAJar33SLWN2rKnBzJ

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
@aurpsis-aai
aurpsis-aai merged commit bddf253 into main Oct 16, 2026
4 checks passed
@aurpsis-aai
aurpsis-aai deleted the aurpsis/dictation-rewrite-mode branch October 16, 2026 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants