fix(router): unify route_request to async with optional request_json#929
Open
nejch wants to merge 2 commits intovllm-project:mainfrom
Open
fix(router): unify route_request to async with optional request_json#929nejch wants to merge 2 commits intovllm-project:mainfrom
nejch wants to merge 2 commits intovllm-project:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates routing_logic.py to handle request_json as an optional parameter in the RoutingInterface and RoundRobinRouter implementations, while also improving null safety in extract_session_id. However, the review highlights that the changes are incomplete as several other router subclasses still require request_json as a mandatory argument, which will cause TypeError during execution. Furthermore, there is a potential issue where synchronous calls to asynchronous router methods will return coroutines instead of the expected URL strings.
Signed-off-by: Nejc Habjan <nejc.habjan@siemens.com>
ff4c3f2 to
4b09be8
Compare
Collaborator
|
@nejch Hi, Could you fix the CI issue when you have time? |
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.
proxy_multipart_requestcallsrouter.route_requestwithout therequest_jsonargument, which causes aTypeErrorwhen the router is aSessionRoutersince those requirerequest_jsonas a positional parameter. This was introduced by f1265a0 which addedrequest_jsonas a required parameter toSessionRouter.route_requestbut didn't updateproxy_multipart_request.The affects
/v1/audio/transcriptionsand/v1/images/editsendpoints when using session-based routers.This PR makes
request_jsonan optional parameter and makes all routers'route_requestasync.-swhen doinggit commit[Bugfix],[Feat], and[CI].Detailed Checklist (Click to Expand)
Thank you for your contribution to production-stack! Before submitting the pull request, please ensure the PR meets the following criteria. This helps us maintain the code quality and improve the efficiency of the review process.
PR Title and Classification
Please try to classify PRs for easy understanding of the type of changes. The PR title is prefixed appropriately to indicate the type of change. Please use one of the following:
[Bugfix]for bug fixes.[CI/Build]for build or continuous integration improvements.[Doc]for documentation fixes and improvements.[Feat]for new features in the cluster (e.g., autoscaling, disaggregated prefill, etc.).[Router]for changes to thevllm_router(e.g., routing algorithm, router observability, etc.).[Misc]for PRs that do not fit the above categories. Please use this sparingly.Note: If the PR spans more than one category, please include all relevant prefixes.
Code Quality
The PR need to meet the following code quality standards:
pre-committo format your code. SeeREADME.mdfor installation.DCO and Signed-off-by
When contributing changes to this project, you must agree to the DCO. Commits must include a
Signed-off-by:header which certifies agreement with the terms of the DCO.Using
-swithgit commitwill automatically add this header.What to Expect for the Reviews
We aim to address all PRs in a timely manner. If no one reviews your PR within 5 days, please @-mention one of YuhanLiu11
, Shaoting-Feng or ApostaC.