sgl-project/sglang · error · ValueError
Removed server argument(s): {replacements}
Error message
Removed server argument(s): {replacements} What it means
ValueError raised by ServerArgs._reject_retired_args when kwargs contain one or more server arguments that were removed from the API. The message maps each retired name to its replacement (name -> replacement), so it doubles as a migration hint.
Source
Thrown at python/sglang/multimodal_gen/runtime/server_args/server_args.py:3137
server_args_kwargs["kv_cache_quant_config"] = kv_quant_config
elif attr in kwargs:
server_args_kwargs[attr] = kwargs[attr]
return cls(**server_args_kwargs)
@staticmethod
def _reject_retired_args(kwargs: dict[str, Any]) -> None:
retired_args = {
"decoder_tp": "decoder_sp for decoder/VAE parallel decode",
"warmup": "warmup_mode=request or warmup_mode=off",
"server_warmup": "warmup_mode=server or warmup_mode=off",
}
removed = [name for name in retired_args if name in kwargs]
if removed:
replacements = "; ".join(
f"{name} -> {retired_args[name]}" for name in removed
)
raise ValueError(f"Removed server argument(s): {replacements}")
@staticmethod
def load_config_file(config_file: str) -> dict[str, Any]:
"""Load a config file."""
if config_file.endswith(".json"):
with open(config_file, "r") as f:
return json.load(f)
elif config_file.endswith((".yaml", ".yml")):
try:
import yaml
except ImportError:
raise ImportError(
"Please install PyYAML to use YAML config files. "
"`pip install pyyaml`"
)
with open(config_file, "r") as f:
return yaml.safe_load(f)
else:View on GitHub (pinned to 0132848349)
Solutions
- Rename each flagged argument to its replacement shown in the message (format: old -> new).
- Delete the argument if no replacement is listed and the feature was removed.
- Regenerate or update saved config files against the current ServerArgs fields.
- Pin the previous library version only as a temporary stopgap while migrating.
Example fix
# before ServerArgs.from_kwargs(chunked_prefill_size=8192) # retired name # after ServerArgs.from_kwargs(max_prefill_tokens=8192) # per message mapping
Defensive patterns
Strategy: validation
Validate before calling
# mirror the retired check: drop/rename known-retired keys before constructing
retired = {"old_arg_name": "new_arg_name"} # keep in sync with release notes
for k in list(kwargs):
if k in retired:
kwargs[retired[k]] = kwargs.pop(k) Try / catch
try:
args = ServerArgs.from_kwargs(**kwargs)
except ValueError as e:
if "Removed server argument" in str(e):
# parse 'old -> new' pairs from message and auto-migrate
raise Prevention
- Regenerate config files after upgrades.
- Run a config lint step in CI that constructs ServerArgs.
- Subscribe to release notes for renamed args.
When it happens
Trigger: Calling ServerArgs.from_kwargs / from_dict (or a config file) that still contains arguments listed in the retired_args table after an upgrade renamed or deleted them.
Common situations: Upgrading SGLang/multimodal_gen and reusing old config JSON/YAML or old launch scripts; code that programmatically builds kwargs from an outdated constants list.
Related errors
- expert cache and staging budgets, and read splits, must be p
- expert-pack stats flush interval cannot be negative
- Block sparse tensors{context} require BLOCK_SIZE_KV={base_n_
- Invalid arch format: {arch_str}
- attn_sink requires topk_length to be provided as well
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/d1b4906c63e2b652.
Report an issue: GitHub.