Local deployment
dstack 0.22.9 ships per-project OpenAI-compatible endpoints and token metering
dstack's 0.22.9 release notes: project-scoped OpenAI-compatible model endpoints, per-project/user/model token metering, OTLP gateway export and multi-replica routers.
Official announcement
According to dstack's own 0.22.9 release note (released 26 Nov, with 4 commits to master since), this update focuses on metering, endpoint structure and observability for its model gateway. The publisher states that Factory, Sky and, in Enterprise, gateways now meter input tokens, cached input tokens and output tokens per project, user, model and export; requests to imported models are metered under the importer project, and admins can view them by day or month on the model page's Metering tab. The note adds that cached-input metering requires the model to report those tokens, for example via SGLang's --enable-cache-report or vLLM's --enable-prompt-tokens-details.
Per the release note, every project on a gateway gets its own OpenAI-compatible endpoint at https://gateway.<domain>/<project name>, offering /models and /chat/completions, while the old gateway-level address now returns 404. For openai-type models, the endpoint forwards requests and responses unchanged, so stream_options, max_completion_tokens, tool calls and content parts no longer trigger 422; usage and prompt_tokens_details survive in stream chunks, and service errors reach the client with the service's own status and body. dstack also says the model endpoint always requires a dstack token from a project member, even when the service has auth: false, and that model URLs (dstack apply, service.model.base_url, Run.service_model) now point to the endpoint rather than service URL plus /v1. In addition, the note lists OTLP/HTTP export of traces, logs and metrics via a new otel property (updatable in place with a restart), router replica groups supporting more than one replica for smg and dynamo routers, and preset benchmarking across a list of concurrency levels.
Analysis
All of the above comes solely from dstack's release note; this publication ran no independent tests, and the points below are conditional. The riskiest items for API users are the endpoint path change and mandatory dstack tokens: any client, gateway proxy or SDK config hardcoded to the gateway root or to service URL plus /v1 will hit 404 or auth errors after upgrading, so inventory call sites before rolling out 0.22.9.
Per-project metering combined with importer-project attribution gives a cost-chargeback signal for shared models, but cached-token figures depend on serving engines enabling their reporting flags; teams without SGLang/vLLM cache reporting will see understated numbers and should not treat the Metering tab as complete until verified. Unchanged passthrough for openai models widens compatibility with SDK features such as stream_options and tool calls, but it also means the gateway can no longer be assumed to sanitize payloads; validation responsibility shifts to the served model or an explicit proxy layer.
OTLP export and multi-replica routers target observability and removal of a single point of failure; the note does not claim load-balancing or failover semantics across router replicas, so that behavior remains unknown from this source.
What remains unverified
The note does not document the performance cost of metering, the exact distribution strategy across router replicas, or how the old endpoint behaves for non-API consumers. Cached-input metering accuracy needs real-world checks with the engine flags enabled, and multi-replica failover requires external validation.