[ai] Add collectUIMessages option to accumulate and return UIMessage[] from agent.stream - #768

Merged
VaguelySerious merged 4 commits into
mainfrom
peter/ui-message-return-v2
Jan 14, 2026
Merged

[ai] Add collectUIMessages option to accumulate and return UIMessage[] from agent.stream#768
VaguelySerious merged 4 commits into
mainfrom
peter/ui-message-return-v2

Conversation

@VaguelySerious

@VaguelySeriousVaguelySerious commented Jan 12, 2026

Copy link
Copy Markdown
Member

Related to #688 and #739

This adds a new option collectUIMessages to agent.stream, which, if passed, adds a stream transformation for accumulating stream chunks in durable state, and will return uiMessages: UIMessage[] from the agent.stream call.

Screenshot 2026-01-12 at 4 41 13 PM

Signed-off-by: Peter Wielander <mittgfu@gmail.com>
…e[] from agent.stream
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@changeset-bot

changeset-botBot commented Jan 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 564c895

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
NameType
@workflow/aiPatch
@workflow/docs-typecheckPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercelBot commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production363011374
✅ 💻 Local Development33208340
✅ 📦 Local Production33208340
✅ 🐘 Local Postgres33208340
✅ 🪟 Windows340034
❌ 🌍 Community Worlds131170148
Total152417351576

❌ Failed Tests

🌍 Community Worlds (17 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (14 failed):

  • addTenWorkflow
  • addTenWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro3301
✅ example3301
✅ express3301
✅ fastify3301
✅ hono3301
✅ nextjs-turbopack3301
✅ nextjs-webpack3301
✅ nitro3301
✅ nuxt3301
✅ sveltekit3301
✅ vite3301
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack3400
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb3310
✅ redis-dev300
❌ redis3310
✅ starter-dev300
❌ starter20140
✅ turso-dev300
❌ turso3310

📋 View full workflow run

@github-actions

github-actionsBot commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.038s (+18.1% 🔺)1.014s (~)0.976s101.00x
🌐 RedisNext.js (Turbopack)0.040s (+13.1% 🔺)1.017s (~)0.977s101.05x
💻 LocalNext.js (Turbopack)0.044s (+10.3% 🔺)1.020s (~)0.976s101.16x
💻 LocalExpress0.045s (-6.5% 🟢)1.008s (~)0.963s101.18x
💻 LocalNitro0.046s (+10.5% 🔺)1.006s (~)0.960s101.22x
🌐 MongoDBNext.js (Turbopack)0.094s (-27.0% 🟢)1.018s (~)0.925s102.47x
🌐 TursoNext.js (Turbopack)0.105s (-2.2%)1.014s (~)0.910s102.76x
🐘 PostgresNext.js (Turbopack)0.118s (-2.7%)1.021s (~)0.902s103.13x
🐘 PostgresExpress0.263s (-29.3% 🟢)1.015s (~)0.751s106.95x
🐘 PostgresNitro0.288s (+12.0% 🔺)1.012s (-0.7%)0.724s107.60x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.558s (-27.3% 🟢)1.649s (-4.3%)1.090s101.00x
▲ VercelNext.js (Turbopack)0.576s (-24.9% 🟢)1.608s (-9.1% 🟢)1.032s101.03x
▲ VercelExpress0.613s (-20.9% 🟢)1.488s (-7.2% 🟢)0.875s101.10x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.095s (+2.2%)2.010s (~)0.915s101.00x
💻 LocalNext.js (Turbopack)1.099s (~)2.015s (~)0.916s101.00x
🌐 RedisNext.js (Turbopack)1.099s (+1.3%)2.013s (~)0.914s101.00x
💻 LocalNitro1.111s (~)2.005s (~)0.894s101.01x
💻 LocalExpress1.121s (+0.7%)2.007s (~)0.886s101.02x
🌐 TursoNext.js (Turbopack)1.301s (-0.8%)2.012s (~)0.712s101.19x
🌐 MongoDBNext.js (Turbopack)1.302s (+0.7%)2.014s (~)0.712s101.19x
🐘 PostgresNext.js (Turbopack)1.913s (~)2.018s (~)0.106s101.75x
🐘 PostgresNitro2.150s (-2.7%)3.014s (~)0.864s101.96x
🐘 PostgresExpress2.404s (+9.0% 🔺)3.015s (~)0.611s102.20x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.756s (-0.7%)3.785s (+3.4%)1.029s101.00x
▲ VercelNext.js (Turbopack)2.863s (+4.1%)3.705s (-2.6%)0.842s101.04x
▲ VercelExpress3.029s (+11.7% 🔺)3.765s (+4.1%)0.737s101.10x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.597s (+1.2%)11.011s (~)0.414s51.00x
🌐 RedisNext.js (Turbopack)10.650s (+0.9%)11.015s (~)0.365s51.01x
💻 LocalNext.js (Turbopack)10.707s (+0.7%)11.018s (~)0.312s51.01x
💻 LocalNitro10.767s (~)11.013s (~)0.245s51.02x
💻 LocalExpress10.823s (~)11.016s (~)0.193s51.02x
🌐 TursoNext.js (Turbopack)12.196s (~)13.027s (~)0.830s51.15x
🌐 MongoDBNext.js (Turbopack)12.230s (~)13.024s (~)0.794s51.15x
🐘 PostgresNext.js (Turbopack)15.435s (+4.5%)16.238s (+3.8%)0.803s51.46x
🐘 PostgresExpress20.229s (-0.6%)21.046s (~)0.817s51.91x
🐘 PostgresNitro20.375s (~)20.841s (-0.9%)0.466s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)24.300s (+8.1% 🔺)25.264s (+9.1% 🔺)0.964s51.00x
▲ VercelExpress24.381s (+6.0% 🔺)25.047s (+6.0% 🔺)0.665s51.00x
▲ VercelNitro25.309s (+15.5% 🔺)26.132s (+14.2% 🔺)0.822s51.04x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.352s (+3.6%)2.008s (~)0.656s151.00x
🌐 RedisNext.js (Turbopack)1.352s (+2.4%)2.010s (~)0.657s151.00x
💻 LocalNitro1.397s (-0.8%)2.004s (~)0.607s151.03x
💻 LocalNext.js (Turbopack)1.417s (+2.9%)2.012s (~)0.595s151.05x
💻 LocalExpress1.432s (+2.1%)2.007s (~)0.575s151.06x
🐘 PostgresNext.js (Turbopack)1.896s (+13.2% 🔺)2.039s (+1.3%)0.143s151.40x
🌐 MongoDBNext.js (Turbopack)2.134s (~)3.013s (~)0.879s101.58x
🌐 TursoNext.js (Turbopack)2.217s (~)3.013s (~)0.796s101.64x
🐘 PostgresNitro2.376s (-2.3%)3.011s (~)0.635s101.76x
🐘 PostgresExpress2.571s (+5.6% 🔺)3.013s (~)0.442s101.90x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.948s (-2.0%)3.782s (-2.4%)0.834s81.00x
▲ VercelExpress3.023s (+4.1%)3.784s (+2.6%)0.761s91.03x
▲ VercelNitro3.190s (+6.6% 🔺)4.888s (+29.2% 🔺)1.698s71.08x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.087s (-1.7%)2.924s (-1.3%)0.838s111.00x
💻 LocalNitro2.183s (-1.9%)3.148s (-0.7%)0.965s101.05x
💻 LocalExpress2.305s (+3.8%)3.258s (+3.1%)0.953s101.10x
🌐 RedisNext.js (Turbopack)2.481s (+6.0% 🔺)3.013s (~)0.532s101.19x
🌐 StarterNext.js (Turbopack)2.495s (+5.0% 🔺)3.010s (~)0.515s101.20x
🐘 PostgresNext.js (Turbopack)2.729s (+6.3% 🔺)3.017s (~)0.288s101.31x
🐘 PostgresNitro2.782s (-8.7% 🟢)3.021s (-20.1% 🟢)0.239s101.33x
🐘 PostgresExpress2.930s (+3.8%)3.015s (~)0.085s101.40x
🌐 TursoNext.js (Turbopack)4.654s (-0.8%)5.179s (~)0.524s62.23x
🌐 MongoDBNext.js (Turbopack)4.659s (+1.0%)5.187s (~)0.528s62.23x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.054s (+19.6% 🔺)4.907s (+22.2% 🔺)0.853s71.00x
▲ VercelNitro4.142s (+11.8% 🔺)5.039s (+16.1% 🔺)0.898s61.02x
▲ VercelExpress4.578s (+43.4% 🔺)5.341s (+48.4% 🔺)0.763s61.13x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.357s (+2.9%)2.010s (~)0.653s151.00x
🌐 StarterNext.js (Turbopack)1.364s (+3.7%)2.007s (~)0.643s151.01x
💻 LocalNext.js (Turbopack)1.413s (~)2.014s (~)0.601s151.04x
💻 LocalNitro1.418s (~)2.005s (~)0.586s151.05x
💻 LocalExpress1.449s (+1.9%)2.006s (~)0.558s151.07x
🐘 PostgresNext.js (Turbopack)1.511s (-13.9% 🟢)2.012s (~)0.501s151.11x
🐘 PostgresExpress1.656s (-15.6% 🟢)2.080s (-6.8% 🟢)0.424s151.22x
🐘 PostgresNitro1.901s (+7.3% 🔺)2.157s (+7.3% 🔺)0.257s141.40x
🌐 MongoDBNext.js (Turbopack)2.158s (~)3.014s (~)0.856s101.59x
🌐 TursoNext.js (Turbopack)2.208s (-0.5%)3.010s (~)0.802s101.63x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.813s (+0.9%)3.835s (+2.9%)1.022s81.00x
▲ VercelExpress2.979s (-5.2% 🟢)3.725s (-4.1%)0.746s91.06x
▲ VercelNext.js (Turbopack)2.987s (+6.2% 🔺)3.907s (+2.1%)0.920s81.06x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.305s (+7.1% 🔺)3.261s (+7.0% 🔺)0.956s101.00x
💻 LocalNitro2.311s (+4.8%)3.219s (+1.9%)0.909s101.00x
💻 LocalExpress2.478s (+9.6% 🔺)3.304s (+2.4%)0.827s101.07x
🌐 StarterNext.js (Turbopack)2.484s (+4.7%)3.009s (~)0.525s101.08x
🌐 RedisNext.js (Turbopack)2.489s (+5.4% 🔺)3.044s (+1.1%)0.555s101.08x
🐘 PostgresNext.js (Turbopack)2.578s (~)3.027s (~)0.449s101.12x
🐘 PostgresNitro2.638s (-7.6% 🟢)3.011s (-3.7%)0.373s101.14x
🐘 PostgresExpress2.871s (+5.1% 🔺)3.123s (+3.5%)0.252s101.25x
🌐 MongoDBNext.js (Turbopack)4.674s (+0.7%)5.180s (~)0.506s62.03x
🌐 TursoNext.js (Turbopack)4.716s (+2.0%)5.181s (~)0.465s62.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.479s (+32.0% 🔺)4.954s (+20.1% 🔺)0.475s71.00x
▲ VercelNext.js (Turbopack)4.515s (+43.2% 🔺)5.114s (+30.5% 🔺)0.599s61.01x
▲ VercelNitro4.876s (+53.7% 🔺)5.665s (+47.8% 🔺)0.789s61.09x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.133s (+42.0% 🔺)1.006s (~)0.000s (+100.0% 🔺)1.013s (~)0.881s101.00x
🌐 RedisNext.js (Turbopack)0.139s (+19.9% 🔺)1.004s (~)0.000s (+Infinity% 🔺)1.013s (~)0.874s101.05x
💻 LocalNext.js (Turbopack)0.146s (+5.5% 🔺)1.003s (~)0.020s (+22.4% 🔺)1.031s (~)0.885s101.10x
💻 LocalNitro0.170s (-4.0%)0.992s (~)0.016s (+5.4% 🔺)1.021s (~)0.851s101.28x
💻 LocalExpress0.185s (+6.6% 🔺)0.992s (~)0.018s (+12.0% 🔺)1.026s (~)0.840s101.40x
🌐 TursoNext.js (Turbopack)0.456s (-8.1% 🟢)0.997s (+4.9%)0.000s (+Infinity% 🔺)1.014s (~)0.558s103.44x
🌐 MongoDBNext.js (Turbopack)0.508s (-2.4%)0.941s (+1.7%)0.000s (NaN%)1.013s (~)0.505s103.83x
🐘 PostgresNext.js (Turbopack)1.273s (+46.9% 🔺)1.904s (+69.0% 🔺)0.000s (~)2.019s (+52.9% 🔺)0.746s109.60x
🐘 PostgresNitro2.280s (+3.7%)2.756s (-3.1%)0.000s (-100.0% 🟢)3.014s (~)0.734s1017.20x
🐘 PostgresExpress2.436s (+3.0%)2.610s (-2.6%)0.000s (+Infinity% 🔺)3.017s (~)0.581s1018.37x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.857s (-5.4% 🟢)3.269s (-3.8%)0.961s (+58.8% 🔺)4.710s (+4.4%)1.853s101.00x
▲ VercelNitro2.863s (-4.9%)3.263s (-2.6%)0.418s (-12.0% 🟢)4.190s (-2.4%)1.327s101.00x
▲ VercelExpress2.893s (-7.1% 🟢)3.270s (-3.7%)0.425s (-15.1% 🟢)4.164s (-7.2% 🟢)1.271s101.01x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)7/8
🐘 PostgresNext.js (Turbopack)8/8
▲ VercelNext.js (Turbopack)4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter5/8
Nitro💻 Local8/8
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@pranaygp

Copy link
Copy Markdown
Contributor

should this use the experimental_ convention from AI sdk? I'm just worried about the API diverge between us and AI sdk but maybe I shouldn't be?

@VaguelySerious

Copy link
Copy Markdown
MemberAuthor

I'm just worried about the API diverge between us and AI sdk but maybe I shouldn't be?

@pranaygp Since we're only adding optional properties to existing interfaces, I'm less worried, since the property simply doesn't exist in AI SDK, and this is specifically only relevant for DurableAgent (since AI SDK has .toUIMessageStream({onFinish: (messages) => >...}) which DurableAgent hides

@VaguelySerious

Copy link
Copy Markdown
MemberAuthor

Merging since it was in review for two days

@VaguelySerious
VaguelySerious merged commit 49bb48a into mainJan 14, 2026
90 checks passed
@VaguelySerious
VaguelySerious deleted the peter/ui-message-return-v2 branch January 14, 2026 12:17
VaguelySerious added a commit that referenced this pull request Jan 16, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@VaguelySerious@pranaygp
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

[ai] Add collectUIMessages option to accumulate and return UIMessage[] from agent.stream - #768

Merged
VaguelySerious merged 4 commits into
mainfrom
peter/ui-message-return-v2
Jan 14, 2026
Merged

[ai] Add collectUIMessages option to accumulate and return UIMessage[] from agent.stream#768
VaguelySerious merged 4 commits into
mainfrom
peter/ui-message-return-v2

Conversation

@VaguelySerious

@VaguelySeriousVaguelySerious commented Jan 12, 2026

Copy link
Copy Markdown
Member

Related to #688 and #739

This adds a new option collectUIMessages to agent.stream, which, if passed, adds a stream transformation for accumulating stream chunks in durable state, and will return uiMessages: UIMessage[] from the agent.stream call.

Screenshot 2026-01-12 at 4 41 13 PM

Signed-off-by: Peter Wielander <mittgfu@gmail.com>
…e[] from agent.stream
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@changeset-bot

changeset-botBot commented Jan 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 564c895

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
NameType
@workflow/aiPatch
@workflow/docs-typecheckPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercelBot commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production363011374
✅ 💻 Local Development33208340
✅ 📦 Local Production33208340
✅ 🐘 Local Postgres33208340
✅ 🪟 Windows340034
❌ 🌍 Community Worlds131170148
Total152417351576

❌ Failed Tests

🌍 Community Worlds (17 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (14 failed):

  • addTenWorkflow
  • addTenWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro3301
✅ example3301
✅ express3301
✅ fastify3301
✅ hono3301
✅ nextjs-turbopack3301
✅ nextjs-webpack3301
✅ nitro3301
✅ nuxt3301
✅ sveltekit3301
✅ vite3301
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack3400
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb3310
✅ redis-dev300
❌ redis3310
✅ starter-dev300
❌ starter20140
✅ turso-dev300
❌ turso3310

📋 View full workflow run

@github-actions

github-actionsBot commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.038s (+18.1% 🔺)1.014s (~)0.976s101.00x
🌐 RedisNext.js (Turbopack)0.040s (+13.1% 🔺)1.017s (~)0.977s101.05x
💻 LocalNext.js (Turbopack)0.044s (+10.3% 🔺)1.020s (~)0.976s101.16x
💻 LocalExpress0.045s (-6.5% 🟢)1.008s (~)0.963s101.18x
💻 LocalNitro0.046s (+10.5% 🔺)1.006s (~)0.960s101.22x
🌐 MongoDBNext.js (Turbopack)0.094s (-27.0% 🟢)1.018s (~)0.925s102.47x
🌐 TursoNext.js (Turbopack)0.105s (-2.2%)1.014s (~)0.910s102.76x
🐘 PostgresNext.js (Turbopack)0.118s (-2.7%)1.021s (~)0.902s103.13x
🐘 PostgresExpress0.263s (-29.3% 🟢)1.015s (~)0.751s106.95x
🐘 PostgresNitro0.288s (+12.0% 🔺)1.012s (-0.7%)0.724s107.60x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.558s (-27.3% 🟢)1.649s (-4.3%)1.090s101.00x
▲ VercelNext.js (Turbopack)0.576s (-24.9% 🟢)1.608s (-9.1% 🟢)1.032s101.03x
▲ VercelExpress0.613s (-20.9% 🟢)1.488s (-7.2% 🟢)0.875s101.10x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.095s (+2.2%)2.010s (~)0.915s101.00x
💻 LocalNext.js (Turbopack)1.099s (~)2.015s (~)0.916s101.00x
🌐 RedisNext.js (Turbopack)1.099s (+1.3%)2.013s (~)0.914s101.00x
💻 LocalNitro1.111s (~)2.005s (~)0.894s101.01x
💻 LocalExpress1.121s (+0.7%)2.007s (~)0.886s101.02x
🌐 TursoNext.js (Turbopack)1.301s (-0.8%)2.012s (~)0.712s101.19x
🌐 MongoDBNext.js (Turbopack)1.302s (+0.7%)2.014s (~)0.712s101.19x
🐘 PostgresNext.js (Turbopack)1.913s (~)2.018s (~)0.106s101.75x
🐘 PostgresNitro2.150s (-2.7%)3.014s (~)0.864s101.96x
🐘 PostgresExpress2.404s (+9.0% 🔺)3.015s (~)0.611s102.20x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.756s (-0.7%)3.785s (+3.4%)1.029s101.00x
▲ VercelNext.js (Turbopack)2.863s (+4.1%)3.705s (-2.6%)0.842s101.04x
▲ VercelExpress3.029s (+11.7% 🔺)3.765s (+4.1%)0.737s101.10x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.597s (+1.2%)11.011s (~)0.414s51.00x
🌐 RedisNext.js (Turbopack)10.650s (+0.9%)11.015s (~)0.365s51.01x
💻 LocalNext.js (Turbopack)10.707s (+0.7%)11.018s (~)0.312s51.01x
💻 LocalNitro10.767s (~)11.013s (~)0.245s51.02x
💻 LocalExpress10.823s (~)11.016s (~)0.193s51.02x
🌐 TursoNext.js (Turbopack)12.196s (~)13.027s (~)0.830s51.15x
🌐 MongoDBNext.js (Turbopack)12.230s (~)13.024s (~)0.794s51.15x
🐘 PostgresNext.js (Turbopack)15.435s (+4.5%)16.238s (+3.8%)0.803s51.46x
🐘 PostgresExpress20.229s (-0.6%)21.046s (~)0.817s51.91x
🐘 PostgresNitro20.375s (~)20.841s (-0.9%)0.466s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)24.300s (+8.1% 🔺)25.264s (+9.1% 🔺)0.964s51.00x
▲ VercelExpress24.381s (+6.0% 🔺)25.047s (+6.0% 🔺)0.665s51.00x
▲ VercelNitro25.309s (+15.5% 🔺)26.132s (+14.2% 🔺)0.822s51.04x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.352s (+3.6%)2.008s (~)0.656s151.00x
🌐 RedisNext.js (Turbopack)1.352s (+2.4%)2.010s (~)0.657s151.00x
💻 LocalNitro1.397s (-0.8%)2.004s (~)0.607s151.03x
💻 LocalNext.js (Turbopack)1.417s (+2.9%)2.012s (~)0.595s151.05x
💻 LocalExpress1.432s (+2.1%)2.007s (~)0.575s151.06x
🐘 PostgresNext.js (Turbopack)1.896s (+13.2% 🔺)2.039s (+1.3%)0.143s151.40x
🌐 MongoDBNext.js (Turbopack)2.134s (~)3.013s (~)0.879s101.58x
🌐 TursoNext.js (Turbopack)2.217s (~)3.013s (~)0.796s101.64x
🐘 PostgresNitro2.376s (-2.3%)3.011s (~)0.635s101.76x
🐘 PostgresExpress2.571s (+5.6% 🔺)3.013s (~)0.442s101.90x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.948s (-2.0%)3.782s (-2.4%)0.834s81.00x
▲ VercelExpress3.023s (+4.1%)3.784s (+2.6%)0.761s91.03x
▲ VercelNitro3.190s (+6.6% 🔺)4.888s (+29.2% 🔺)1.698s71.08x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.087s (-1.7%)2.924s (-1.3%)0.838s111.00x
💻 LocalNitro2.183s (-1.9%)3.148s (-0.7%)0.965s101.05x
💻 LocalExpress2.305s (+3.8%)3.258s (+3.1%)0.953s101.10x
🌐 RedisNext.js (Turbopack)2.481s (+6.0% 🔺)3.013s (~)0.532s101.19x
🌐 StarterNext.js (Turbopack)2.495s (+5.0% 🔺)3.010s (~)0.515s101.20x
🐘 PostgresNext.js (Turbopack)2.729s (+6.3% 🔺)3.017s (~)0.288s101.31x
🐘 PostgresNitro2.782s (-8.7% 🟢)3.021s (-20.1% 🟢)0.239s101.33x
🐘 PostgresExpress2.930s (+3.8%)3.015s (~)0.085s101.40x
🌐 TursoNext.js (Turbopack)4.654s (-0.8%)5.179s (~)0.524s62.23x
🌐 MongoDBNext.js (Turbopack)4.659s (+1.0%)5.187s (~)0.528s62.23x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.054s (+19.6% 🔺)4.907s (+22.2% 🔺)0.853s71.00x
▲ VercelNitro4.142s (+11.8% 🔺)5.039s (+16.1% 🔺)0.898s61.02x
▲ VercelExpress4.578s (+43.4% 🔺)5.341s (+48.4% 🔺)0.763s61.13x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.357s (+2.9%)2.010s (~)0.653s151.00x
🌐 StarterNext.js (Turbopack)1.364s (+3.7%)2.007s (~)0.643s151.01x
💻 LocalNext.js (Turbopack)1.413s (~)2.014s (~)0.601s151.04x
💻 LocalNitro1.418s (~)2.005s (~)0.586s151.05x
💻 LocalExpress1.449s (+1.9%)2.006s (~)0.558s151.07x
🐘 PostgresNext.js (Turbopack)1.511s (-13.9% 🟢)2.012s (~)0.501s151.11x
🐘 PostgresExpress1.656s (-15.6% 🟢)2.080s (-6.8% 🟢)0.424s151.22x
🐘 PostgresNitro1.901s (+7.3% 🔺)2.157s (+7.3% 🔺)0.257s141.40x
🌐 MongoDBNext.js (Turbopack)2.158s (~)3.014s (~)0.856s101.59x
🌐 TursoNext.js (Turbopack)2.208s (-0.5%)3.010s (~)0.802s101.63x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.813s (+0.9%)3.835s (+2.9%)1.022s81.00x
▲ VercelExpress2.979s (-5.2% 🟢)3.725s (-4.1%)0.746s91.06x
▲ VercelNext.js (Turbopack)2.987s (+6.2% 🔺)3.907s (+2.1%)0.920s81.06x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.305s (+7.1% 🔺)3.261s (+7.0% 🔺)0.956s101.00x
💻 LocalNitro2.311s (+4.8%)3.219s (+1.9%)0.909s101.00x
💻 LocalExpress2.478s (+9.6% 🔺)3.304s (+2.4%)0.827s101.07x
🌐 StarterNext.js (Turbopack)2.484s (+4.7%)3.009s (~)0.525s101.08x
🌐 RedisNext.js (Turbopack)2.489s (+5.4% 🔺)3.044s (+1.1%)0.555s101.08x
🐘 PostgresNext.js (Turbopack)2.578s (~)3.027s (~)0.449s101.12x
🐘 PostgresNitro2.638s (-7.6% 🟢)3.011s (-3.7%)0.373s101.14x
🐘 PostgresExpress2.871s (+5.1% 🔺)3.123s (+3.5%)0.252s101.25x
🌐 MongoDBNext.js (Turbopack)4.674s (+0.7%)5.180s (~)0.506s62.03x
🌐 TursoNext.js (Turbopack)4.716s (+2.0%)5.181s (~)0.465s62.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.479s (+32.0% 🔺)4.954s (+20.1% 🔺)0.475s71.00x
▲ VercelNext.js (Turbopack)4.515s (+43.2% 🔺)5.114s (+30.5% 🔺)0.599s61.01x
▲ VercelNitro4.876s (+53.7% 🔺)5.665s (+47.8% 🔺)0.789s61.09x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.133s (+42.0% 🔺)1.006s (~)0.000s (+100.0% 🔺)1.013s (~)0.881s101.00x
🌐 RedisNext.js (Turbopack)0.139s (+19.9% 🔺)1.004s (~)0.000s (+Infinity% 🔺)1.013s (~)0.874s101.05x
💻 LocalNext.js (Turbopack)0.146s (+5.5% 🔺)1.003s (~)0.020s (+22.4% 🔺)1.031s (~)0.885s101.10x
💻 LocalNitro0.170s (-4.0%)0.992s (~)0.016s (+5.4% 🔺)1.021s (~)0.851s101.28x
💻 LocalExpress0.185s (+6.6% 🔺)0.992s (~)0.018s (+12.0% 🔺)1.026s (~)0.840s101.40x
🌐 TursoNext.js (Turbopack)0.456s (-8.1% 🟢)0.997s (+4.9%)0.000s (+Infinity% 🔺)1.014s (~)0.558s103.44x
🌐 MongoDBNext.js (Turbopack)0.508s (-2.4%)0.941s (+1.7%)0.000s (NaN%)1.013s (~)0.505s103.83x
🐘 PostgresNext.js (Turbopack)1.273s (+46.9% 🔺)1.904s (+69.0% 🔺)0.000s (~)2.019s (+52.9% 🔺)0.746s109.60x
🐘 PostgresNitro2.280s (+3.7%)2.756s (-3.1%)0.000s (-100.0% 🟢)3.014s (~)0.734s1017.20x
🐘 PostgresExpress2.436s (+3.0%)2.610s (-2.6%)0.000s (+Infinity% 🔺)3.017s (~)0.581s1018.37x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.857s (-5.4% 🟢)3.269s (-3.8%)0.961s (+58.8% 🔺)4.710s (+4.4%)1.853s101.00x
▲ VercelNitro2.863s (-4.9%)3.263s (-2.6%)0.418s (-12.0% 🟢)4.190s (-2.4%)1.327s101.00x
▲ VercelExpress2.893s (-7.1% 🟢)3.270s (-3.7%)0.425s (-15.1% 🟢)4.164s (-7.2% 🟢)1.271s101.01x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)7/8
🐘 PostgresNext.js (Turbopack)8/8
▲ VercelNext.js (Turbopack)4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter5/8
Nitro💻 Local8/8
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@pranaygp

Copy link
Copy Markdown
Contributor

should this use the experimental_ convention from AI sdk? I'm just worried about the API diverge between us and AI sdk but maybe I shouldn't be?

@VaguelySerious

Copy link
Copy Markdown
MemberAuthor

I'm just worried about the API diverge between us and AI sdk but maybe I shouldn't be?

@pranaygp Since we're only adding optional properties to existing interfaces, I'm less worried, since the property simply doesn't exist in AI SDK, and this is specifically only relevant for DurableAgent (since AI SDK has .toUIMessageStream({onFinish: (messages) => >...}) which DurableAgent hides

@VaguelySerious

Copy link
Copy Markdown
MemberAuthor

Merging since it was in review for two days

@VaguelySerious
VaguelySerious merged commit 49bb48a into mainJan 14, 2026
90 checks passed
@VaguelySerious
VaguelySerious deleted the peter/ui-message-return-v2 branch January 14, 2026 12:17
VaguelySerious added a commit that referenced this pull request Jan 16, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@VaguelySerious@pranaygp
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[ai] Add collectUIMessages option to accumulate and return UIMessage[] from agent.stream - #768

Merged
VaguelySerious merged 4 commits into
mainfrom
peter/ui-message-return-v2
Jan 14, 2026
Merged

[ai] Add collectUIMessages option to accumulate and return UIMessage[] from agent.stream#768
VaguelySerious merged 4 commits into
mainfrom
peter/ui-message-return-v2

Conversation

@VaguelySerious

@VaguelySeriousVaguelySerious commented Jan 12, 2026

Copy link
Copy Markdown
Member

Related to #688 and #739

This adds a new option collectUIMessages to agent.stream, which, if passed, adds a stream transformation for accumulating stream chunks in durable state, and will return uiMessages: UIMessage[] from the agent.stream call.

Screenshot 2026-01-12 at 4 41 13 PM

Signed-off-by: Peter Wielander <mittgfu@gmail.com>
…e[] from agent.stream
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@changeset-bot

changeset-botBot commented Jan 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 564c895

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
NameType
@workflow/aiPatch
@workflow/docs-typecheckPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercelBot commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production363011374
✅ 💻 Local Development33208340
✅ 📦 Local Production33208340
✅ 🐘 Local Postgres33208340
✅ 🪟 Windows340034
❌ 🌍 Community Worlds131170148
Total152417351576

❌ Failed Tests

🌍 Community Worlds (17 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (14 failed):

  • addTenWorkflow
  • addTenWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro3301
✅ example3301
✅ express3301
✅ fastify3301
✅ hono3301
✅ nextjs-turbopack3301
✅ nextjs-webpack3301
✅ nitro3301
✅ nuxt3301
✅ sveltekit3301
✅ vite3301
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack3400
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb3310
✅ redis-dev300
❌ redis3310
✅ starter-dev300
❌ starter20140
✅ turso-dev300
❌ turso3310

📋 View full workflow run

@github-actions

github-actionsBot commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.038s (+18.1% 🔺)1.014s (~)0.976s101.00x
🌐 RedisNext.js (Turbopack)0.040s (+13.1% 🔺)1.017s (~)0.977s101.05x
💻 LocalNext.js (Turbopack)0.044s (+10.3% 🔺)1.020s (~)0.976s101.16x
💻 LocalExpress0.045s (-6.5% 🟢)1.008s (~)0.963s101.18x
💻 LocalNitro0.046s (+10.5% 🔺)1.006s (~)0.960s101.22x
🌐 MongoDBNext.js (Turbopack)0.094s (-27.0% 🟢)1.018s (~)0.925s102.47x
🌐 TursoNext.js (Turbopack)0.105s (-2.2%)1.014s (~)0.910s102.76x
🐘 PostgresNext.js (Turbopack)0.118s (-2.7%)1.021s (~)0.902s103.13x
🐘 PostgresExpress0.263s (-29.3% 🟢)1.015s (~)0.751s106.95x
🐘 PostgresNitro0.288s (+12.0% 🔺)1.012s (-0.7%)0.724s107.60x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.558s (-27.3% 🟢)1.649s (-4.3%)1.090s101.00x
▲ VercelNext.js (Turbopack)0.576s (-24.9% 🟢)1.608s (-9.1% 🟢)1.032s101.03x
▲ VercelExpress0.613s (-20.9% 🟢)1.488s (-7.2% 🟢)0.875s101.10x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.095s (+2.2%)2.010s (~)0.915s101.00x
💻 LocalNext.js (Turbopack)1.099s (~)2.015s (~)0.916s101.00x
🌐 RedisNext.js (Turbopack)1.099s (+1.3%)2.013s (~)0.914s101.00x
💻 LocalNitro1.111s (~)2.005s (~)0.894s101.01x
💻 LocalExpress1.121s (+0.7%)2.007s (~)0.886s101.02x
🌐 TursoNext.js (Turbopack)1.301s (-0.8%)2.012s (~)0.712s101.19x
🌐 MongoDBNext.js (Turbopack)1.302s (+0.7%)2.014s (~)0.712s101.19x
🐘 PostgresNext.js (Turbopack)1.913s (~)2.018s (~)0.106s101.75x
🐘 PostgresNitro2.150s (-2.7%)3.014s (~)0.864s101.96x
🐘 PostgresExpress2.404s (+9.0% 🔺)3.015s (~)0.611s102.20x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.756s (-0.7%)3.785s (+3.4%)1.029s101.00x
▲ VercelNext.js (Turbopack)2.863s (+4.1%)3.705s (-2.6%)0.842s101.04x
▲ VercelExpress3.029s (+11.7% 🔺)3.765s (+4.1%)0.737s101.10x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.597s (+1.2%)11.011s (~)0.414s51.00x
🌐 RedisNext.js (Turbopack)10.650s (+0.9%)11.015s (~)0.365s51.01x
💻 LocalNext.js (Turbopack)10.707s (+0.7%)11.018s (~)0.312s51.01x
💻 LocalNitro10.767s (~)11.013s (~)0.245s51.02x
💻 LocalExpress10.823s (~)11.016s (~)0.193s51.02x
🌐 TursoNext.js (Turbopack)12.196s (~)13.027s (~)0.830s51.15x
🌐 MongoDBNext.js (Turbopack)12.230s (~)13.024s (~)0.794s51.15x
🐘 PostgresNext.js (Turbopack)15.435s (+4.5%)16.238s (+3.8%)0.803s51.46x
🐘 PostgresExpress20.229s (-0.6%)21.046s (~)0.817s51.91x
🐘 PostgresNitro20.375s (~)20.841s (-0.9%)0.466s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)24.300s (+8.1% 🔺)25.264s (+9.1% 🔺)0.964s51.00x
▲ VercelExpress24.381s (+6.0% 🔺)25.047s (+6.0% 🔺)0.665s51.00x
▲ VercelNitro25.309s (+15.5% 🔺)26.132s (+14.2% 🔺)0.822s51.04x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.352s (+3.6%)2.008s (~)0.656s151.00x
🌐 RedisNext.js (Turbopack)1.352s (+2.4%)2.010s (~)0.657s151.00x
💻 LocalNitro1.397s (-0.8%)2.004s (~)0.607s151.03x
💻 LocalNext.js (Turbopack)1.417s (+2.9%)2.012s (~)0.595s151.05x
💻 LocalExpress1.432s (+2.1%)2.007s (~)0.575s151.06x
🐘 PostgresNext.js (Turbopack)1.896s (+13.2% 🔺)2.039s (+1.3%)0.143s151.40x
🌐 MongoDBNext.js (Turbopack)2.134s (~)3.013s (~)0.879s101.58x
🌐 TursoNext.js (Turbopack)2.217s (~)3.013s (~)0.796s101.64x
🐘 PostgresNitro2.376s (-2.3%)3.011s (~)0.635s101.76x
🐘 PostgresExpress2.571s (+5.6% 🔺)3.013s (~)0.442s101.90x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.948s (-2.0%)3.782s (-2.4%)0.834s81.00x
▲ VercelExpress3.023s (+4.1%)3.784s (+2.6%)0.761s91.03x
▲ VercelNitro3.190s (+6.6% 🔺)4.888s (+29.2% 🔺)1.698s71.08x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.087s (-1.7%)2.924s (-1.3%)0.838s111.00x
💻 LocalNitro2.183s (-1.9%)3.148s (-0.7%)0.965s101.05x
💻 LocalExpress2.305s (+3.8%)3.258s (+3.1%)0.953s101.10x
🌐 RedisNext.js (Turbopack)2.481s (+6.0% 🔺)3.013s (~)0.532s101.19x
🌐 StarterNext.js (Turbopack)2.495s (+5.0% 🔺)3.010s (~)0.515s101.20x
🐘 PostgresNext.js (Turbopack)2.729s (+6.3% 🔺)3.017s (~)0.288s101.31x
🐘 PostgresNitro2.782s (-8.7% 🟢)3.021s (-20.1% 🟢)0.239s101.33x
🐘 PostgresExpress2.930s (+3.8%)3.015s (~)0.085s101.40x
🌐 TursoNext.js (Turbopack)4.654s (-0.8%)5.179s (~)0.524s62.23x
🌐 MongoDBNext.js (Turbopack)4.659s (+1.0%)5.187s (~)0.528s62.23x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.054s (+19.6% 🔺)4.907s (+22.2% 🔺)0.853s71.00x
▲ VercelNitro4.142s (+11.8% 🔺)5.039s (+16.1% 🔺)0.898s61.02x
▲ VercelExpress4.578s (+43.4% 🔺)5.341s (+48.4% 🔺)0.763s61.13x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.357s (+2.9%)2.010s (~)0.653s151.00x
🌐 StarterNext.js (Turbopack)1.364s (+3.7%)2.007s (~)0.643s151.01x
💻 LocalNext.js (Turbopack)1.413s (~)2.014s (~)0.601s151.04x
💻 LocalNitro1.418s (~)2.005s (~)0.586s151.05x
💻 LocalExpress1.449s (+1.9%)2.006s (~)0.558s151.07x
🐘 PostgresNext.js (Turbopack)1.511s (-13.9% 🟢)2.012s (~)0.501s151.11x
🐘 PostgresExpress1.656s (-15.6% 🟢)2.080s (-6.8% 🟢)0.424s151.22x
🐘 PostgresNitro1.901s (+7.3% 🔺)2.157s (+7.3% 🔺)0.257s141.40x
🌐 MongoDBNext.js (Turbopack)2.158s (~)3.014s (~)0.856s101.59x
🌐 TursoNext.js (Turbopack)2.208s (-0.5%)3.010s (~)0.802s101.63x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.813s (+0.9%)3.835s (+2.9%)1.022s81.00x
▲ VercelExpress2.979s (-5.2% 🟢)3.725s (-4.1%)0.746s91.06x
▲ VercelNext.js (Turbopack)2.987s (+6.2% 🔺)3.907s (+2.1%)0.920s81.06x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.305s (+7.1% 🔺)3.261s (+7.0% 🔺)0.956s101.00x
💻 LocalNitro2.311s (+4.8%)3.219s (+1.9%)0.909s101.00x
💻 LocalExpress2.478s (+9.6% 🔺)3.304s (+2.4%)0.827s101.07x
🌐 StarterNext.js (Turbopack)2.484s (+4.7%)3.009s (~)0.525s101.08x
🌐 RedisNext.js (Turbopack)2.489s (+5.4% 🔺)3.044s (+1.1%)0.555s101.08x
🐘 PostgresNext.js (Turbopack)2.578s (~)3.027s (~)0.449s101.12x
🐘 PostgresNitro2.638s (-7.6% 🟢)3.011s (-3.7%)0.373s101.14x
🐘 PostgresExpress2.871s (+5.1% 🔺)3.123s (+3.5%)0.252s101.25x
🌐 MongoDBNext.js (Turbopack)4.674s (+0.7%)5.180s (~)0.506s62.03x
🌐 TursoNext.js (Turbopack)4.716s (+2.0%)5.181s (~)0.465s62.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.479s (+32.0% 🔺)4.954s (+20.1% 🔺)0.475s71.00x
▲ VercelNext.js (Turbopack)4.515s (+43.2% 🔺)5.114s (+30.5% 🔺)0.599s61.01x
▲ VercelNitro4.876s (+53.7% 🔺)5.665s (+47.8% 🔺)0.789s61.09x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.133s (+42.0% 🔺)1.006s (~)0.000s (+100.0% 🔺)1.013s (~)0.881s101.00x
🌐 RedisNext.js (Turbopack)0.139s (+19.9% 🔺)1.004s (~)0.000s (+Infinity% 🔺)1.013s (~)0.874s101.05x
💻 LocalNext.js (Turbopack)0.146s (+5.5% 🔺)1.003s (~)0.020s (+22.4% 🔺)1.031s (~)0.885s101.10x
💻 LocalNitro0.170s (-4.0%)0.992s (~)0.016s (+5.4% 🔺)1.021s (~)0.851s101.28x
💻 LocalExpress0.185s (+6.6% 🔺)0.992s (~)0.018s (+12.0% 🔺)1.026s (~)0.840s101.40x
🌐 TursoNext.js (Turbopack)0.456s (-8.1% 🟢)0.997s (+4.9%)0.000s (+Infinity% 🔺)1.014s (~)0.558s103.44x
🌐 MongoDBNext.js (Turbopack)0.508s (-2.4%)0.941s (+1.7%)0.000s (NaN%)1.013s (~)0.505s103.83x
🐘 PostgresNext.js (Turbopack)1.273s (+46.9% 🔺)1.904s (+69.0% 🔺)0.000s (~)2.019s (+52.9% 🔺)0.746s109.60x
🐘 PostgresNitro2.280s (+3.7%)2.756s (-3.1%)0.000s (-100.0% 🟢)3.014s (~)0.734s1017.20x
🐘 PostgresExpress2.436s (+3.0%)2.610s (-2.6%)0.000s (+Infinity% 🔺)3.017s (~)0.581s1018.37x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.857s (-5.4% 🟢)3.269s (-3.8%)0.961s (+58.8% 🔺)4.710s (+4.4%)1.853s101.00x
▲ VercelNitro2.863s (-4.9%)3.263s (-2.6%)0.418s (-12.0% 🟢)4.190s (-2.4%)1.327s101.00x
▲ VercelExpress2.893s (-7.1% 🟢)3.270s (-3.7%)0.425s (-15.1% 🟢)4.164s (-7.2% 🟢)1.271s101.01x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)7/8
🐘 PostgresNext.js (Turbopack)8/8
▲ VercelNext.js (Turbopack)4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter5/8
Nitro💻 Local8/8
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@pranaygp

Copy link
Copy Markdown
Contributor

should this use the experimental_ convention from AI sdk? I'm just worried about the API diverge between us and AI sdk but maybe I shouldn't be?

@VaguelySerious

Copy link
Copy Markdown
MemberAuthor

I'm just worried about the API diverge between us and AI sdk but maybe I shouldn't be?

@pranaygp Since we're only adding optional properties to existing interfaces, I'm less worried, since the property simply doesn't exist in AI SDK, and this is specifically only relevant for DurableAgent (since AI SDK has .toUIMessageStream({onFinish: (messages) => >...}) which DurableAgent hides

@VaguelySerious

Copy link
Copy Markdown
MemberAuthor

Merging since it was in review for two days

@VaguelySerious
VaguelySerious merged commit 49bb48a into mainJan 14, 2026
90 checks passed
@VaguelySerious
VaguelySerious deleted the peter/ui-message-return-v2 branch January 14, 2026 12:17
VaguelySerious added a commit that referenced this pull request Jan 16, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@VaguelySerious@pranaygp
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[ai] Add collectUIMessages option to accumulate and return UIMessage[] from agent.stream - #768

Merged
VaguelySerious merged 4 commits into
mainfrom
peter/ui-message-return-v2
Jan 14, 2026
Merged

[ai] Add collectUIMessages option to accumulate and return UIMessage[] from agent.stream#768
VaguelySerious merged 4 commits into
mainfrom
peter/ui-message-return-v2

Conversation

@VaguelySerious

@VaguelySeriousVaguelySerious commented Jan 12, 2026

Copy link
Copy Markdown
Member

Related to #688 and #739

This adds a new option collectUIMessages to agent.stream, which, if passed, adds a stream transformation for accumulating stream chunks in durable state, and will return uiMessages: UIMessage[] from the agent.stream call.

Screenshot 2026-01-12 at 4 41 13 PM

Signed-off-by: Peter Wielander <mittgfu@gmail.com>
…e[] from agent.stream
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@changeset-bot

changeset-botBot commented Jan 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 564c895

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
NameType
@workflow/aiPatch
@workflow/docs-typecheckPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercelBot commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production363011374
✅ 💻 Local Development33208340
✅ 📦 Local Production33208340
✅ 🐘 Local Postgres33208340
✅ 🪟 Windows340034
❌ 🌍 Community Worlds131170148
Total152417351576

❌ Failed Tests

🌍 Community Worlds (17 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (14 failed):

  • addTenWorkflow
  • addTenWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro3301
✅ example3301
✅ express3301
✅ fastify3301
✅ hono3301
✅ nextjs-turbopack3301
✅ nextjs-webpack3301
✅ nitro3301
✅ nuxt3301
✅ sveltekit3301
✅ vite3301
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack3400
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb3310
✅ redis-dev300
❌ redis3310
✅ starter-dev300
❌ starter20140
✅ turso-dev300
❌ turso3310

📋 View full workflow run

@github-actions

github-actionsBot commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.038s (+18.1% 🔺)1.014s (~)0.976s101.00x
🌐 RedisNext.js (Turbopack)0.040s (+13.1% 🔺)1.017s (~)0.977s101.05x
💻 LocalNext.js (Turbopack)0.044s (+10.3% 🔺)1.020s (~)0.976s101.16x
💻 LocalExpress0.045s (-6.5% 🟢)1.008s (~)0.963s101.18x
💻 LocalNitro0.046s (+10.5% 🔺)1.006s (~)0.960s101.22x
🌐 MongoDBNext.js (Turbopack)0.094s (-27.0% 🟢)1.018s (~)0.925s102.47x
🌐 TursoNext.js (Turbopack)0.105s (-2.2%)1.014s (~)0.910s102.76x
🐘 PostgresNext.js (Turbopack)0.118s (-2.7%)1.021s (~)0.902s103.13x
🐘 PostgresExpress0.263s (-29.3% 🟢)1.015s (~)0.751s106.95x
🐘 PostgresNitro0.288s (+12.0% 🔺)1.012s (-0.7%)0.724s107.60x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.558s (-27.3% 🟢)1.649s (-4.3%)1.090s101.00x
▲ VercelNext.js (Turbopack)0.576s (-24.9% 🟢)1.608s (-9.1% 🟢)1.032s101.03x
▲ VercelExpress0.613s (-20.9% 🟢)1.488s (-7.2% 🟢)0.875s101.10x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.095s (+2.2%)2.010s (~)0.915s101.00x
💻 LocalNext.js (Turbopack)1.099s (~)2.015s (~)0.916s101.00x
🌐 RedisNext.js (Turbopack)1.099s (+1.3%)2.013s (~)0.914s101.00x
💻 LocalNitro1.111s (~)2.005s (~)0.894s101.01x
💻 LocalExpress1.121s (+0.7%)2.007s (~)0.886s101.02x
🌐 TursoNext.js (Turbopack)1.301s (-0.8%)2.012s (~)0.712s101.19x
🌐 MongoDBNext.js (Turbopack)1.302s (+0.7%)2.014s (~)0.712s101.19x
🐘 PostgresNext.js (Turbopack)1.913s (~)2.018s (~)0.106s101.75x
🐘 PostgresNitro2.150s (-2.7%)3.014s (~)0.864s101.96x
🐘 PostgresExpress2.404s (+9.0% 🔺)3.015s (~)0.611s102.20x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.756s (-0.7%)3.785s (+3.4%)1.029s101.00x
▲ VercelNext.js (Turbopack)2.863s (+4.1%)3.705s (-2.6%)0.842s101.04x
▲ VercelExpress3.029s (+11.7% 🔺)3.765s (+4.1%)0.737s101.10x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.597s (+1.2%)11.011s (~)0.414s51.00x
🌐 RedisNext.js (Turbopack)10.650s (+0.9%)11.015s (~)0.365s51.01x
💻 LocalNext.js (Turbopack)10.707s (+0.7%)11.018s (~)0.312s51.01x
💻 LocalNitro10.767s (~)11.013s (~)0.245s51.02x
💻 LocalExpress10.823s (~)11.016s (~)0.193s51.02x
🌐 TursoNext.js (Turbopack)12.196s (~)13.027s (~)0.830s51.15x
🌐 MongoDBNext.js (Turbopack)12.230s (~)13.024s (~)0.794s51.15x
🐘 PostgresNext.js (Turbopack)15.435s (+4.5%)16.238s (+3.8%)0.803s51.46x
🐘 PostgresExpress20.229s (-0.6%)21.046s (~)0.817s51.91x
🐘 PostgresNitro20.375s (~)20.841s (-0.9%)0.466s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)24.300s (+8.1% 🔺)25.264s (+9.1% 🔺)0.964s51.00x
▲ VercelExpress24.381s (+6.0% 🔺)25.047s (+6.0% 🔺)0.665s51.00x
▲ VercelNitro25.309s (+15.5% 🔺)26.132s (+14.2% 🔺)0.822s51.04x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.352s (+3.6%)2.008s (~)0.656s151.00x
🌐 RedisNext.js (Turbopack)1.352s (+2.4%)2.010s (~)0.657s151.00x
💻 LocalNitro1.397s (-0.8%)2.004s (~)0.607s151.03x
💻 LocalNext.js (Turbopack)1.417s (+2.9%)2.012s (~)0.595s151.05x
💻 LocalExpress1.432s (+2.1%)2.007s (~)0.575s151.06x
🐘 PostgresNext.js (Turbopack)1.896s (+13.2% 🔺)2.039s (+1.3%)0.143s151.40x
🌐 MongoDBNext.js (Turbopack)2.134s (~)3.013s (~)0.879s101.58x
🌐 TursoNext.js (Turbopack)2.217s (~)3.013s (~)0.796s101.64x
🐘 PostgresNitro2.376s (-2.3%)3.011s (~)0.635s101.76x
🐘 PostgresExpress2.571s (+5.6% 🔺)3.013s (~)0.442s101.90x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.948s (-2.0%)3.782s (-2.4%)0.834s81.00x
▲ VercelExpress3.023s (+4.1%)3.784s (+2.6%)0.761s91.03x
▲ VercelNitro3.190s (+6.6% 🔺)4.888s (+29.2% 🔺)1.698s71.08x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.087s (-1.7%)2.924s (-1.3%)0.838s111.00x
💻 LocalNitro2.183s (-1.9%)3.148s (-0.7%)0.965s101.05x
💻 LocalExpress2.305s (+3.8%)3.258s (+3.1%)0.953s101.10x
🌐 RedisNext.js (Turbopack)2.481s (+6.0% 🔺)3.013s (~)0.532s101.19x
🌐 StarterNext.js (Turbopack)2.495s (+5.0% 🔺)3.010s (~)0.515s101.20x
🐘 PostgresNext.js (Turbopack)2.729s (+6.3% 🔺)3.017s (~)0.288s101.31x
🐘 PostgresNitro2.782s (-8.7% 🟢)3.021s (-20.1% 🟢)0.239s101.33x
🐘 PostgresExpress2.930s (+3.8%)3.015s (~)0.085s101.40x
🌐 TursoNext.js (Turbopack)4.654s (-0.8%)5.179s (~)0.524s62.23x
🌐 MongoDBNext.js (Turbopack)4.659s (+1.0%)5.187s (~)0.528s62.23x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.054s (+19.6% 🔺)4.907s (+22.2% 🔺)0.853s71.00x
▲ VercelNitro4.142s (+11.8% 🔺)5.039s (+16.1% 🔺)0.898s61.02x
▲ VercelExpress4.578s (+43.4% 🔺)5.341s (+48.4% 🔺)0.763s61.13x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.357s (+2.9%)2.010s (~)0.653s151.00x
🌐 StarterNext.js (Turbopack)1.364s (+3.7%)2.007s (~)0.643s151.01x
💻 LocalNext.js (Turbopack)1.413s (~)2.014s (~)0.601s151.04x
💻 LocalNitro1.418s (~)2.005s (~)0.586s151.05x
💻 LocalExpress1.449s (+1.9%)2.006s (~)0.558s151.07x
🐘 PostgresNext.js (Turbopack)1.511s (-13.9% 🟢)2.012s (~)0.501s151.11x
🐘 PostgresExpress1.656s (-15.6% 🟢)2.080s (-6.8% 🟢)0.424s151.22x
🐘 PostgresNitro1.901s (+7.3% 🔺)2.157s (+7.3% 🔺)0.257s141.40x
🌐 MongoDBNext.js (Turbopack)2.158s (~)3.014s (~)0.856s101.59x
🌐 TursoNext.js (Turbopack)2.208s (-0.5%)3.010s (~)0.802s101.63x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.813s (+0.9%)3.835s (+2.9%)1.022s81.00x
▲ VercelExpress2.979s (-5.2% 🟢)3.725s (-4.1%)0.746s91.06x
▲ VercelNext.js (Turbopack)2.987s (+6.2% 🔺)3.907s (+2.1%)0.920s81.06x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.305s (+7.1% 🔺)3.261s (+7.0% 🔺)0.956s101.00x
💻 LocalNitro2.311s (+4.8%)3.219s (+1.9%)0.909s101.00x
💻 LocalExpress2.478s (+9.6% 🔺)3.304s (+2.4%)0.827s101.07x
🌐 StarterNext.js (Turbopack)2.484s (+4.7%)3.009s (~)0.525s101.08x
🌐 RedisNext.js (Turbopack)2.489s (+5.4% 🔺)3.044s (+1.1%)0.555s101.08x
🐘 PostgresNext.js (Turbopack)2.578s (~)3.027s (~)0.449s101.12x
🐘 PostgresNitro2.638s (-7.6% 🟢)3.011s (-3.7%)0.373s101.14x
🐘 PostgresExpress2.871s (+5.1% 🔺)3.123s (+3.5%)0.252s101.25x
🌐 MongoDBNext.js (Turbopack)4.674s (+0.7%)5.180s (~)0.506s62.03x
🌐 TursoNext.js (Turbopack)4.716s (+2.0%)5.181s (~)0.465s62.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.479s (+32.0% 🔺)4.954s (+20.1% 🔺)0.475s71.00x
▲ VercelNext.js (Turbopack)4.515s (+43.2% 🔺)5.114s (+30.5% 🔺)0.599s61.01x
▲ VercelNitro4.876s (+53.7% 🔺)5.665s (+47.8% 🔺)0.789s61.09x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.133s (+42.0% 🔺)1.006s (~)0.000s (+100.0% 🔺)1.013s (~)0.881s101.00x
🌐 RedisNext.js (Turbopack)0.139s (+19.9% 🔺)1.004s (~)0.000s (+Infinity% 🔺)1.013s (~)0.874s101.05x
💻 LocalNext.js (Turbopack)0.146s (+5.5% 🔺)1.003s (~)0.020s (+22.4% 🔺)1.031s (~)0.885s101.10x
💻 LocalNitro0.170s (-4.0%)0.992s (~)0.016s (+5.4% 🔺)1.021s (~)0.851s101.28x
💻 LocalExpress0.185s (+6.6% 🔺)0.992s (~)0.018s (+12.0% 🔺)1.026s (~)0.840s101.40x
🌐 TursoNext.js (Turbopack)0.456s (-8.1% 🟢)0.997s (+4.9%)0.000s (+Infinity% 🔺)1.014s (~)0.558s103.44x
🌐 MongoDBNext.js (Turbopack)0.508s (-2.4%)0.941s (+1.7%)0.000s (NaN%)1.013s (~)0.505s103.83x
🐘 PostgresNext.js (Turbopack)1.273s (+46.9% 🔺)1.904s (+69.0% 🔺)0.000s (~)2.019s (+52.9% 🔺)0.746s109.60x
🐘 PostgresNitro2.280s (+3.7%)2.756s (-3.1%)0.000s (-100.0% 🟢)3.014s (~)0.734s1017.20x
🐘 PostgresExpress2.436s (+3.0%)2.610s (-2.6%)0.000s (+Infinity% 🔺)3.017s (~)0.581s1018.37x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.857s (-5.4% 🟢)3.269s (-3.8%)0.961s (+58.8% 🔺)4.710s (+4.4%)1.853s101.00x
▲ VercelNitro2.863s (-4.9%)3.263s (-2.6%)0.418s (-12.0% 🟢)4.190s (-2.4%)1.327s101.00x
▲ VercelExpress2.893s (-7.1% 🟢)3.270s (-3.7%)0.425s (-15.1% 🟢)4.164s (-7.2% 🟢)1.271s101.01x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)7/8
🐘 PostgresNext.js (Turbopack)8/8
▲ VercelNext.js (Turbopack)4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter5/8
Nitro💻 Local8/8
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@pranaygp

Copy link
Copy Markdown
Contributor

should this use the experimental_ convention from AI sdk? I'm just worried about the API diverge between us and AI sdk but maybe I shouldn't be?

@VaguelySerious

Copy link
Copy Markdown
MemberAuthor

I'm just worried about the API diverge between us and AI sdk but maybe I shouldn't be?

@pranaygp Since we're only adding optional properties to existing interfaces, I'm less worried, since the property simply doesn't exist in AI SDK, and this is specifically only relevant for DurableAgent (since AI SDK has .toUIMessageStream({onFinish: (messages) => >...}) which DurableAgent hides

@VaguelySerious

Copy link
Copy Markdown
MemberAuthor

Merging since it was in review for two days

@VaguelySerious
VaguelySerious merged commit 49bb48a into mainJan 14, 2026
90 checks passed
@VaguelySerious
VaguelySerious deleted the peter/ui-message-return-v2 branch January 14, 2026 12:17
VaguelySerious added a commit that referenced this pull request Jan 16, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@VaguelySerious@pranaygp
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

[ai] Add collectUIMessages option to accumulate and return UIMessage[] from agent.stream - #768

