Skip to content

0.22.9

Latest

Choose a tag to compare

@r4victor r4victor released this 26 Nov 12:01
· 4 commits to master since this release
d79b426

Gateways

OpenTelemetry

Gateways can now export their traces, logs, and metrics via OTLP over HTTP. Configure it with the new otel property:

type: gateway
name: example-gateway

backend: aws
region: eu-west-1

domain: example.com

otel:
  endpoint: https://otlp.example.com:4318
  headers:
    Authorization: Bearer ${{ secrets.otlp_token }}
  traces: true
  logs: true
  metrics: true

endpoint and headers can reference secrets. The otel configuration is visible to everyone who can view the gateway, including projects it's exported to, so keep credentials in secrets. Telemetry is reported with service.name set to dstack-gateway.

otel can be updated in-place:

$ dstack apply -f gateway.dstack.yml

Found gateway example-gateway. Detected changes that can be updated in-place:
- otel

Update the gateway? [y/n]:

The gateway app restarts to apply the new settings. See OpenTelemetry.

Services

Router replicas

The replica group with a router can now have more than one replica, so the router is no longer a single point of failure. This works with both the smg and dynamo routers:

groups:
  - replicas: 2
    commands:
      - pip install smg
      - smg launch --host 0.0.0.0 --port 8000
    resources:
      cpu: 4
    router:
      type: smg

  - replicas: 2
    # ...

Models

Model endpoint

On a gateway, every project now has its own OpenAI-compatible model endpoint, https://gateway.<gateway domain>/<project name>, with /models and /chat/completions. Project members access it with their dstack tokens. dstack apply shows it below the service URL:

$ dstack apply -f qwen-service.dstack.yml
...
Service is published at:
  https://qwen-service.example.com
Model Qwen/Qwen3.8-27B-FP8 is published at:
  https://gateway.example.com/team-a

For openai models, the model endpoint now forwards requests and responses as they are. Requests with stream_options, max_completion_tokens, tool calls, or content parts used to get 422, and responses lost usage in stream chunks and prompt_tokens_details. Errors of the service reach the client with the service's own status and body.

In the UI, the Models page lists a project's own and imported models, and a model's page has an Endpoint button that shows how to access it.

Model exports

In dstack Enterprise, Factory, and Sky, models can now be exported to other projects by name. The gateway itself doesn't have to be exported:

$ dstack export create my-models --model Qwen/Qwen3.8-27B-FP8 --importer team-b
 NAME       FLEETS  GATEWAYS  MODELS                IMPORTERS
 my-models  -       -         Qwen/Qwen3.8-27B-FP8  team-b

Members of an importer project access the model at their own project's model endpoint:

$ dstack import list -v
 NAME              FLEETS  GATEWAYS  MODEL                 URL
 team-a/my-models  -       -         Qwen/Qwen3.8-27B-FP8  https://gateway.example.com/team-b

An export stays in place when the model's service is stopped, replaced, or not started yet. See Imported models.

Token metering

In dstack Factory and Sky, gateways now meter the input, cached input, and output tokens of requests to the model endpoint, per project, user, model, and export. Requests to imported models are metered under the importer project. Project admins see the tokens by day or month on the Metering tab of the model's page.

To meter cached input tokens, make sure the model reports them, e.g. by passing --enable-cache-report to SGLang or --enable-prompt-tokens-details to vLLM.

Fleets

Exports

Runs of importer projects can now provision new instances in imported backend fleets, up to the fleet's nodes maximum. Previously, they could only use instances the fleet already had. The new instances belong to the exporter project and are provisioned with its backends.

Note

Container-based backends of the exporter project can't be used for importers' runs yet, and runs that mount network volumes can't use imported backend fleets.

Presets

Concurrency sweep

Preset creation can now benchmark a service at several concurrency levels in each trial. Set concurrency to a list:

type: preset
name: dsv4-flash

base: deepseek-ai/DeepSeek-V4-Flash
trials: 5
min_context_length: 1048576
max_ttft: 675

concurrency: [4, 8, 16]

dstack preset list shows the sweep as c=min..max, and the benchmark metrics as ranges over the concurrencies that met the constraints:

$ dstack preset list
 NAME              ID        BASE                           CONSTRAINTS          BENCHMARK                                          STATUS          SUBMITTED
 dsv4-flash-b200   c83375b4  deepseek-ai/DeepSeek-V4-Flash  io=10K/1.5K c=4..16  tps/user=319..570 ttft=213ms..465ms ctx=1M  ▂▁██▇  trialing (5/5)  2 min ago

For the benchmark at each concurrency, pass --json to dstack preset get. Presets created before the sweep stay readable as a one-point sweep. See List presets.

Backends

Vast.ai

The new min_inet_down backend option sets the minimum download bandwidth of Vast.ai offers, in Mbit/s, for workloads that download large weights on start:

backend_options:
  - type: vastai
    min_inet_down: 8000

Without it, offers are filtered at more than 128 Mbit/s, as before.

Breaking changes

  • The model endpoint moved from https://gateway.<gateway domain> to https://gateway.<gateway domain>/<project name>. Requests to the old address get 404.
  • For an openai model on a gateway, the model URL is now the model endpoint instead of the service URL plus /v1. This applies to dstack apply, service.model.base_url in the HTTP API, and Run.service_model in the Python API. The service URL itself doesn't change. The model endpoint always requires a dstack token of a project member, also when the service has auth: false.

What's Changed

New Contributors

Full Changelog: 0.22.8...0.22.9