You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DictationConfig has no llm field: documented custom LLM request / aai_prompt unreachable #299
Docs ("Transcript rewriting → Sending your own LLM request") say config.llm accepts an LLM Gateway request: messages/prompt with {{turn}}, model, max_tokens, temperature, response_format, reasoning_effort, or a saved prompt via aai_prompt + prompt_replacements.
The API accepts it. Verified against dictation.assemblyai.com/v1/transcribe/live: {"llm":{"messages":[...]}} returns 200 with a rewrite, and llm + llm_instruction returns 400 "set either llm_instruction or llm, not both".
This SDK cannot send it.DictationConfig (assemblyai/dictation/v1/models.py, 1.10.12) has no llm field and sets extra="forbid", so DictationConfig(llm={...}) raises a validation error. There is no way to send the field.
Impact: saved prompts (aai_prompt), model choice, max_tokens, temperature and response_format are only usable by hand-rolling multipart, even though the docs steer people to the SDK.
Suggested fix: add an llm field typed to the documented set, enforce mutual exclusion with llm_instruction. The Node SDK has the same gap (buildConfigJson drops unknown fields).
Adding context from the "Authenticate your app" docs page: it tells apps that run on users' devices to keep rewrite prompts off the device by saving them in the account and sending only {"llm": {"aai_prompt": "my-app-cleanup", "prompt_replacements": {...}}} in the dictation config. That flow is impossible through this SDK (and the other one), so the SDKs cannot follow the docs' own security recommendation for the audience (web, desktop, mobile) the page is written for. Raising the priority of this one.
I'd like to work on this. I'll add an llm field to DictationConfig with the fields the docs list, and check the documented rules before the request is sent (llm or llm_instruction, not both; the 8192 token caps; aai_prompt only with prompt_replacements). I'll open a PR soon.
Activity
YashasviThakur commentedon Nov 19, 2026
Adding context from the "Authenticate your app" docs page: it tells apps that run on users' devices to keep rewrite prompts off the device by saving them in the account and sending only
{"llm": {"aai_prompt": "my-app-cleanup", "prompt_replacements": {...}}}in the dictation config. That flow is impossible through this SDK (and the other one), so the SDKs cannot follow the docs' own security recommendation for the audience (web, desktop, mobile) the page is written for. Raising the priority of this one.mayankbohradev commentedon Nov 27, 2026
I'd like to work on this. I'll add an
llmfield toDictationConfigwith the fields the docs list, and check the documented rules before the request is sent (llmorllm_instruction, not both; the 8192 token caps;aai_promptonly withprompt_replacements). I'll open a PR soon.