Merged
VaguelySerious merged 4 commits into
mainfrom
peter/ui-message-return-v2
Jan 14, 2026
Merged

[ai] Add collectUIMessages option to accumulate and return UIMessage[] from agent.stream#768
VaguelySerious merged 4 commits into
mainfrom
peter/ui-message-return-v2

Conversation

@VaguelySerious

@VaguelySeriousVaguelySerious commented Jan 12, 2026

Copy link
Copy Markdown
Member

Related to #688 and #739

This adds a new option collectUIMessages to agent.stream, which, if passed, adds a stream transformation for accumulating stream chunks in durable state, and will return uiMessages: UIMessage[] from the agent.stream call.

Screenshot 2026-01-12 at 4 41 13 PM

Signed-off-by: Peter Wielander <mittgfu@gmail.com>
…e[] from agent.stream
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@changeset-bot

changeset-botBot commented Jan 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 564c895

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
NameType
@workflow/aiPatch
@workflow/docs-typecheckPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercelBot commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production363011374
✅ 💻 Local Development33208340
✅ 📦 Local Production33208340
✅ 🐘 Local Postgres33208340
✅ 🪟 Windows340034
❌ 🌍 Community Worlds131170148
Total152417351576

❌ Failed Tests

🌍 Community Worlds (17 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (14 failed):

  • addTenWorkflow
  • addTenWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro3301
✅ example3301
✅ express3301
✅ fastify3301
✅ hono3301
✅ nextjs-turbopack3301
✅ nextjs-webpack3301
✅ nitro3301
✅ nuxt3301
✅ sveltekit3301
✅ vite3301
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack3400
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb3310
✅ redis-dev300
❌ redis3310
✅ starter-dev300
❌ starter20140
✅ turso-dev300
❌ turso3310

📋 View full workflow run

@github-actions

github-actionsBot commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.038s (+18.1% 🔺)1.014s (~)0.976s101.00x
🌐 RedisNext.js (Turbopack)0.040s (+13.1% 🔺)1.017s (~)0.977s101.05x
💻 LocalNext.js (Turbopack)0.044s (+10.3% 🔺)1.020s (~)0.976s101.16x
💻 LocalExpress0.045s (-6.5% 🟢)1.008s (~)0.963s101.18x
💻 LocalNitro0.046s (+10.5% 🔺)1.006s (~)0.960s101.22x
🌐 MongoDBNext.js (Turbopack)0.094s (-27.0% 🟢)1.018s (~)0.925s102.47x
🌐 TursoNext.js (Turbopack)0.105s (-2.2%)1.014s (~)0.910s102.76x
🐘 PostgresNext.js (Turbopack)0.118s (-2.7%)1.021s (~)0.902s103.13x
🐘 PostgresExpress0.263s (-29.3% 🟢)1.015s (~)0.751s106.95x
🐘 PostgresNitro0.288s (+12.0% 🔺)1.012s (-0.7%)0.724s107.60x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.558s (-27.3% 🟢)1.649s (-4.3%)1.090s101.00x
▲ VercelNext.js (Turbopack)0.576s (-24.9% 🟢)1.608s (-9.1% 🟢)1.032s101.03x
▲ VercelExpress0.613s (-20.9% 🟢)1.488s (-7.2% 🟢)0.875s101.10x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.095s (+2.2%)2.010s (~)0.915s101.00x
💻 LocalNext.js (Turbopack)1.099s (~)2.015s (~)0.916s101.00x
🌐 RedisNext.js (Turbopack)1.099s (+1.3%)2.013s (~)0.914s101.00x
💻 LocalNitro1.111s (~)2.005s (~)0.894s101.01x
💻 LocalExpress1.121s (+0.7%)2.007s (~)0.886s101.02x
🌐 TursoNext.js (Turbopack)1.301s (-0.8%)2.012s (~)0.712s101.19x
🌐 MongoDBNext.js (Turbopack)1.302s (+0.7%)2.014s (~)0.712s101.19x
🐘 PostgresNext.js (Turbopack)1.913s (~)2.018s (~)0.106s101.75x
🐘 PostgresNitro2.150s (-2.7%)3.014s (~)0.864s101.96x
🐘 PostgresExpress2.404s (+9.0% 🔺)3.015s (~)0.611s102.20x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.756s (-0.7%)3.785s (+3.4%)1.029s101.00x
▲ VercelNext.js (Turbopack)2.863s (+4.1%)3.705s (-2.6%)0.842s101.04x
▲ VercelExpress3.029s (+11.7% 🔺)3.765s (+4.1%)0.737s101.10x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.597s (+1.2%)11.011s (~)0.414s51.00x
🌐 RedisNext.js (Turbopack)10.650s (+0.9%)11.015s (~)0.365s51.01x
💻 LocalNext.js (Turbopack)10.707s (+0.7%)11.018s (~)0.312s51.01x
💻 LocalNitro10.767s (~)11.013s (~)0.245s51.02x
💻 LocalExpress10.823s (~)11.016s (~)0.193s51.02x
🌐 TursoNext.js (Turbopack)12.196s (~)13.027s (~)0.830s51.15x
🌐 MongoDBNext.js (Turbopack)12.230s (~)13.024s (~)0.794s51.15x
🐘 PostgresNext.js (Turbopack)15.435s (+4.5%)16.238s (+3.8%)0.803s51.46x
🐘 PostgresExpress20.229s (-0.6%)21.046s (~)0.817s51.91x
🐘 PostgresNitro20.375s (~)20.841s (-0.9%)0.466s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)24.300s (+8.1% 🔺)25.264s (+9.1% 🔺)0.964s51.00x
▲ VercelExpress24.381s (+6.0% 🔺)25.047s (+6.0% 🔺)0.665s51.00x
▲ VercelNitro25.309s (+15.5% 🔺)26.132s (+14.2% 🔺)0.822s51.04x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.352s (+3.6%)2.008s (~)0.656s151.00x
🌐 RedisNext.js (Turbopack)1.352s (+2.4%)2.010s (~)0.657s151.00x
💻 LocalNitro1.397s (-0.8%)2.004s (~)0.607s151.03x
💻 LocalNext.js (Turbopack)1.417s (+2.9%)2.012s (~)0.595s151.05x
💻 LocalExpress1.432s (+2.1%)2.007s (~)0.575s151.06x
🐘 PostgresNext.js (Turbopack)1.896s (+13.2% 🔺)2.039s (+1.3%)0.143s151.40x
🌐 MongoDBNext.js (Turbopack)2.134s (~)3.013s (~)0.879s101.58x
🌐 TursoNext.js (Turbopack)2.217s (~)3.013s (~)0.796s101.64x
🐘 PostgresNitro2.376s (-2.3%)3.011s (~)0.635s101.76x
🐘 PostgresExpress2.571s (+5.6% 🔺)3.013s (~)0.442s101.90x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.948s (-2.0%)3.782s (-2.4%)0.834s81.00x
▲ VercelExpress3.023s (+4.1%)3.784s (+2.6%)0.761s91.03x
▲ VercelNitro3.190s (+6.6% 🔺)4.888s (+29.2% 🔺)1.698s71.08x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.087s (-1.7%)2.924s (-1.3%)0.838s111.00x
💻 LocalNitro2.183s (-1.9%)3.148s (-0.7%)0.965s101.05x
💻 LocalExpress2.305s (+3.8%)3.258s (+3.1%)0.953s101.10x
🌐 RedisNext.js (Turbopack)2.481s (+6.0% 🔺)3.013s (~)0.532s101.19x
🌐 StarterNext.js (Turbopack)2.495s (+5.0% 🔺)3.010s (~)0.515s101.20x
🐘 PostgresNext.js (Turbopack)2.729s (+6.3% 🔺)3.017s (~)0.288s101.31x
🐘 PostgresNitro2.782s (-8.7% 🟢)3.021s (-20.1% 🟢)0.239s101.33x
🐘 PostgresExpress2.930s (+3.8%)3.015s (~)0.085s101.40x
🌐 TursoNext.js (Turbopack)4.654s (-0.8%)5.179s (~)0.524s62.23x
🌐 MongoDBNext.js (Turbopack)4.659s (+1.0%)5.187s (~)0.528s62.23x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.054s (+19.6% 🔺)4.907s (+22.2% 🔺)0.853s71.00x
▲ VercelNitro4.142s (+11.8% 🔺)5.039s (+16.1% 🔺)0.898s61.02x
▲ VercelExpress4.578s (+43.4% 🔺)5.341s (+48.4% 🔺)0.763s61.13x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.357s (+2.9%)2.010s (~)0.653s151.00x
🌐 StarterNext.js (Turbopack)1.364s (+3.7%)2.007s (~)0.643s151.01x
💻 LocalNext.js (Turbopack)1.413s (~)2.014s (~)0.601s151.04x
💻 LocalNitro1.418s (~)2.005s (~)0.586s151.05x
💻 LocalExpress1.449s (+1.9%)2.006s (~)0.558s151.07x
🐘 PostgresNext.js (Turbopack)1.511s (-13.9% 🟢)2.012s (~)0.501s151.11x
🐘 PostgresExpress1.656s (-15.6% 🟢)2.080s (-6.8% 🟢)0.424s151.22x
🐘 PostgresNitro1.901s (+7.3% 🔺)2.157s (+7.3% 🔺)0.257s141.40x
🌐 MongoDBNext.js (Turbopack)2.158s (~)3.014s (~)0.856s101.59x
🌐 TursoNext.js (Turbopack)2.208s (-0.5%)3.010s (~)0.802s101.63x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.813s (+0.9%)3.835s (+2.9%)1.022s81.00x
▲ VercelExpress2.979s (-5.2% 🟢)3.725s (-4.1%)0.746s91.06x
▲ VercelNext.js (Turbopack)2.987s (+6.2% 🔺)3.907s (+2.1%)0.920s81.06x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.305s (+7.1% 🔺)3.261s (+7.0% 🔺)0.956s101.00x
💻 LocalNitro2.311s (+4.8%)3.219s (+1.9%)0.909s101.00x
💻 LocalExpress2.478s (+9.6% 🔺)3.304s (+2.4%)0.827s101.07x
🌐 StarterNext.js (Turbopack)2.484s (+4.7%)3.009s (~)0.525s101.08x
🌐 RedisNext.js (Turbopack)2.489s (+5.4% 🔺)3.044s (+1.1%)0.555s101.08x
🐘 PostgresNext.js (Turbopack)2.578s (~)3.027s (~)0.449s101.12x
🐘 PostgresNitro2.638s (-7.6% 🟢)3.011s (-3.7%)0.373s101.14x
🐘 PostgresExpress2.871s (+5.1% 🔺)3.123s (+3.5%)0.252s101.25x
🌐 MongoDBNext.js (Turbopack)4.674s (+0.7%)5.180s (~)0.506s62.03x
🌐 TursoNext.js (Turbopack)4.716s (+2.0%)5.181s (~)0.465s62.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.479s (+32.0% 🔺)4.954s (+20.1% 🔺)0.475s71.00x
▲ VercelNext.js (Turbopack)4.515s (+43.2% 🔺)5.114s (+30.5% 🔺)0.599s61.01x
▲ VercelNitro4.876s (+53.7% 🔺)5.665s (+47.8% 🔺)0.789s61.09x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.133s (+42.0% 🔺)1.006s (~)0.000s (+100.0% 🔺)1.013s (~)0.881s101.00x
🌐 RedisNext.js (Turbopack)0.139s (+19.9% 🔺)1.004s (~)0.000s (+Infinity% 🔺)1.013s (~)0.874s101.05x
💻 LocalNext.js (Turbopack)0.146s (+5.5% 🔺)1.003s (~)0.020s (+22.4% 🔺)1.031s (~)0.885s101.10x
💻 LocalNitro0.170s (-4.0%)0.992s (~)0.016s (+5.4% 🔺)1.021s (~)0.851s101.28x
💻 LocalExpress0.185s (+6.6% 🔺)0.992s (~)0.018s (+12.0% 🔺)1.026s (~)0.840s101.40x
🌐 TursoNext.js (Turbopack)0.456s (-8.1% 🟢)0.997s (+4.9%)0.000s (+Infinity% 🔺)1.014s (~)0.558s103.44x
🌐 MongoDBNext.js (Turbopack)0.508s (-2.4%)0.941s (+1.7%)0.000s (NaN%)1.013s (~)0.505s103.83x
🐘 PostgresNext.js (Turbopack)1.273s (+46.9% 🔺)1.904s (+69.0% 🔺)0.000s (~)2.019s (+52.9% 🔺)0.746s109.60x
🐘 PostgresNitro2.280s (+3.7%)2.756s (-3.1%)0.000s (-100.0% 🟢)3.014s (~)0.734s1017.20x
🐘 PostgresExpress2.436s (+3.0%)2.610s (-2.6%)0.000s (+Infinity% 🔺)3.017s (~)0.581s1018.37x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.857s (-5.4% 🟢)3.269s (-3.8%)0.961s (+58.8% 🔺)4.710s (+4.4%)1.853s101.00x
▲ VercelNitro2.863s (-4.9%)3.263s (-2.6%)0.418s (-12.0% 🟢)4.190s (-2.4%)1.327s101.00x
▲ VercelExpress2.893s (-7.1% 🟢)3.270s (-3.7%)0.425s (-15.1% 🟢)4.164s (-7.2% 🟢)1.271s101.01x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)7/8
🐘 PostgresNext.js (Turbopack)8/8
▲ VercelNext.js (Turbopack)4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter5/8
Nitro💻 Local8/8
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@pranaygp

Copy link
Copy Markdown
Contributor

should this use the experimental_ convention from AI sdk? I'm just worried about the API diverge between us and AI sdk but maybe I shouldn't be?

@VaguelySerious

Copy link
Copy Markdown
MemberAuthor

I'm just worried about the API diverge between us and AI sdk but maybe I shouldn't be?

@pranaygp Since we're only adding optional properties to existing interfaces, I'm less worried, since the property simply doesn't exist in AI SDK, and this is specifically only relevant for DurableAgent (since AI SDK has .toUIMessageStream({onFinish: (messages) => >...}) which DurableAgent hides

@VaguelySerious

Copy link
Copy Markdown
MemberAuthor

Merging since it was in review for two days

@VaguelySerious
VaguelySerious merged commit 49bb48a into mainJan 14, 2026
90 checks passed
@VaguelySerious
VaguelySerious deleted the peter/ui-message-return-v2 branch January 14, 2026 12:17
VaguelySerious added a commit that referenced this pull request Jan 16, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@VaguelySerious@pranaygp
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[ai] Add collectUIMessages option to accumulate and return UIMessage[] from agent.stream - #768

Merged
VaguelySerious merged 4 commits into
mainfrom
peter/ui-message-return-v2
Jan 14, 2026
Merged

