Repository navigation
Cherry-pick upstream bugfixes PRs #4718, #4720, #4723, #4740, #4741, #4743, #4749 - #22
Merged
Merged
Conversation
…turning empty choices Cherry-pick of upstream vllm-project/vllm-omni PRs vllm-project#4718 and vllm-project#4720, adapted for nm-vllm-omni-ent. - Wire up request audio.format to existing encoding infrastructure instead of hardcoding WAV. Validate format against supported set. - Remove AAC from supported formats (unsupported by bundled libsndfile). - Validate requested output modalities against engine capabilities upfront, returning 400 for unsupported modalities instead of silently returning empty choices with HTTP 200. - Validate that modalities is a list of strings. Closes vllm-project#4716 Closes vllm-project#4719 Signed-off-by: Ricardo Noriega De Soto <rnoriega@redhat.com>
…tions Add a field_validator for the prompt field on ImageGenerationRequest that rejects empty and whitespace-only strings with a 400 error. Previously, empty strings passed Pydantic validation and reached the diffusion engine, which would generate an image from nothing instead of returning an error. Unskip the prompt_empty and prompt_whitespace_only test cases that were blocked on this fix. Partial fix for vllm-project#3649 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ors for /v1/images/generations Addresses additional validation gaps from issue vllm-project#3649: - Add seed range constraint (0 to 2^32-1) - Add output_format validator restricting to png/jpeg/webp - Add negative_prompt/system_prompt empty string rejection (Nick's review feedback) - Unskip seed_negative, seed_above_uint32, output_format_invalid tests Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…/wakeup requests Reject empty stage_ids lists (min_length=1) and negative sleep levels (ge=0) at the entrypoint level. Unskip sleep_empty_stage_ids, sleep_negative_level, and wakeup_empty_stage_ids tests. Partial fix for vllm-project#3649. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Shaun Walsh <shaunwalsh24@gmail.com>
…erence_steps validators for /v1/audio/generate - Reject empty/whitespace input prompts - Constrain audio_length to gt=0 - Constrain guidance_scale to gt=0, le=1000 - Constrain num_inference_steps to ge=1, le=1000 - Unskip all 8 issue vllm-project#3649 tests and update error expectations to match entrypoint-level Pydantic validation Partial fix for vllm-project#3649. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Shaun Walsh <shaunwalsh24@gmail.com>
…completions ChatCompletionRequest is imported from upstream vllm and cannot have Pydantic validators added directly. Validate at the handler level by checking the raw JSON body before dispatch: - Reject modalities containing non-string elements (e.g. [123]) - Reject logprobs with non-boolean values (Pydantic v2 coerces "yes" to True instead of returning 400) Unskip modalities_list_bad_element and logprobs_wrong_type tests. Partial fix for vllm-project#3649. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Shaun Walsh <shaunwalsh24@gmail.com>
vllm-project#3649) Add missing request validators for /v1/audio/speech, /v1/audio/speech/batch, and /v1/audio/voices endpoints that previously allowed invalid inputs to reach the engine, causing garbage output, 500s, or subprocess crashes. Pydantic-level validators (protocol/audio.py): - OpenAICreateSpeechRequest: reject empty/whitespace voice - SpeechBatchItem: reject empty input, empty voice, overlong instructions, out-of-range max_new_tokens, invalid ref_audio URI scheme - BatchSpeechRequest: same field validators as SpeechBatchItem Serving-level validators (serving_speech.py): - _pre_validate_batch: validate voice against supported speakers (CustomVoice task only), empty/unknown language, whitespace-only ref_text for Base task — raises ValueError for HTTP 400 instead of embedding errors in per-item results - upload_voice: validate consent (empty, path separators, length), ref_text length, speaker_description length Unskips 26 test cases in test_invalid_audio_speech.py. Upstream: vllm-project#4749 Signed-off-by: Shaun Walsh <shawalsh@redhat.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Shaun Walsh <shaunwalsh24@gmail.com>
|
Cherry-picks for all 5 upstream PRs covering issue #3649 — 47 missing request validators across 6 endpoint groups.
All changes are entrypoint-level pydantic validators and serving-level checks — no new imports, no architectural changes. Should be safe across the code freeze. |
Sync with upstream PR vllm-project#4720 review feedback: single-stage diffusion engines that advertise output_modalities=["image"] must also accept modalities=["text"] for img2text/text2text. Add regression tests for modality validation. Signed-off-by: Ricardo Noriega De Soto <rnoriega@redhat.com>
…sts, update docs Sync with upstream PR vllm-project#4718 review feedback, adapted for nm-vllm-omni-ent: - Add SUPPORTED_AUDIO_FORMATS, SUPPORTED_CHAT_AUDIO_FORMATS, and DEFAULT_AUDIO_FORMAT constants in protocol/audio.py. Remove aac from all Literal types and supported_formats dict. - Extract _resolve_audio_format() helper in serving_chat.py shared between _create_audio_choice and _create_diffusion_chat_completion. - Add unit tests for audio format conversion and validation. - Update docs to remove aac from supported output format lists. Signed-off-by: Ricardo Noriega De Soto <rnoriega@redhat.com>
oglok
force-pushed
the
fix/audio-format-and-modality-validation
branch
from
June 29, 2026 11:06
714634a to
4f9aa28
Compare
|
The upstream TTS commit removed the definition since upstream has no remaining references. The nm fork has 10 additional voice upload test params that still use this skip marker. Restores the constant to fix Ruff F821. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Shaun Walsh <shaunwalsh24@gmail.com>
|
Fixed in c347d9a — the upstream TTS commit removed the |
|
Also |
ChatCompletionRequest moved to vllm.entrypoints.openai.chat_completion.protocol ErrorResponse moved to vllm.entrypoints.openai.engine.protocol Signed-off-by: Ricardo Noriega De Soto <rnoriega@redhat.com>
dougbtv
approved these changes
Jun 29, 2026
dougbtv
added a commit
that referenced
this pull request
Aug 5, 2026
Remove the pydantic output_format validator that restricted image
generation to {"png", "jpeg", "webp"}, blocking "jpg" and causing
accept-sync failures. Upstream vllm-omni has no such restriction;
invalid formats soft-fallback downstream.
Also remove the output_format_invalid test case (no validator to test)
and fix an undefined _SKIP_ISSUE_3649 reference on the seed test.
Originally introduced in 25c01b5 via PR #22 (2026-06-29).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2 tasks
dougbtv
added a commit
that referenced
this pull request
Aug 5, 2026
…ng validators Remove midstream-only pydantic constraints that diverge from upstream: - OmniSleepRequest/OmniWakeupRequest: drop min_length=1 on stage_ids (upstream treats empty list as a no-op, not a 422) - SpeechBatchItem: drop validate_input_not_empty (upstream allows empty input strings without rejecting at the protocol layer) Originally introduced in carries e45d9d1 and db85f25 (PR #22 family, issue vllm-project#3649). Accept-sync tests expect upstream behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick of upstream vllm-project/vllm-omni PRs vllm-project#4718 vllm-project#4720 vllm-project#4723, vllm-project#4740, vllm-project#4741, vllm-project#4743, vllm-project#4749, adapted for nm-vllm-omni-ent.