Vercel
Vercel is the default provider when hosting is not Cloudflare. Set it explicitly when you want local builds to match Vercel deployment output.
import { defineConfig } from 'vite'
import { hubWorkflow } from '@vitehub/workflow/vite'
export default defineConfig({
plugins: [hubWorkflow()],
workflow: {
provider: 'vercel',
},
})
import { defineNitroConfig } from 'nitro/config'
export default defineNitroConfig({
modules: ['@vitehub/workflow/nitro'],
workflow: {
provider: 'vercel',
},
})
Generated output
Vite builds emit Vercel Build Output with a server function that installs the generated workflow registry before app code runs.
The application keeps the same calls:
await runWorkflow('welcome', payload)
await getWorkflowRun('welcome', run.id)
deferWorkflow('welcome', payload)
The generated workflow name uses the same stable encoding as Cloudflare:
workflow--77656c636f6d65
Provider resolution
Provider resolution matches the other ViteHub packages:
workflow.providerwins when set.- Cloudflare hosting selects
cloudflare. - All other hosting targets select
vercel.
This means Vercel can be the local default:
workflow: {}
Use an explicit provider when test output should be deterministic:
workflow: {
provider: 'vercel',
}
Status behavior
Vercel runs return normalized metadata from the generated runtime:
{
"id": "wrun_lvn4hx4f_x8k2p9s1",
"provider": "vercel",
"status": "queued",
"metadata": {
"workflow": "workflow--77656c636f6d65"
}
}
getWorkflowRun() can report completed, failed, or unknown for runs visible to the current deployment process.
Deferred starts
deferWorkflow() uses the current request waitUntil() hook when Vercel exposes one through the runtime adapter:
export default defineEventHandler(() => {
deferWorkflow('welcome', {
email: 'ava@example.com',
})
return { ok: true }
})
The route returns immediately while the generated runtime starts the workflow asynchronously.