[ai] Add collectUIMessages option to accumulate and return UIMessage[] from agent.stream#768
VaguelySerious merged 4 commits into
mainfrom
peter/ui-message-return-v2

Conversation

@VaguelySerious

@VaguelySeriousVaguelySerious commented Jan 12, 2026

Copy link
Copy Markdown
Member

Related to #688 and #739

This adds a new option collectUIMessages to agent.stream, which, if passed, adds a stream transformation for accumulating stream chunks in durable state, and will return uiMessages: UIMessage[] from the agent.stream call.

Screenshot 2026-01-12 at 4 41 13 PM

Signed-off-by: Peter Wielander <mittgfu@gmail.com>
…e[] from agent.stream
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@changeset-bot

changeset-botBot commented Jan 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 564c895

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
NameType
@workflow/aiPatch
@workflow/docs-typecheckPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercelBot commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production363011374
✅ 💻 Local Development33208340
✅ 📦 Local Production33208340
✅ 🐘 Local Postgres33208340
✅ 🪟 Windows340034
❌ 🌍 Community Worlds131170148
Total152417351576

❌ Failed Tests

🌍 Community Worlds (17 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (14 failed):

  • addTenWorkflow
  • addTenWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro3301
✅ example3301
✅ express3301
✅ fastify3301
✅ hono3301
✅ nextjs-turbopack3301
✅ nextjs-webpack3301
✅ nitro3301
✅ nuxt3301
✅ sveltekit3301
✅ vite3301
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack3400
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb3310
✅ redis-dev300
❌ redis3310
✅ starter-dev300
❌ starter20140
✅ turso-dev300
❌ turso3310

📋 View full workflow run

@github-actions

github-actionsBot commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.038s (+18.1% 🔺)1.014s (~)0.976s101.00x
🌐 RedisNext.js (Turbopack)0.040s (+13.1% 🔺)1.017s (~)0.977s101.05x
💻 LocalNext.js (Turbopack)0.044s (+10.3% 🔺)1.020s (~)0.976s101.16x
💻 LocalExpress0.045s (-6.5% 🟢)1.008s (~)0.963s101.18x
💻 LocalNitro0.046s (+10.5% 🔺)1.006s (~)0.960s101.22x
🌐 MongoDBNext.js (Turbopack)0.094s (-27.0% 🟢)1.018s (~)0.925s102.47x
🌐 TursoNext.js (Turbopack)0.105s (-2.2%)1.014s (~)0.910s102.76x
🐘 PostgresNext.js (Turbopack)0.118s (-2.7%)1.021s (~)0.902s103.13x
🐘 PostgresExpress0.263s (-29.3% 🟢)1.015s (~)0.751s106.95x
🐘 PostgresNitro0.288s (+12.0% 🔺)1.012s (-0.7%)0.724s107.60x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.558s (-27.3% 🟢)1.649s (-4.3%)1.090s101.00x
▲ VercelNext.js (Turbopack)0.576s (-24.9% 🟢)1.608s (-9.1% 🟢)1.032s101.03x
▲ VercelExpress0.613s (-20.9% 🟢)1.488s (-7.2% 🟢)0.875s101.10x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.095s (+2.2%)2.010s (~)0.915s101.00x
💻 LocalNext.js (Turbopack)1.099s (~)2.015s (~)0.916s101.00x
🌐 RedisNext.js (Turbopack)1.099s (+1.3%)2.013s (~)0.914s101.00x
💻 LocalNitro1.111s (~)2.005s (~)0.894s101.01x
💻 LocalExpress1.121s (+0.7%)2.007s (~)0.886s101.02x
🌐 TursoNext.js (Turbopack)1.301s (-0.8%)2.012s (~)0.712s101.19x
🌐 MongoDBNext.js (Turbopack)1.302s (+0.7%)2.014s (~)0.712s101.19x
🐘 PostgresNext.js (Turbopack)1.913s (~)2.018s (~)0.106s101.75x
🐘 PostgresNitro2.150s (-2.7%)3.014s (~)0.864s101.96x
🐘 PostgresExpress2.404s (+9.0% 🔺)3.015s (~)0.611s102.20x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.756s (-0.7%)3.785s (+3.4%)1.029s101.00x
▲ VercelNext.js (Turbopack)2.863s (+4.1%)3.705s (-2.6%)0.842s101.04x
▲ VercelExpress3.029s (+11.7% 🔺)3.765s (+4.1%)0.737s101.10x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.597s (+1.2%)11.011s (~)0.414s51.00x
🌐 RedisNext.js (Turbopack)10.650s (+0.9%)11.015s (~)0.365s51.01x
💻 LocalNext.js (Turbopack)10.707s (+0.7%)11.018s (~)0.312s51.01x
💻 LocalNitro10.767s (~)11.013s (~)0.245s51.02x
💻 LocalExpress10.823s (~)11.016s (~)0.193s51.02x
🌐 TursoNext.js (Turbopack)12.196s (~)13.027s (~)0.830s51.15x
🌐 MongoDBNext.js (Turbopack)12.230s (~)13.024s (~)0.794s51.15x
🐘 PostgresNext.js (Turbopack)15.435s (+4.5%)16.238s (+3.8%)0.803s51.46x
🐘 PostgresExpress20.229s (-0.6%)21.046s (~)0.817s51.91x
🐘 PostgresNitro20.375s (~)20.841s (-0.9%)0.466s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)24.300s (+8.1% 🔺)25.264s (+9.1% 🔺)0.964s51.00x
▲ VercelExpress24.381s (+6.0% 🔺)25.047s (+6.0% 🔺)0.665s51.00x
▲ VercelNitro25.309s (+15.5% 🔺)26.132s (+14.2% 🔺)0.822s51.04x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.352s (+3.6%)2.008s (~)0.656s151.00x
🌐 RedisNext.js (Turbopack)1.352s (+2.4%)2.010s (~)0.657s151.00x
💻 LocalNitro1.397s (-0.8%)2.004s (~)0.607s151.03x
💻 LocalNext.js (Turbopack)1.417s (+2.9%)2.012s (~)0.595s151.05x
💻 LocalExpress1.432s (+2.1%)2.007s (~)0.575s151.06x
🐘 PostgresNext.js (Turbopack)1.896s (+13.2% 🔺)2.039s (+1.3%)0.143s151.40x
🌐 MongoDBNext.js (Turbopack)2.134s (~)3.013s (~)0.879s101.58x
🌐 TursoNext.js (Turbopack)2.217s (~)3.013s (~)0.796s101.64x
🐘 PostgresNitro2.376s (-2.3%)3.011s (~)0.635s101.76x
🐘 PostgresExpress2.571s (+5.6% 🔺)3.013s (~)0.442s101.90x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.948s (-2.0%)3.782s (-2.4%)0.834s81.00x
▲ VercelExpress3.023s (+4.1%)3.784s (+2.6%)0.761s91.03x
▲ VercelNitro3.190s (+6.6% 🔺)4.888s (+29.2% 🔺)1.698s71.08x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.087s (-1.7%)2.924s (-1.3%)0.838s111.00x
💻 LocalNitro2.183s (-1.9%)3.148s (-0.7%)0.965s101.05x
💻 LocalExpress2.305s (+3.8%)3.258s (+3.1%)0.953s101.10x
🌐 RedisNext.js (Turbopack)2.481s (+6.0% 🔺)3.013s (~)0.532s101.19x
🌐 StarterNext.js (Turbopack)2.495s (+5.0% 🔺)3.010s (~)0.515s101.20x
🐘 PostgresNext.js (Turbopack)2.729s (+6.3% 🔺)3.017s (~)0.288s101.31x
🐘 PostgresNitro2.782s (-8.7% 🟢)3.021s (-20.1% 🟢)0.239s101.33x
🐘 PostgresExpress2.930s (+3.8%)3.015s (~)0.085s101.40x
🌐 TursoNext.js (Turbopack)4.654s (-0.8%)5.179s (~)0.524s62.23x
🌐 MongoDBNext.js (Turbopack)4.659s (+1.0%)5.187s (~)0.528s62.23x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.054s (+19.6% 🔺)4.907s (+22.2% 🔺)0.853s71.00x
▲ VercelNitro4.142s (+11.8% 🔺)5.039s (+16.1% 🔺)0.898s61.02x
▲ VercelExpress4.578s (+43.4% 🔺)5.341s (+48.4% 🔺)0.763s61.13x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.357s (+2.9%)2.010s (~)0.653s151.00x
🌐 StarterNext.js (Turbopack)1.364s (+3.7%)2.007s (~)0.643s151.01x
💻 LocalNext.js (Turbopack)1.413s (~)2.014s (~)0.601s151.04x
💻 LocalNitro1.418s (~)2.005s (~)0.586s151.05x
💻 LocalExpress1.449s (+1.9%)2.006s (~)0.558s151.07x
🐘 PostgresNext.js (Turbopack)1.511s (-13.9% 🟢)2.012s (~)0.501s151.11x
🐘 PostgresExpress1.656s (-15.6% 🟢)2.080s (-6.8% 🟢)0.424s151.22x
🐘 PostgresNitro1.901s (+7.3% 🔺)2.157s (+7.3% 🔺)0.257s141.40x
🌐 MongoDBNext.js (Turbopack)2.158s (~)3.014s (~)0.856s101.59x
🌐 TursoNext.js (Turbopack)2.208s (-0.5%)3.010s (~)0.802s101.63x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.813s (+0.9%)3.835s (+2.9%)1.022s81.00x
▲ VercelExpress2.979s (-5.2% 🟢)3.725s (-4.1%)0.746s91.06x
▲ VercelNext.js (Turbopack)2.987s (+6.2% 🔺)3.907s (+2.1%)0.920s81.06x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.305s (+7.1% 🔺)3.261s (+7.0% 🔺)0.956s101.00x
💻 LocalNitro2.311s (+4.8%)3.219s (+1.9%)0.909s101.00x
💻 LocalExpress2.478s (+9.6% 🔺)3.304s (+2.4%)0.827s101.07x
🌐 StarterNext.js (Turbopack)2.484s (+4.7%)3.009s (~)0.525s101.08x
🌐 RedisNext.js (Turbopack)2.489s (+5.4% 🔺)3.044s (+1.1%)0.555s101.08x
🐘 PostgresNext.js (Turbopack)2.578s (~)3.027s (~)0.449s101.12x
🐘 PostgresNitro2.638s (-7.6% 🟢)3.011s (-3.7%)0.373s101.14x
🐘 PostgresExpress2.871s (+5.1% 🔺)3.123s (+3.5%)0.252s101.25x
🌐 MongoDBNext.js (Turbopack)4.674s (+0.7%)5.180s (~)0.506s62.03x
🌐 TursoNext.js (Turbopack)4.716s (+2.0%)5.181s (~)0.465s62.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.479s (+32.0% 🔺)4.954s (+20.1% 🔺)0.475s71.00x
▲ VercelNext.js (Turbopack)4.515s (+43.2% 🔺)5.114s (+30.5% 🔺)0.599s61.01x
▲ VercelNitro4.876s (+53.7% 🔺)5.665s (+47.8% 🔺)0.789s61.09x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.133s (+42.0% 🔺)1.006s (~)0.000s (+100.0% 🔺)1.013s (~)0.881s101.00x
🌐 RedisNext.js (Turbopack)0.139s (+19.9% 🔺)1.004s (~)0.000s (+Infinity% 🔺)1.013s (~)0.874s101.05x
💻 LocalNext.js (Turbopack)0.146s (+5.5% 🔺)1.003s (~)0.020s (+22.4% 🔺)1.031s (~)0.885s101.10x
💻 LocalNitro0.170s (-4.0%)0.992s (~)0.016s (+5.4% 🔺)1.021s (~)0.851s101.28x
💻 LocalExpress0.185s (+6.6% 🔺)0.992s (~)0.018s (+12.0% 🔺)1.026s (~)0.840s101.40x
🌐 TursoNext.js (Turbopack)0.456s (-8.1% 🟢)0.997s (+4.9%)0.000s (+Infinity% 🔺)1.014s (~)0.558s103.44x
🌐 MongoDBNext.js (Turbopack)0.508s (-2.4%)0.941s (+1.7%)0.000s (NaN%)1.013s (~)0.505s103.83x
🐘 PostgresNext.js (Turbopack)1.273s (+46.9% 🔺)1.904s (+69.0% 🔺)0.000s (~)2.019s (+52.9% 🔺)0.746s109.60x
🐘 PostgresNitro2.280s (+3.7%)2.756s (-3.1%)0.000s (-100.0% 🟢)3.014s (~)0.734s1017.20x
🐘 PostgresExpress2.436s (+3.0%)2.610s (-2.6%)0.000s (+Infinity% 🔺)3.017s (~)0.581s1018.37x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.857s (-5.4% 🟢)3.269s (-3.8%)0.961s (+58.8% 🔺)4.710s (+4.4%)1.853s101.00x
▲ VercelNitro2.863s (-4.9%)3.263s (-2.6%)0.418s (-12.0% 🟢)4.190s (-2.4%)1.327s101.00x
▲ VercelExpress2.893s (-7.1% 🟢)3.270s (-3.7%)0.425s (-15.1% 🟢)4.164s (-7.2% 🟢)1.271s101.01x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)7/8
🐘 PostgresNext.js (Turbopack)8/8
▲ VercelNext.js (Turbopack)4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter5/8
Nitro💻 Local8/8
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@pranaygp

Copy link
Copy Markdown
Contributor

should this use the experimental_ convention from AI sdk? I'm just worried about the API diverge between us and AI sdk but maybe I shouldn't be?

@VaguelySerious

Copy link
Copy Markdown
MemberAuthor

I'm just worried about the API diverge between us and AI sdk but maybe I shouldn't be?

@pranaygp Since we're only adding optional properties to existing interfaces, I'm less worried, since the property simply doesn't exist in AI SDK, and this is specifically only relevant for DurableAgent (since AI SDK has .toUIMessageStream({onFinish: (messages) => >...}) which DurableAgent hides

@VaguelySerious

Copy link
Copy Markdown
MemberAuthor

Merging since it was in review for two days

@VaguelySerious
VaguelySerious merged commit 49bb48a into mainJan 14, 2026
90 checks passed
@VaguelySerious
VaguelySerious deleted the peter/ui-message-return-v2 branch January 14, 2026 12:17
VaguelySerious added a commit that referenced this pull request Jan 16, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@VaguelySerious@pranaygp
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[ai] Add collectUIMessages option to accumulate and return UIMessage[] from agent.stream - #768

Merged
VaguelySerious merged 4 commits into
mainfrom
peter/ui-message-return-v2
Jan 14, 2026
Merged

