Skip to content

Fix(rollout): Fail closed on unknown SGLang model names#2112

Open
Baiyu-Su wants to merge 1 commit into
THUDM:mainfrom
Baiyu-Su:fix/fail-closed-sglang-model-routing
Open

Fix(rollout): Fail closed on unknown SGLang model names#2112
Baiyu-Su wants to merge 1 commit into
THUDM:mainfrom
Baiyu-Su:fix/fail-closed-sglang-model-routing

Conversation

@Baiyu-Su

Copy link
Copy Markdown
Contributor

Summary

get_model_url() currently falls back to the default router when a requested model name is missing from args.sglang_model_routers. In multi-model SGLang configs, this can silently route requests intended for a reference, reward, teacher, or judge model to the default model router.

This PR keeps the legacy fallback only when no router map is registered. If a router map exists and the requested model name is unknown, get_model_url() now raises a clear ValueError listing the available model names.

Tests

  • python -m pytest tests/utils/test_sglang_config.py::TestGetModelUrl -q
  • pre-commit run --files slime/rollout/sglang_rollout.py tests/utils/test_sglang_config.py --show-diff-on-failure --color=always

@Baiyu-Su Baiyu-Su changed the title Fail closed on unknown SGLang model names Fix(rollout): Fail closed on unknown SGLang model names Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant