Azure / Azure/azure-sdk-for-python

Enhanced Mode prompt length differs between REST API (20,000 chars) and Python SDK (4,096 chars)

Open
#48,423 2 comments 1 reaction 0 assignees View on GitHub
Client customer-reported needs-team-attention question Service Attention Speech Transcription
Dominant language
Python
Stars
5.6k
Forks
3.4k
Avg merge
1d 21h
Merged PRs (30d)
193

Description

## **Summary**
The Enhanced Mode prompt length limit documented for the REST API is **20,000 characters**,
while the Python SDK documentation states a limit of **4,096 characters**.
This discrepancy causes confusion for users expecting consistent behavior across SDK and REST API.

## **REST API Documentation**
REST API documentation states that Enhanced Mode supports **up to 20,000 characters** for the prompt:

- [REST API documentation](https://learn.microsoft.com/en-us/azure/ai-services/speech-service/llm-speech?tabs=new-foundry%2Clinux%2Cwindows&pivots=programming-language-rest)

## **Python SDK Documentation**
Python SDK documentation states that the prompt limit is **4,096 characters**:

- [Python SDK documentation](https://learn.microsoft.com/en-us/azure/ai-services/speech-service/llm-speech?tabs=new-foundry%2Clinux%2Cwindows&pivots=programming-language-python)

## **Expected Behavior**
The Python SDK should either:
- support the same **20,000-character limit** as the REST API,
**or**
- clearly document why the SDK imposes a stricter limit.

## **Actual Behavior**
- REST API allows 20,000 characters.
- Python SDK documentation states 4,096 characters.
- This inconsistency makes it unclear which limit is authoritative for SDK users.

## **Questions for SDK Team**
1. Should the Python SDK support the REST API’s 20,000-character limit?
2. If not, what is the reason for the stricter SDK limit?
3. Should the SDK documentation be updated to clarify this discrepancy?

## **Environment**
- Package: `azure-ai-transcription`

Contributor guide

Open the contributing guide

Research direction

Start by comparing the linked REST API and Python SDK documentation with the azure-ai-transcription package behavior. Confirm which prompt limit the SDK enforces and whether the difference is intentional; done means the SDK behavior and documentation are aligned, or the stricter limit is clearly explained.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.