Skip to content

llm_instruction: docs/SDK cap of 2048 chars is not enforced by the API (10,000 accepted) #300

Open

Description

@YashasviThakur

The docs ("Config parameters"), the type comments, and the SDK all say llm_instruction is limited to 2048 characters ("longer instructions are rejected"). DictationConfig.llm_instruction (Field(max_length=...) in assemblyai/dictation/v1/models.py) makes pydantic reject a longer value before any request is sent.

The server does not enforce 2048. Against dictation.assemblyai.com/v1/transcribe/live:

llm_instruction length Result
2,048 200
2,049 200
3,000 200
10,000 200
100,000 400 config part too large

So the SDK blocks instructions the API would run, and the docs describe a limit that does not exist. This matters because the docs' own guidance ("Writing a good instruction", the word-for-word cleanup example with spoken/cleaned pairs) pushes people toward long, example-heavy instructions.

Ask: either raise the SDK client-side check to the real server limit (and document it), or enforce 2048 on the server if that is intended. The same discrepancy exists in the Node SDK.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions