[Feat][Router]: add fallback model support#921
Draft
max-wittig wants to merge 1 commit intovllm-project:mainfrom
Draft
[Feat][Router]: add fallback model support#921max-wittig wants to merge 1 commit intovllm-project:mainfrom
max-wittig wants to merge 1 commit intovllm-project:mainfrom
Conversation
72719ea to
f7e182f
Compare
Contributor
There was a problem hiding this comment.
Code Review
This pull request implements fallback model support, enabling the router to redirect requests to an alternative model when primary backends are unhealthy or fail after multiple attempts. The implementation includes updates to documentation, configuration parsing for CLI and YAML, and the core routing logic. Review feedback highlights opportunities to improve the request rewriting process by updating the request body in-place to avoid synchronization issues with stale data. Additionally, it is recommended to refactor the fallback execution logic to reduce code duplication and ensure that fallback models utilize the same robust retry mechanisms as primary models.
397d57b to
2361c30
Compare
…ode reboots When all backends for a model are unavailable (either health-checked away or all attempts errored out), requests automatically fall through to a configured fallback model. The model name in the request body is rewritten so downstream gateways (e.g. Envoy AI Gateway routing to Bedrock) receive the correct model identifier. Config: per-model fallback_model in YAML, or --static-fallback-models CLI flag. Signed-off-by: Max Wittig <max.wittig@siemens.com>
2361c30 to
fd97ff7
Compare
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.
When all backends for a model are unavailable (either health-checked away or all attempts errored out), requests automatically fall through to a configured fallback model. The model name in the request body is rewritten so downstream gateways (e.g. Envoy AI Gateway routing to Bedrock) receive the correct model identifier.
Config: per-model fallback_model in YAML, or --static-fallback-models CLI flag.
-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.