python: Replace vercel-workers with the new vercel-queue based impl (#17236)
Queue subscribers and workflows in the Python builder are currently
served through the original `vercel-workers` implementation. Switch the
integration to the new `vercel-queue` SDK while keeping backwards
compat.
`[[tool.vercel.subscribers]]` entrypoints are now introspected at build
time via `vercel.queue.get_subscriptions()` and served through generated
`vercel.queue.asgi_app()` handler modules; their `queue/v2beta` triggers
carry the SDK-registered consumer groups and per-subscription tuning
instead of pyproject-declared values. Projects that depend on `celery`
or `dramatiq` get the matching `vercel-celery`/`vercel-dramatiq`
integration package injected automatically.
`[[tool.vercel.workflows]]` entrypoints pick their serving path by SDK
generation: `vercel.workflow` runs on vercel-queue starting with
`vercel` 0.8.0, so builds against that version or newer serve workflows
exactly like subscribers, while older (or undeterminable) versions keep
the legacy vercel-workers serving — worker env markers plus an injected
pinned `vercel-workers`. Projects that declare a direct `vercel-workers`
dependency opt into the legacy integration wholesale: the legacy
subscriber schema, direct entrypoint serving, and worker env markers.
Both generations keep emitting subscriber Lambdas under the released
`_py_subscribers/...` output paths so deployed consumer-group names stay
stable.
`vercel dev` follows the same split: new-SDK sidecars are served through
`vercel.queue.asgi_app()`, and because vercel-queue dispatches
deliveries by the registered (consumer group, topic) pair, the dev queue
broker now delivers with the SDK-registered consumer groups,
introspected at sidecar startup and reported through the new
`queueSubscriptions` field on `StartDevServerResult`. Legacy projects
keep the vercel-workers dev bootstrap and injection.
The CLI no longer injects `config.hasWorkerServices`; the builder makes
all queue-serving decisions from project metadata.
No integration tests for the new behavior because `vercel.workers` is
still unreleased (this commit needs to land first to ensure
bidirectional compatibility).
---------
Co-authored-by: Nik <nik.sidnev@vercel.com>
github.com-vercel-vercel · 17ee7366 · 2026-07-28