From f759960ac23badbaa21e16bd3dbbac29f8223b2f Mon Sep 17 00:00:00 2001 From: Blake Ledden <47259830+bledden@users.noreply.github.com> Date: Sun, 15 Feb 2026 08:33:24 -0800 Subject: [PATCH] feat: expose consistent_hashing policy in Python router CLI args (#17972) --- .../python/src/sglang_router/router_args.py | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/sgl-model-gateway/bindings/python/src/sglang_router/router_args.py b/sgl-model-gateway/bindings/python/src/sglang_router/router_args.py index e9413bfc4..8f03ae92e 100644 --- a/sgl-model-gateway/bindings/python/src/sglang_router/router_args.py +++ b/sgl-model-gateway/bindings/python/src/sglang_router/router_args.py @@ -246,7 +246,15 @@ class RouterArgs: f"--{prefix}policy", type=str, default=RouterArgs.policy, - choices=["random", "round_robin", "cache_aware", "power_of_two", "manual"], + choices=[ + "random", + "round_robin", + "cache_aware", + "power_of_two", + "manual", + "consistent_hashing", + "prefix_hash", + ], help="Load balancing policy to use. In PD mode, this is used for both prefill and decode unless overridden", ) routing_group.add_argument( @@ -260,6 +268,8 @@ class RouterArgs: "power_of_two", "manual", "bucket", + "consistent_hashing", + "prefix_hash", ], help="Specific policy for prefill nodes in PD mode. If not specified, uses the main policy", ) @@ -267,7 +277,15 @@ class RouterArgs: f"--{prefix}decode-policy", type=str, default=None, - choices=["random", "round_robin", "cache_aware", "power_of_two", "manual"], + choices=[ + "random", + "round_robin", + "cache_aware", + "power_of_two", + "manual", + "consistent_hashing", + "prefix_hash", + ], help="Specific policy for decode nodes in PD mode. If not specified, uses the main policy", ) routing_group.add_argument(