Skip to content

[Frontend] Add max-completion-token option to transcription/translation endpoints#30769

Merged
DarkLight1337 merged 3 commits intovllm-project:mainfrom
NickLucche:stt-max-tokens
Dec 16, 2025
Merged

[Frontend] Add max-completion-token option to transcription/translation endpoints#30769
DarkLight1337 merged 3 commits intovllm-project:mainfrom
NickLucche:stt-max-tokens

Conversation

@NickLucche
Copy link
Collaborator

Straightforward PR to allow users to specify max tokens generated on a STT endpoint, using an additional non-OAI argument.

Signed-off-by: NickLucche <nlucches@redhat.com>
@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.

@mergify mergify bot added the frontend label Dec 16, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a max_completion_tokens option to the transcription and translation endpoints. The implementation in vllm/entrypoints/openai/speech_to_text.py has a critical bug that will cause a TypeError when max_completion_tokens is not provided, and an AttributeError for translation requests. I've provided a suggestion to fix this. To fully support this for translations, max_completion_tokens should also be added to the TranslationRequest protocol. Additionally, a test case for the translation endpoint with this new option would be beneficial.

@mergify
Copy link

mergify bot commented Dec 16, 2025

Hi @NickLucche, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy or markdownlint failing?
mypy and markdownlint are run differently in CI. If the failure is related to either of these checks, please use the following commands to run them locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10
# For markdownlint
pre-commit run --hook-stage manual markdownlint

Signed-off-by: NickLucche <nlucches@redhat.com>
Signed-off-by: NickLucche <nlucches@redhat.com>
@DarkLight1337 DarkLight1337 enabled auto-merge (squash) December 16, 2025 17:34
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Dec 16, 2025
@DarkLight1337 DarkLight1337 merged commit ca702a1 into vllm-project:main Dec 16, 2025
48 checks passed
NickLucche added a commit to NickLucche/vllm that referenced this pull request Dec 17, 2025
…tion endpoints (vllm-project#30769)

Signed-off-by: NickLucche <nlucches@redhat.com>
Majid-Taheri pushed a commit to Majid-Taheri/vllm that referenced this pull request Dec 23, 2025
…tion endpoints (vllm-project#30769)

Signed-off-by: NickLucche <nlucches@redhat.com>
Signed-off-by: Ubuntu <mjtaheri68@gmail.com>
dsuhinin pushed a commit to dsuhinin/vllm that referenced this pull request Jan 21, 2026
…tion endpoints (vllm-project#30769)

Signed-off-by: NickLucche <nlucches@redhat.com>
Signed-off-by: dsuhinin <suhinin.dmitriy@gmail.com>
ItzDEXX pushed a commit to ItzDEXX/vllm that referenced this pull request Feb 19, 2026
…tion endpoints (vllm-project#30769)

Signed-off-by: NickLucche <nlucches@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants