sgl-project/sglang

[Feature] request for "classify" method for sglang router

Geschlossen

#15.240 geöffnet am 16.12.2025

 (10 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (6.216 Forks)auto 404
good first issue

Repository-Metriken

Stars
 (28.442 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 2T 1h) (1.000 gemergte PRs in 30 T)

Beschreibung

Checklist

Motivation

In RL, we may launch a router to dispatch reward computation requests for both generative rewards (via /generate) and discriminative rewards (via /classify). I note that the "classify" api has not been implemented in sglang router (https://docs.sglang.io/advanced_features/router.html#api-surface). Hope future release will include this feat.

In addition to this, I want to report a bug that in the latest sglang router, the router fails to handle "v1/embeddings" requests after the servers sleep and then wake up.

# step 1: Launch multiple workers and one router
# step 2: Sleep servers and then wake up them
# step 3: Post "v1/embeddings" requests to router

For sglang-router==0.2.4 curl http://{router_address}/v1/models {"object":"list","data":[{"id":"unknown","object":"model","owned_by":"local"}]} and the reward computation also fails

For sglang-router==0.2.2 all behaviors are correct

@slin1237 @zhaochenyang20

Related resources

No response

Contributor Guide