sgl-project/sglang · error · ValueError
Unknown action domain name {domain_name!r}. Valid names: {so
Error message
Unknown action domain name {domain_name!r}. Valid names: {sorted(EMBODIMENT_TO_DOMAIN_ID)} What it means
When domain_name is given instead of domain_id, it is normalized (strip+lower) and looked up in the EMBODIMENT_TO_DOMAIN_ID registry. Unknown names are rejected with the list of valid names to prevent silent domain mismatches.
Source
Thrown at python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/cosmos3.py:641
def component_uses(
self, server_args: ServerArgs, stage_name: str | None = None
) -> list[ComponentUse]:
return [ComponentUse(self._component_stage_name(stage_name), "vae")]
@staticmethod
def _resolve_domain_id(batch: Req) -> int:
"""Resolve action embodiment domain ID; required for action generation."""
domain_id = getattr(batch.sampling_params, "domain_id", None)
if domain_id is not None:
domain_id = int(domain_id)
if domain_id < 0:
raise ValueError(f"domain_id must be non-negative, got {domain_id}")
return domain_id
domain_name = getattr(batch.sampling_params, "domain_name", None)
if domain_name:
key = str(domain_name).strip().lower()
if key not in EMBODIMENT_TO_DOMAIN_ID:
raise ValueError(
f"Unknown action domain name {domain_name!r}. "
f"Valid names: {sorted(EMBODIMENT_TO_DOMAIN_ID)}"
)
return EMBODIMENT_TO_DOMAIN_ID[key]
raise ValueError(
"Cosmos3 action generation requires --domain-id or --domain-name."
)
def _prepare_action_latents(
self,
batch: Req,
generator,
device: torch.device,
dtype: torch.dtype,
) -> None:
"""Prepare action latents and conditioning, writing them onto ``batch``.
Action tokens run at frame rate (no temporal compression), so the chunkView on GitHub (pinned to 0132848349)
Solutions
- Use one of the valid names printed in the error (lowercase, exact spelling)
- Check casing/underscores: the lookup strips and lowercases but does not fuzzy match
- Fall back to the numeric domain_id if the name is unlisted
Example fix
# before sp.domain_name = 'Franka Arm' # after sp.domain_name = 'franka_arm' # exact key from EMBODIMENT_TO_DOMAIN_ID
Defensive patterns
Strategy: validation
Validate before calling
from sglang.multimodal_gen... import EMBODIMENT_TO_DOMAIN_ID
key = sp.domain_name.strip().lower()
assert key in EMBODIMENT_TO_DOMAIN_ID, f'use one of {sorted(EMBODIMENT_TO_DOMAIN_ID)}' Type guard
def known_domain_name(name: str, registry: dict) -> bool:
return name.strip().lower() in registry Try / catch
try:
stage.forward(batch)
except ValueError as e:
if 'Unknown action domain name' in str(e):
sp.domain_name = 'franka_arm' # fallback to a known domain
else:
raise Prevention
- Expose the valid domain list to users via API docs/introspection
- Normalize names (strip+lower) client-side before submitting
When it happens
Trigger: Passing sampling_params.domain_name not present in EMBODIMENT_TO_DOMAIN_ID (e.g. 'Franka-ARM' if 'franka_arm' is the registered key, or a typo).
Common situations: Guessing embodiment names, casing/separator mismatches, or a new robot not yet in the registry.
Related errors
- action_mode is set but the loaded Cosmos3 checkpoint has no
- domain_id must be non-negative, got {domain_id}
- action must have shape [T, D], got {tuple(action.shape)}
- No raw action dim for Cosmos3 embodiment {embodiment!r}. Exp
- Cosmos3 action input accepts one image field; use a list or
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/e66c64167a308a43.
Report an issue: GitHub.