Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions gateway/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ dependencies = [
"dstack[gateway] @ https://github.com/dstackai/dstack/archive/refs/heads/master.tar.gz",
]

[project.optional-dependencies]
# TODO: drop, unused by the server since 0.21.0
sglang = ["sglang-router==0.3.2"]

[tool.setuptools.package-data]
"dstack.gateway" = [
"resources/systemd/*",
Expand Down
17 changes: 0 additions & 17 deletions src/dstack/_internal/core/models/routers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,6 @@ class RouterType(str, Enum):
DYNAMO = "dynamo"


class SGLangServiceRouterConfig(CoreModel): # TODO: drop, unused by the server since 0.21.0
type: Annotated[Literal["sglang"], Field(description="The router type")] = "sglang"
policy: Annotated[
Literal["random", "round_robin", "cache_aware", "power_of_two"],
Field(
description="The routing policy. Options: `random`, `round_robin`, `cache_aware`, `power_of_two`"
),
] = "cache_aware"
pd_disaggregation: Annotated[
bool,
Field(description="Enable PD disaggregation mode for the SGLang router"),
] = False


class ReplicaGroupRouterConfig(CoreModel):
type: Annotated[
Literal["sglang", "dynamo"],
Expand All @@ -38,6 +24,3 @@ class ReplicaGroupRouterConfig(CoreModel):
),
),
] = "sglang"


AnyServiceRouterConfig = SGLangServiceRouterConfig

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,9 @@ limit_req_zone {{ zone.key }} zone={{ zone.name }}:10m rate={{ zone.rpm }}r/m;

{% if replicas %}
upstream {{ domain }}.upstream {
{% if router_port is not none %}
server 127.0.0.1:{{ router_port }}; # SGLang router on the gateway
{% else %}
{% for replica in replicas %}
server unix:{{ replica.socket }}; # replica {{ replica.id }}
{% endfor %}
{% endif %}
}
{% else %}

Expand Down Expand Up @@ -48,7 +44,7 @@ server {
{% endfor %}

{# For router services: block all requests except whitelisted locations added dynamically above #}
{% if has_router_replica or (router is not none and router.type == "sglang") %}
{% if has_router_replica %}
location / {
return 403;
}
Expand Down
1 change: 0 additions & 1 deletion src/dstack/_internal/proxy/gateway/routers/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ async def register_service(
ssh_private_key=body.ssh_private_key,
repo=repo,
has_router_replica=body.has_router_replica,
router=body.router,
nginx=nginx,
service_conn_pool=service_conn_pool,
)
Expand Down
2 changes: 0 additions & 2 deletions src/dstack/_internal/proxy/gateway/schemas/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from pydantic import BaseModel, Field

from dstack._internal.core.models.instances import SSHConnectionParams
from dstack._internal.core.models.routers import AnyServiceRouterConfig
from dstack._internal.proxy.lib.models import RateLimit


Expand Down Expand Up @@ -48,7 +47,6 @@ class RegisterServiceRequest(BaseModel):
ssh_private_key: str
rate_limits: tuple[RateLimit, ...] = ()
has_router_replica: bool = False
router: Optional[AnyServiceRouterConfig] = None


class SetServiceIdRequest(BaseModel):
Expand Down

This file was deleted.

90 changes: 0 additions & 90 deletions src/dstack/_internal/proxy/gateway/services/model_routers/base.py

This file was deleted.

Loading
Loading