[ai] Add collectUIMessages option to accumulate and return UIMessage[] from agent.stream#768
VaguelySerious merged 4 commits into
mainfrom
peter/ui-message-return-v2

Conversation

@VaguelySerious

@VaguelySeriousVaguelySerious commented Jan 12, 2026

Copy link
Copy Markdown
Member

Related to #688 and #739

This adds a new option collectUIMessages to agent.stream, which, if passed, adds a stream transformation for accumulating stream chunks in durable state, and will return uiMessages: UIMessage[] from the agent.stream call.

Screenshot 2026-01-12 at 4 41 13 PM

Signed-off-by: Peter Wielander <mittgfu@gmail.com>
…e[] from agent.stream
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@changeset-bot

changeset-botBot commented Jan 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 564c895

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
NameType
@workflow/aiPatch
@workflow/docs-typecheckPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercelBot commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production363011374
✅ 💻 Local Development33208340
✅ 📦 Local Production33208340
✅ 🐘 Local Postgres33208340
✅ 🪟 Windows340034
❌ 🌍 Community Worlds131170148
Total152417351576

❌ Failed Tests

🌍 Community Worlds (17 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (14 failed):

  • addTenWorkflow
  • addTenWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro3301
✅ example3301
✅ express3301
✅ fastify3301
✅ hono3301
✅ nextjs-turbopack3301
✅ nextjs-webpack3301
✅ nitro3301
✅ nuxt3301
✅ sveltekit3301
✅ vite3301
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack3400
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb3310
✅ redis-dev300
❌ redis3310
✅ starter-dev300
❌ starter20140
✅ turso-dev300
❌ turso3310

📋 View full workflow run

@github-actions

github-actionsBot commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.038s (+18.1% 🔺)1.014s (~)0.976s101.00x
🌐 RedisNext.js (Turbopack)0.040s (+13.1% 🔺)1.017s (~)0.977s101.05x
💻 LocalNext.js (Turbopack)0.044s (+10.3% 🔺)1.020s (~)0.976s101.16x
💻 LocalExpress0.045s (-6.5% 🟢)1.008s (~)0.963s101.18x
💻 LocalNitro0.046s (+10.5% 🔺)1.006s (~)0.960s101.22x
🌐 MongoDBNext.js (Turbopack)0.094s (-27.0% 🟢)1.018s (~)0.925s102.47x
🌐 TursoNext.js (Turbopack)0.105s (-2.2%)1.014s (~)0.910s102.76x
🐘 PostgresNext.js (Turbopack)0.118s (-2.7%)1.021s (~)0.902s103.13x
🐘 PostgresExpress0.263s (-29.3% 🟢)1.015s (~)0.751s106.95x
🐘 PostgresNitro0.288s (+12.0% 🔺)1.012s (-0.7%)0.724s107.60x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.558s (-27.3% 🟢)1.649s (-4.3%)1.090s101.00x
▲ VercelNext.js (Turbopack)0.576s (-24.9% 🟢)1.608s (-9.1% 🟢)1.032s101.03x
▲ VercelExpress0.613s (-20.9% 🟢)1.488s (-7.2% 🟢)0.875s101.10x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.095s (+2.2%)2.010s (~)0.915s101.00x
💻 LocalNext.js (Turbopack)1.099s (~)2.015s (~)0.916s101.00x
🌐 RedisNext.js (Turbopack)1.099s (+1.3%)2.013s (~)0.914s101.00x
💻 LocalNitro1.111s (~)2.005s (~)0.894s101.01x
💻 LocalExpress1.121s (+0.7%)2.007s (~)0.886s101.02x
🌐 TursoNext.js (Turbopack)1.301s (-0.8%)2.012s (~)0.712s101.19x
🌐 MongoDBNext.js (Turbopack)1.302s (+0.7%)2.014s (~)0.712s101.19x
🐘 PostgresNext.js (Turbopack)1.913s (~)2.018s (~)0.106s101.75x
🐘 PostgresNitro2.150s (-2.7%)3.014s (~)0.864s101.96x
🐘 PostgresExpress2.404s (+9.0% 🔺)3.015s (~)0.611s102.20x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.756s (-0.7%)3.785s (+3.4%)1.029s101.00x
▲ VercelNext.js (Turbopack)2.863s (+4.1%)3.705s (-2.6%)0.842s101.04x
▲ VercelExpress3.029s (+11.7% 🔺)3.765s (+4.1%)0.737s101.10x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.597s (+1.2%)11.011s (~)0.414s51.00x
🌐 RedisNext.js (Turbopack)10.650s (+0.9%)11.015s (~)0.365s51.01x
💻 LocalNext.js (Turbopack)10.707s (+0.7%)11.018s (~)0.312s51.01x
💻 LocalNitro10.767s (~)11.013s (~)0.245s51.02x
💻 LocalExpress10.823s (~)11.016s (~)0.193s51.02x
🌐 TursoNext.js (Turbopack)12.196s (~)13.027s (~)0.830s51.15x
🌐 MongoDBNext.js (Turbopack)12.230s (~)13.024s (~)0.794s51.15x
🐘 PostgresNext.js (Turbopack)15.435s (+4.5%)16.238s (+3.8%)0.803s51.46x
🐘 PostgresExpress20.229s (-0.6%)21.046s (~)0.817s51.91x
🐘 PostgresNitro20.375s (~)20.841s (-0.9%)0.466s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)24.300s (+8.1% 🔺)25.264s (+9.1% 🔺)0.964s51.00x
▲ VercelExpress24.381s (+6.0% 🔺)25.047s (+6.0% 🔺)0.665s51.00x
▲ VercelNitro25.309s (+15.5% 🔺)26.132s (+14.2% 🔺)0.822s51.04x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.352s (+3.6%)2.008s (~)0.656s151.00x
🌐 RedisNext.js (Turbopack)1.352s (+2.4%)2.010s (~)0.657s151.00x
💻 LocalNitro1.397s (-0.8%)2.004s (~)0.607s151.03x
💻 LocalNext.js (Turbopack)1.417s (+2.9%)2.012s (~)0.595s151.05x
💻 LocalExpress1.432s (+2.1%)2.007s (~)0.575s151.06x
🐘 PostgresNext.js (Turbopack)1.896s (+13.2% 🔺)2.039s (+1.3%)0.143s151.40x
🌐 MongoDBNext.js (Turbopack)2.134s (~)3.013s (~)0.879s101.58x
🌐 TursoNext.js (Turbopack)2.217s (~)3.013s (~)0.796s101.64x
🐘 PostgresNitro2.376s (-2.3%)3.011s (~)0.635s101.76x
🐘 PostgresExpress2.571s (+5.6% 🔺)3.013s (~)0.442s101.90x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.948s (-2.0%)3.782s (-2.4%)0.834s81.00x
▲ VercelExpress3.023s (+4.1%)3.784s (+2.6%)0.761s91.03x
▲ VercelNitro3.190s (+6.6% 🔺)4.888s (+29.2% 🔺)1.698s71.08x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.087s (-1.7%)2.924s (-1.3%)0.838s111.00x
💻 LocalNitro2.183s (-1.9%)3.148s (-0.7%)0.965s101.05x
💻 LocalExpress2.305s (+3.8%)3.258s (+3.1%)0.953s101.10x
🌐 RedisNext.js (Turbopack)2.481s (+6.0% 🔺)3.013s (~)0.532s101.19x
🌐 StarterNext.js (Turbopack)2.495s (+5.0% 🔺)3.010s (~)0.515s101.20x
🐘 PostgresNext.js (Turbopack)2.729s (+6.3% 🔺)3.017s (~)0.288s101.31x
🐘 PostgresNitro2.782s (-8.7% 🟢)3.021s (-20.1% 🟢)0.239s101.33x
🐘 PostgresExpress2.930s (+3.8%)3.015s (~)0.085s101.40x
🌐 TursoNext.js (Turbopack)4.654s (-0.8%)5.179s (~)0.524s62.23x
🌐 MongoDBNext.js (Turbopack)4.659s (+1.0%)5.187s (~)0.528s62.23x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.054s (+19.6% 🔺)4.907s (+22.2% 🔺)0.853s71.00x
▲ VercelNitro4.142s (+11.8% 🔺)5.039s (+16.1% 🔺)0.898s61.02x
▲ VercelExpress4.578s (+43.4% 🔺)5.341s (+48.4% 🔺)0.763s61.13x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.357s (+2.9%)2.010s (~)0.653s151.00x
🌐 StarterNext.js (Turbopack)1.364s (+3.7%)2.007s (~)0.643s151.01x
💻 LocalNext.js (Turbopack)1.413s (~)2.014s (~)0.601s151.04x
💻 LocalNitro1.418s (~)2.005s (~)0.586s151.05x
💻 LocalExpress1.449s (+1.9%)2.006s (~)0.558s151.07x
🐘 PostgresNext.js (Turbopack)1.511s (-13.9% 🟢)2.012s (~)0.501s151.11x
🐘 PostgresExpress1.656s (-15.6% 🟢)2.080s (-6.8% 🟢)0.424s151.22x
🐘 PostgresNitro1.901s (+7.3% 🔺)2.157s (+7.3% 🔺)0.257s141.40x
🌐 MongoDBNext.js (Turbopack)2.158s (~)3.014s (~)0.856s101.59x
🌐 TursoNext.js (Turbopack)2.208s (-0.5%)3.010s (~)0.802s101.63x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.813s (+0.9%)3.835s (+2.9%)1.022s81.00x
▲ VercelExpress2.979s (-5.2% 🟢)3.725s (-4.1%)0.746s91.06x
▲ VercelNext.js (Turbopack)2.987s (+6.2% 🔺)3.907s (+2.1%)0.920s81.06x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.305s (+7.1% 🔺)3.261s (+7.0% 🔺)0.956s101.00x
💻 LocalNitro2.311s (+4.8%)3.219s (+1.9%)0.909s101.00x
💻 LocalExpress2.478s (+9.6% 🔺)3.304s (+2.4%)0.827s101.07x
🌐 StarterNext.js (Turbopack)2.484s (+4.7%)3.009s (~)0.525s101.08x
🌐 RedisNext.js (Turbopack)2.489s (+5.4% 🔺)3.044s (+1.1%)0.555s101.08x
🐘 PostgresNext.js (Turbopack)2.578s (~)3.027s (~)0.449s101.12x
🐘 PostgresNitro2.638s (-7.6% 🟢)3.011s (-3.7%)0.373s101.14x
🐘 PostgresExpress2.871s (+5.1% 🔺)3.123s (+3.5%)0.252s101.25x
🌐 MongoDBNext.js (Turbopack)4.674s (+0.7%)5.180s (~)0.506s62.03x
🌐 TursoNext.js (Turbopack)4.716s (+2.0%)5.181s (~)0.465s62.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.479s (+32.0% 🔺)4.954s (+20.1% 🔺)0.475s71.00x
▲ VercelNext.js (Turbopack)4.515s (+43.2% 🔺)5.114s (+30.5% 🔺)0.599s61.01x
▲ VercelNitro4.876s (+53.7% 🔺)5.665s (+47.8% 🔺)0.789s61.09x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.133s (+42.0% 🔺)1.006s (~)0.000s (+100.0% 🔺)1.013s (~)0.881s101.00x
🌐 RedisNext.js (Turbopack)0.139s (+19.9% 🔺)1.004s (~)0.000s (+Infinity% 🔺)1.013s (~)0.874s101.05x
💻 LocalNext.js (Turbopack)0.146s (+5.5% 🔺)1.003s (~)0.020s (+22.4% 🔺)1.031s (~)0.885s101.10x
💻 LocalNitro0.170s (-4.0%)0.992s (~)0.016s (+5.4% 🔺)1.021s (~)0.851s101.28x
💻 LocalExpress0.185s (+6.6% 🔺)0.992s (~)0.018s (+12.0% 🔺)1.026s (~)0.840s101.40x
🌐 TursoNext.js (Turbopack)0.456s (-8.1% 🟢)0.997s (+4.9%)0.000s (+Infinity% 🔺)1.014s (~)0.558s103.44x
🌐 MongoDBNext.js (Turbopack)0.508s (-2.4%)0.941s (+1.7%)0.000s (NaN%)1.013s (~)0.505s103.83x
🐘 PostgresNext.js (Turbopack)1.273s (+46.9% 🔺)1.904s (+69.0% 🔺)0.000s (~)2.019s (+52.9% 🔺)0.746s109.60x
🐘 PostgresNitro2.280s (+3.7%)2.756s (-3.1%)0.000s (-100.0% 🟢)3.014s (~)0.734s1017.20x
🐘 PostgresExpress2.436s (+3.0%)2.610s (-2.6%)0.000s (+Infinity% 🔺)3.017s (~)0.581s1018.37x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.857s (-5.4% 🟢)3.269s (-3.8%)0.961s (+58.8% 🔺)4.710s (+4.4%)1.853s101.00x
▲ VercelNitro2.863s (-4.9%)3.263s (-2.6%)0.418s (-12.0% 🟢)4.190s (-2.4%)1.327s101.00x
▲ VercelExpress2.893s (-7.1% 🟢)3.270s (-3.7%)0.425s (-15.1% 🟢)4.164s (-7.2% 🟢)1.271s101.01x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)7/8
🐘 PostgresNext.js (Turbopack)8/8
▲ VercelNext.js (Turbopack)4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter5/8
Nitro💻 Local8/8
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@pranaygp

Copy link
Copy Markdown
Contributor

should this use the experimental_ convention from AI sdk? I'm just worried about the API diverge between us and AI sdk but maybe I shouldn't be?

@VaguelySerious

Copy link
Copy Markdown
MemberAuthor

I'm just worried about the API diverge between us and AI sdk but maybe I shouldn't be?

@pranaygp Since we're only adding optional properties to existing interfaces, I'm less worried, since the property simply doesn't exist in AI SDK, and this is specifically only relevant for DurableAgent (since AI SDK has .toUIMessageStream({onFinish: (messages) => >...}) which DurableAgent hides

@VaguelySerious

Copy link
Copy Markdown
MemberAuthor

Merging since it was in review for two days

@VaguelySerious
VaguelySerious merged commit 49bb48a into mainJan 14, 2026
90 checks passed
@VaguelySerious
VaguelySerious deleted the peter/ui-message-return-v2 branch January 14, 2026 12:17
VaguelySerious added a commit that referenced this pull request Jan 16, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@VaguelySerious@pranaygp
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

[ai] Add collectUIMessages option to accumulate and return UIMessage[] from agent.stream - #768

Merged
VaguelySerious merged 4 commits into
mainfrom
peter/ui-message-return-v2
Jan 14, 2026
Merged

