Skip to content

[Frontend] Set MAX_AUDIO_CLIP_FILESIZE_MB via env var instead of hardcoding #21374

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

deven-labovitch
Copy link
Contributor

@deven-labovitch deven-labovitch commented Jul 22, 2025

Purpose

Set MAX_AUDIO_CLIP_FILESIZE_MB via env var in SpeechToTextConfig instead of hardcoding to 25

Test Plan

Startup vllm locally with and without VLLM_MAX_AUDIO_CLIP_FILESIZE_MB set. Ensure VLLM_MAX_AUDIO_CLIP_FILESIZE_MB defaults to 25 when unset

Test Result

Passed

@deven-labovitch deven-labovitch requested a review from aarnphm as a code owner July 22, 2025 13:19
@mergify mergify bot added the frontend label Jul 22, 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

The pull request successfully makes MAX_AUDIO_CLIP_FILESIZE_MB configurable via an environment variable. However, the current implementation is not robust against invalid values for the environment variable, which could lead to a crash on startup. I've suggested a change to handle this case gracefully.

@deven-labovitch deven-labovitch changed the title Set MAX_AUDIO_CLIP_FILESIZE_MB via env var and default to 25 Set MAX_AUDIO_CLIP_FILESIZE_MB via SpeechToTextConfig Jul 22, 2025
@deven-labovitch deven-labovitch changed the title Set MAX_AUDIO_CLIP_FILESIZE_MB via SpeechToTextConfig Set MAX_AUDIO_CLIP_FILESIZE_MB via env var instead of hardcoding Jul 22, 2025
Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

🚀

@DarkLight1337
Copy link
Member

cc @NickLucche

Copy link
Contributor

@NickLucche NickLucche left a comment

Choose a reason for hiding this comment

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

Hey, thanks a lot for contributing!

So the intended usage of SpeechToTextConfig is to hold configs for speech-to-text models.
The way I am thinking about MAX_AUDIO_CLIP_FILESIZE_MB is more from a server managing point of view, purely to limit the amount of bytes streamed and handle traffic/networking rates.

In my view this shouldn't be model-dependent so I would either stick with a configurable env var or a startup argument.
In both cases it would be great if you could add a line to the openai server docs, I am pretty sure I left a TODO.

@deven-labovitch
Copy link
Contributor Author

deven-labovitch commented Jul 22, 2025

Hey, thanks a lot for contributing!

So the intended usage of SpeechToTextConfig is to hold configs for speech-to-text models. The way I am thinking about MAX_AUDIO_CLIP_FILESIZE_MB is more from a server managing point of view, purely to limit the amount of bytes streamed and handle traffic/networking rates.

In my view this shouldn't be model-dependent so I would either stick with a configurable env var or a startup argument. In both cases it would be great if you could add a line to the openai server docs, I am pretty sure I left a TODO.

Thanks for taking a look! Makes sense that this isn't per model config, just updated the PR to remove it from `SpeechToTextConfig.

Are these the openai server docs? I can add a line! docs/serving/openai_compatible_server.md

@mergify mergify bot added the documentation Improvements or additions to documentation label Jul 22, 2025
@deven-labovitch
Copy link
Contributor Author

deven-labovitch commented Jul 22, 2025

Hey, thanks a lot for contributing!

So the intended usage of SpeechToTextConfig is to hold configs for speech-to-text models. The way I am thinking about MAX_AUDIO_CLIP_FILESIZE_MB is more from a server managing point of view, purely to limit the amount of bytes streamed and handle traffic/networking rates.

In my view this shouldn't be model-dependent so I would either stick with a configurable env var or a startup argument. In both cases it would be great if you could add a line to the openai server docs, I am pretty sure I left a TODO.

@NickLucche Just added in a note to docs/serving/openai_compatible_server.md. Thanks!

Set VLLM_MAX_AUDIO_CLIP_FILESIZE_MB
@deven-labovitch deven-labovitch force-pushed the deven/set-MAX_AUDIO_CLIP_FILESIZE_MB-by-env-var branch from 0c54e1b to 5c7b9bb Compare July 22, 2025 19:58
Signed-off-by: Deven Labovitch <[email protected]>
Copy link
Contributor

@NickLucche NickLucche left a comment

Choose a reason for hiding this comment

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

let's just store the env var value once then we're good here

Signed-off-by: Deven Labovitch <[email protected]>
Copy link
Contributor

@NickLucche NickLucche left a comment

Choose a reason for hiding this comment

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

LGMT, thanks for your work!

Copy link
Member

@DarkLight1337 DarkLight1337 left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM

Signed-off-by: Deven Labovitch <[email protected]>
@deven-labovitch deven-labovitch changed the title Set MAX_AUDIO_CLIP_FILESIZE_MB via env var instead of hardcoding [Frontend] Set MAX_AUDIO_CLIP_FILESIZE_MB via env var instead of hardcoding Jul 23, 2025
@vllm-bot vllm-bot merged commit 63d92ab into vllm-project:main Jul 24, 2025
15 checks passed
DW934 pushed a commit to DW934/vllm that referenced this pull request Jul 24, 2025
DW934 pushed a commit to DW934/vllm that referenced this pull request Jul 28, 2025
avigny pushed a commit to avigny/vllm that referenced this pull request Jul 31, 2025
wenscarl pushed a commit to wenscarl/vllm that referenced this pull request Aug 4, 2025
x22x22 pushed a commit to x22x22/vllm that referenced this pull request Aug 5, 2025
Pradyun92 pushed a commit to Pradyun92/vllm that referenced this pull request Aug 6, 2025
npanpaliya pushed a commit to odh-on-pz/vllm-upstream that referenced this pull request Aug 6, 2025
jinzhen-lin pushed a commit to jinzhen-lin/vllm that referenced this pull request Aug 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants