[Rust] Wire the gRPC server into the frontend lifecycle (#41964)
Signed-off-by: jain-ria <riajain@NVIDIA.com>
This commit is contained in:
@@ -368,6 +368,11 @@ def handle_deprecated_args(server_args: Any):
|
||||
)
|
||||
if cfg.grpc_port is None:
|
||||
raise ValueError("--sidecar requires --grpc-port or SGLANG_GRPC_PORT.")
|
||||
if envs.SGLANG_RUST_SERVER.get():
|
||||
raise ValueError(
|
||||
"--sidecar is not yet supported with SGLANG_RUST_SERVER: "
|
||||
"Rust-server mode does not run the Python sidecar lifecycle."
|
||||
)
|
||||
if native_grpc:
|
||||
if cfg.use_ray:
|
||||
raise ValueError(
|
||||
|
||||
@@ -47,6 +47,11 @@ def _build_server_args(
|
||||
"prefill": ext.DisaggregationMode.Prefill,
|
||||
"decode": ext.DisaggregationMode.Decode,
|
||||
}[get_disagg().disaggregation_mode]
|
||||
grpc_port = (
|
||||
None
|
||||
if get_serving().smg_grpc_mode or get_serving().grpc_mode
|
||||
else get_serving().grpc_port
|
||||
)
|
||||
return ext.ServerArgs(
|
||||
model_path=get_model().model_path,
|
||||
served_model_name=get_serving().served_model_name,
|
||||
@@ -56,6 +61,9 @@ def _build_server_args(
|
||||
weight_version=get_serving().weight_version,
|
||||
host=get_serving().host,
|
||||
port=get_serving().port,
|
||||
# The shared field is also populated for legacy SMG mode; only forward
|
||||
# it when it selects SGLang's native gRPC transport.
|
||||
grpc_port=grpc_port,
|
||||
log_level=get_observability().log_level,
|
||||
log_level_http=get_observability().log_level_http,
|
||||
chat_template=get_serving().chat_template,
|
||||
|
||||
Reference in New Issue
Block a user