Repository navigation
Conversation
PriorityRouter.route_request is async and takes request_json, and route_general_request lists it in both of its isinstance tuples, at lines 583 and 637. proxy_multipart_request lists it in neither of its branches, so it falls through to the synchronous else at line 1315 and is called with four positional arguments instead of five. The call sits outside the try that begins at line 1324, so the TypeError escapes as a bare 500 on /v1/audio/transcriptions, /v1/audio/translations and /v1/images/edits, for every request, whenever the router runs with --routing-logic priority. PriorityRouter merged in vllm-project#996 after vllm-project#1021 had already fixed the same omission for SessionRouter, and vllm-project#1022 predicted this while that fix was being made: "will break silently whenever a new router is added". vllm-project#1023 answers vllm-project#1022 by removing the isinstance dispatch entirely, which makes this line unnecessary rather than wrong; both have been idle since 2026-07-29 and main is broken today, so this is the one-line stopgap. test_multipart_proxy.py hard-coded ROUND_ROBIN, the one logic that works. Its router_client helper now takes the routing logic, defaulting to ROUND_ROBIN so the existing four tests are unchanged, and one new test runs the translation path under ROUND_ROBIN and PRIORITY. With the production line reverted the priority case fails with the TypeError above and the round-robin case passes. Signed-off-by: chrikrah <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request adds support for PriorityRouter in proxy_multipart_request by including it in the isinstance check. It also updates the test suite with a new parameterized test to verify that audio translation requests route correctly under both round-robin and priority routing configurations. There are no review comments, so I have no feedback to provide.
Shaoting-Feng
left a comment
There was a problem hiding this comment.
Thanks for your PR. Would you be interested in doing the root-cause fix as a follow-up PR? vllm-project/production-stack#1023 has been conflicting since 07/29/26 and the author hasn't responded to the rebase request, so it'd be good to have someone pick it up.
|
Yes, happy to take it on, and sorry for the slow reply. On credit first. #1023 is @Mohith26's design. I would rebase their commits rather than rewrite them, keep them as author with a On scope: #1023 keeps the Once it lands, the |
PriorityRouter.route_requestisasyncand takesrequest_json(routing_logic.py:917).route_general_requestlistsPriorityRouterin both of itsisinstancetuples, atrequest.py:583and:637.proxy_multipart_requestlists it in neither of its branches, at:1290and:1306. So it falls through to the synchronouselseat:1315, which passes four positional arguments where the method takes five.That call sits outside the
tryat:1324. TheTypeErrortherefore escapes as a bare 500 on/v1/audio/transcriptions,/v1/audio/translationsand/v1/images/edits, for every request, whenever the router runs with--routing-logic priority.A stopgap, not the fix
#1021 corrected the identical omission for
SessionRouter. While that sat in review, #1022 wrote down what would happen next: the dispatch "will break silently whenever a new router is added".PriorityRoutermerged in #996 on 2026-08-18, after #1022 drew its table. It reached the tworoute_general_requestcall sites and not this one.#1020 proposed this dispatch before #1021 merged it. Its tuple names three routers, predates
PriorityRouter, and now conflicts. #1023 answers #1022 by removing theisinstancedispatch. That makes this line unnecessary rather than wrong. Both #1022 and #1023 have sat idle since 2026-07-29, andmainreturns 500 today, so one line can land now and #1023 deletes it later.Test
test_multipart_proxy.pyhard-codedROUND_ROBIN, the one routing logic theelsebranch handles correctly. Itsrouter_clienthelper now takes the routing logic and defaults toROUND_ROBIN, so the existing four tests do not change. One new test runs the translation path under both.Revert the production line, keep the test, and the priority case fails with that
TypeErrorwhile the round-robin case passes.Limits
The same dispatch line covers the two image and transcription endpoints, and no new test covers them, because the existing harness stands up only the audio path. No live vLLM backend ran. The backend here is the
aiohttptest server the file already uses.-swhen doinggit commit[Bugfix],[Feat], and[CI].