[ai] Add collectUIMessages option to accumulate and return UIMessage[] from agent.stream#768
VaguelySerious merged 4 commits into
mainfrom
peter/ui-message-return-v2

Conversation

@VaguelySerious

@VaguelySeriousVaguelySerious commented Jan 12, 2026

Copy link
Copy Markdown
Member

Related to #688 and #739

This adds a new option collectUIMessages to agent.stream, which, if passed, adds a stream transformation for accumulating stream chunks in durable state, and will return uiMessages: UIMessage[] from the agent.stream call.

Screenshot 2026-01-12 at 4 41 13 PM

Signed-off-by: Peter Wielander <mittgfu@gmail.com>
…e[] from agent.stream
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@changeset-bot

changeset-botBot commented Jan 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 564c895

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
NameType
@workflow/aiPatch
@workflow/docs-typecheckPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercelBot commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production363011374
✅ 💻 Local Development33208340
✅ 📦 Local Production33208340
✅ 🐘 Local Postgres33208340
✅ 🪟 Windows340034
❌ 🌍 Community Worlds131170148
Total152417351576

❌ Failed Tests

🌍 Community Worlds (17 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (14 failed):

  • addTenWorkflow
  • addTenWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro3301
✅ example3301
✅ express3301
✅ fastify3301
✅ hono3301
✅ nextjs-turbopack3301
✅ nextjs-webpack3301
✅ nitro3301
✅ nuxt3301
✅ sveltekit3301
✅ vite3301
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable3301
✅ express-stable3301
✅ fastify-stable3301
✅ hono-stable3301
✅ nextjs-turbopack-stable3400
✅ nextjs-webpack-stable3400
✅ nitro-stable3301
✅ nuxt-stable3301
✅ sveltekit-stable3301
✅ vite-stable3301
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack3400
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb3310
✅ redis-dev300
❌ redis3310
✅ starter-dev300
❌ starter20140
✅ turso-dev300
❌ turso3310

📋 View full workflow run

@github-actions

github-actionsBot commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.038s (+18.1% 🔺)1.014s (~)0.976s101.00x
🌐 RedisNext.js (Turbopack)0.040s (+13.1% 🔺)1.017s (~)0.977s101.05x
💻 LocalNext.js (Turbopack)0.044s (+10.3% 🔺)1.020s (~)0.976s101.16x
💻 LocalExpress0.045s (-6.5% 🟢)1.008s (~)0.963s101.18x
💻 LocalNitro0.046s (+10.5% 🔺)1.006s (~)0.960s101.22x
🌐 MongoDBNext.js (Turbopack)0.094s (-27.0% 🟢)1.018s (~)0.925s102.47x
🌐 TursoNext.js (Turbopack)0.105s (-2.2%)1.014s (~)0.910s102.76x
🐘 PostgresNext.js (Turbopack)0.118s (-2.7%)1.021s (~)0.902s103.13x
🐘 PostgresExpress0.263s (-29.3% 🟢)1.015s (~)0.751s106.95x
🐘 PostgresNitro0.288s (+12.0% 🔺)1.012s (-0.7%)0.724s107.60x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.558s (-27.3% 🟢)1.649s (-4.3%)1.090s101.00x
▲ VercelNext.js (Turbopack)0.576s (-24.9% 🟢)1.608s (-9.1% 🟢)1.032s101.03x
▲ VercelExpress0.613s (-20.9% 🟢)1.488s (-7.2% 🟢)0.875s101.10x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.095s (+2.2%)2.010s (~)0.915s101.00x
💻 LocalNext.js (Turbopack)1.099s (~)2.015s (~)0.916s101.00x
🌐 RedisNext.js (Turbopack)1.099s (+1.3%)2.013s (~)0.914s101.00x
💻 LocalNitro1.111s (~)2.005s (~)0.894s101.01x
💻 LocalExpress1.121s (+0.7%)2.007s (~)0.886s101.02x
🌐 TursoNext.js (Turbopack)1.301s (-0.8%)2.012s (~)0.712s101.19x
🌐 MongoDBNext.js (Turbopack)1.302s (+0.7%)2.014s (~)0.712s101.19x
🐘 PostgresNext.js (Turbopack)1.913s (~)2.018s (~)0.106s101.75x
🐘 PostgresNitro2.150s (-2.7%)3.014s (~)0.864s101.96x
🐘 PostgresExpress2.404s (+9.0% 🔺)3.015s (~)0.611s102.20x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.756s (-0.7%)3.785s (+3.4%)1.029s101.00x
▲ VercelNext.js (Turbopack)2.863s (+4.1%)3.705s (-2.6%)0.842s101.04x
▲ VercelExpress3.029s (+11.7% 🔺)3.765s (+4.1%)0.737s101.10x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.597s (+1.2%)11.011s (~)0.414s51.00x
🌐 RedisNext.js (Turbopack)10.650s (+0.9%)11.015s (~)0.365s51.01x
💻 LocalNext.js (Turbopack)10.707s (+0.7%)11.018s (~)0.312s51.01x
💻 LocalNitro10.767s (~)11.013s (~)0.245s51.02x
💻 LocalExpress10.823s (~)11.016s (~)0.193s51.02x
🌐 TursoNext.js (Turbopack)12.196s (~)13.027s (~)0.830s51.15x
🌐 MongoDBNext.js (Turbopack)12.230s (~)13.024s (~)0.794s51.15x
🐘 PostgresNext.js (Turbopack)15.435s (+4.5%)16.238s (+3.8%)0.803s51.46x
🐘 PostgresExpress20.229s (-0.6%)21.046s (~)0.817s51.91x
🐘 PostgresNitro20.375s (~)20.841s (-0.9%)0.466s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)24.300s (+8.1% 🔺)25.264s (+9.1% 🔺)0.964s51.00x
▲ VercelExpress24.381s (+6.0% 🔺)25.047s (+6.0% 🔺)0.665s51.00x
▲ VercelNitro25.309s (+15.5% 🔺)26.132s (+14.2% 🔺)0.822s51.04x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.352s (+3.6%)2.008s (~)0.656s151.00x
🌐 RedisNext.js (Turbopack)1.352s (+2.4%)2.010s (~)0.657s151.00x
💻 LocalNitro1.397s (-0.8%)2.004s (~)0.607s151.03x
💻 LocalNext.js (Turbopack)1.417s (+2.9%)2.012s (~)0.595s151.05x
💻 LocalExpress1.432s (+2.1%)2.007s (~)0.575s151.06x
🐘 PostgresNext.js (Turbopack)1.896s (+13.2% 🔺)2.039s (+1.3%)0.143s151.40x
🌐 MongoDBNext.js (Turbopack)2.134s (~)3.013s (~)0.879s101.58x
🌐 TursoNext.js (Turbopack)2.217s (~)3.013s (~)0.796s101.64x
🐘 PostgresNitro2.376s (-2.3%)3.011s (~)0.635s101.76x
🐘 PostgresExpress2.571s (+5.6% 🔺)3.013s (~)0.442s101.90x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.948s (-2.0%)3.782s (-2.4%)0.834s81.00x
▲ VercelExpress3.023s (+4.1%)3.784s (+2.6%)0.761s91.03x
▲ VercelNitro3.190s (+6.6% 🔺)4.888s (+29.2% 🔺)1.698s71.08x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.087s (-1.7%)2.924s (-1.3%)0.838s111.00x
💻 LocalNitro2.183s (-1.9%)3.148s (-0.7%)0.965s101.05x
💻 LocalExpress2.305s (+3.8%)3.258s (+3.1%)0.953s101.10x
🌐 RedisNext.js (Turbopack)2.481s (+6.0% 🔺)3.013s (~)0.532s101.19x
🌐 StarterNext.js (Turbopack)2.495s (+5.0% 🔺)3.010s (~)0.515s101.20x
🐘 PostgresNext.js (Turbopack)2.729s (+6.3% 🔺)3.017s (~)0.288s101.31x
🐘 PostgresNitro2.782s (-8.7% 🟢)3.021s (-20.1% 🟢)0.239s101.33x
🐘 PostgresExpress2.930s (+3.8%)3.015s (~)0.085s101.40x
🌐 TursoNext.js (Turbopack)4.654s (-0.8%)5.179s (~)0.524s62.23x
🌐 MongoDBNext.js (Turbopack)4.659s (+1.0%)5.187s (~)0.528s62.23x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.054s (+19.6% 🔺)4.907s (+22.2% 🔺)0.853s71.00x
▲ VercelNitro4.142s (+11.8% 🔺)5.039s (+16.1% 🔺)0.898s61.02x
▲ VercelExpress4.578s (+43.4% 🔺)5.341s (+48.4% 🔺)0.763s61.13x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.357s (+2.9%)2.010s (~)0.653s151.00x
🌐 StarterNext.js (Turbopack)1.364s (+3.7%)2.007s (~)0.643s151.01x
💻 LocalNext.js (Turbopack)1.413s (~)2.014s (~)0.601s151.04x
💻 LocalNitro1.418s (~)2.005s (~)0.586s151.05x
💻 LocalExpress1.449s (+1.9%)2.006s (~)0.558s151.07x
🐘 PostgresNext.js (Turbopack)1.511s (-13.9% 🟢)2.012s (~)0.501s151.11x
🐘 PostgresExpress1.656s (-15.6% 🟢)2.080s (-6.8% 🟢)0.424s151.22x
🐘 PostgresNitro1.901s (+7.3% 🔺)2.157s (+7.3% 🔺)0.257s141.40x
🌐 MongoDBNext.js (Turbopack)2.158s (~)3.014s (~)0.856s101.59x
🌐 TursoNext.js (Turbopack)2.208s (-0.5%)3.010s (~)0.802s101.63x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.813s (+0.9%)3.835s (+2.9%)1.022s81.00x
▲ VercelExpress2.979s (-5.2% 🟢)3.725s (-4.1%)0.746s91.06x
▲ VercelNext.js (Turbopack)2.987s (+6.2% 🔺)3.907s (+2.1%)0.920s81.06x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.305s (+7.1% 🔺)3.261s (+7.0% 🔺)0.956s101.00x
💻 LocalNitro2.311s (+4.8%)3.219s (+1.9%)0.909s101.00x
💻 LocalExpress2.478s (+9.6% 🔺)3.304s (+2.4%)0.827s101.07x
🌐 StarterNext.js (Turbopack)2.484s (+4.7%)3.009s (~)0.525s101.08x
🌐 RedisNext.js (Turbopack)2.489s (+5.4% 🔺)3.044s (+1.1%)0.555s101.08x
🐘 PostgresNext.js (Turbopack)2.578s (~)3.027s (~)0.449s101.12x
🐘 PostgresNitro2.638s (-7.6% 🟢)3.011s (-3.7%)0.373s101.14x
🐘 PostgresExpress2.871s (+5.1% 🔺)3.123s (+3.5%)0.252s101.25x
🌐 MongoDBNext.js (Turbopack)4.674s (+0.7%)5.180s (~)0.506s62.03x
🌐 TursoNext.js (Turbopack)4.716s (+2.0%)5.181s (~)0.465s62.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.479s (+32.0% 🔺)4.954s (+20.1% 🔺)0.475s71.00x
▲ VercelNext.js (Turbopack)4.515s (+43.2% 🔺)5.114s (+30.5% 🔺)0.599s61.01x
▲ VercelNitro4.876s (+53.7% 🔺)5.665s (+47.8% 🔺)0.789s61.09x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.133s (+42.0% 🔺)1.006s (~)0.000s (+100.0% 🔺)1.013s (~)0.881s101.00x
🌐 RedisNext.js (Turbopack)0.139s (+19.9% 🔺)1.004s (~)0.000s (+Infinity% 🔺)1.013s (~)0.874s101.05x
💻 LocalNext.js (Turbopack)0.146s (+5.5% 🔺)1.003s (~)0.020s (+22.4% 🔺)1.031s (~)0.885s101.10x
💻 LocalNitro0.170s (-4.0%)0.992s (~)0.016s (+5.4% 🔺)1.021s (~)0.851s101.28x
💻 LocalExpress0.185s (+6.6% 🔺)0.992s (~)0.018s (+12.0% 🔺)1.026s (~)0.840s101.40x
🌐 TursoNext.js (Turbopack)0.456s (-8.1% 🟢)0.997s (+4.9%)0.000s (+Infinity% 🔺)1.014s (~)0.558s103.44x
🌐 MongoDBNext.js (Turbopack)0.508s (-2.4%)0.941s (+1.7%)0.000s (NaN%)1.013s (~)0.505s103.83x
🐘 PostgresNext.js (Turbopack)1.273s (+46.9% 🔺)1.904s (+69.0% 🔺)0.000s (~)2.019s (+52.9% 🔺)0.746s109.60x
🐘 PostgresNitro2.280s (+3.7%)2.756s (-3.1%)0.000s (-100.0% 🟢)3.014s (~)0.734s1017.20x
🐘 PostgresExpress2.436s (+3.0%)2.610s (-2.6%)0.000s (+Infinity% 🔺)3.017s (~)0.581s1018.37x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.857s (-5.4% 🟢)3.269s (-3.8%)0.961s (+58.8% 🔺)4.710s (+4.4%)1.853s101.00x
▲ VercelNitro2.863s (-4.9%)3.263s (-2.6%)0.418s (-12.0% 🟢)4.190s (-2.4%)1.327s101.00x
▲ VercelExpress2.893s (-7.1% 🟢)3.270s (-3.7%)0.425s (-15.1% 🟢)4.164s (-7.2% 🟢)1.271s101.01x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)7/8
🐘 PostgresNext.js (Turbopack)8/8
▲ VercelNext.js (Turbopack)4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter5/8
Nitro💻 Local8/8
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@pranaygp

Copy link
Copy Markdown
Contributor

should this use the experimental_ convention from AI sdk? I'm just worried about the API diverge between us and AI sdk but maybe I shouldn't be?

@VaguelySerious

Copy link
Copy Markdown
MemberAuthor

I'm just worried about the API diverge between us and AI sdk but maybe I shouldn't be?

@pranaygp Since we're only adding optional properties to existing interfaces, I'm less worried, since the property simply doesn't exist in AI SDK, and this is specifically only relevant for DurableAgent (since AI SDK has .toUIMessageStream({onFinish: (messages) => >...}) which DurableAgent hides

@VaguelySerious

Copy link
Copy Markdown
MemberAuthor

Merging since it was in review for two days

@VaguelySerious
VaguelySerious merged commit 49bb48a into mainJan 14, 2026
90 checks passed
@VaguelySerious
VaguelySerious deleted the peter/ui-message-return-v2 branch January 14, 2026 12:17
VaguelySerious added a commit that referenced this pull request Jan 16, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@VaguelySerious@pranaygp