Skip to content

[Docs] Fix cookbook pattern for AI SDK - #2099

Merged
karthikscale3 merged 4 commits into
mainfrom
karthik/cookbook-ai-sdk-tools-not-durable
May 25, 2026
Merged

[Docs] Fix cookbook pattern for AI SDK#2099
karthikscale3 merged 4 commits into
mainfrom
karthik/cookbook-ai-sdk-tools-not-durable

Conversation

@karthikscale3

@karthikscale3karthikscale3 commented May 22, 2026

Copy link
Copy Markdown
Contributor

Summary

The AI SDK cookbook entry (docs/content/docs/v{4,5}/cookbook/integrations/ai-sdk.mdx) shows streamText inside a "use step" turn function with the example tools (lookupOrder, processRefund) also marked "use step". That presentation implies tool calls are individually durable, but per Workflows & Steps the "use step" directive is a no-op when called from another step. So in this pattern tools run as plain inline functions inside runTurn, and the durability boundary is the entire turn — if anything in the turn throws, every tool call that already ran is replayed.

This PR fixes the cookbook to reflect that reality and gives readers an explicit migration path (idempotent tools or DurableAgent).

Changes (applied identically to v4 and v5)

  • Removed the "use step" directive from lookupOrder and processRefund in the workflow code sample, with an inline comment explaining why.
  • Updated the frontmatter summary and intro paragraph: dropped the inaccurate "tools remain durable steps" claim; explicitly call out the per-turn durability boundary.
  • Added a new Tools are not individually durable entry to Pitfalls covering:
    • The retry unit is runTurn, not the tool call.
    • A side-effectful tool (e.g. processRefund) can run multiple times if the turn retries.
    • Mitigations: idempotent tool implementations, or DurableAgent (each tool call becomes its own durable step).
  • Added a runTurn durability-boundary bullet to How it works.
  • Added a Tool call durability row to the streamText vs DurableAgent table.
  • Rewrote two misleading Key APIs bullets:
    • tool() no longer claims tools wrap "use step" functions / are replayed from the log.
    • "use step" is now described as applied to runTurn, not to "tool executions".
  • Corrected outdated DurableAgent guidance after verifying the implementation:
    • Callout no longer claims DurableAgent lacks stopWhen, structured output, or onStepFinish — it reimplements the same agent loop and already supports those options.
    • Rewrote When to use streamText directly to focus on the raw AI SDK API, per-turn durability boundaries, and custom multi-turn orchestration (hook loops, sliceUntilFinish).
    • Updated the streamText vs DurableAgent comparison table: both support stopWhen/prepareStep; DurableAgent supports experimental_output and step callbacks (onStepFinish, onFinish, etc.); noted onChunk as the main gap.

Test plan

  • Visual check of the rendered /cookbook/integrations/ai-sdk page on v4 and v5.
  • Confirm the new in-page anchor (#tools-are-not-individually-durable) resolves from the intro paragraph, How it works, and Key APIs cross-links.
  • Confirm the code sample still typechecks in the docs typecheck pipeline.

Made with Cursor

@karthikscale3
karthikscale3 requested a review from a team as a code ownerMay 22, 2026 23:54
@changeset-bot

changeset-botBot commented May 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3270975

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@github-actions

github-actionsBot commented May 22, 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
💻 Local🥇 Express0.031s (-30.5% 🟢)1.006s (~)0.975s101.00x
💻 LocalNitro0.033s (-23.7% 🟢)1.006s (~)0.973s101.07x
🐘 PostgresNitro0.042s (-55.7% 🟢)1.010s (-3.1%)0.968s101.37x
💻 LocalNext.js (Turbopack)0.048s1.006s0.958s101.55x
🐘 PostgresExpress0.053s (-8.1% 🟢)1.014s (~)0.960s101.73x
🐘 PostgresNext.js (Turbopack)0.056s1.011s0.955s101.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.279s (-31.9% 🟢)2.044s (-18.6% 🟢)1.764s101.00x
▲ VercelExpress0.296s (+25.6% 🔺)2.469s (+15.6% 🔺)2.173s101.06x
▲ VercelNext.js (Turbopack)0.304s (+21.0% 🔺)2.151s (-7.8% 🟢)1.847s101.09x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.075s (-4.4%)2.006s (~)0.931s101.00x
💻 LocalNitro1.076s (-4.9%)2.006s (~)0.930s101.00x
🐘 PostgresNitro1.079s (-5.4% 🟢)2.008s (~)0.929s101.00x
🐘 PostgresExpress1.083s (-5.5% 🟢)2.009s (~)0.926s101.01x
💻 LocalNext.js (Turbopack)1.112s2.006s0.895s101.03x
🐘 PostgresNext.js (Turbopack)1.120s2.009s0.890s101.04x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.585s (-22.1% 🟢)3.301s (-13.8% 🟢)1.716s101.00x
▲ VercelNitro1.677s (-56.9% 🟢)3.257s (-44.9% 🟢)1.579s101.06x
▲ VercelExpress1.731s (-7.7% 🟢)3.615s (-5.1% 🟢)1.884s101.09x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro10.423s (-4.1%)11.015s (~)0.592s31.00x
💻 LocalExpress10.423s (-4.6%)11.021s (~)0.598s31.00x
💻 LocalNitro10.425s (-4.8%)11.021s (~)0.596s31.00x
🐘 PostgresExpress10.445s (-4.7%)11.017s (~)0.572s31.00x
💻 LocalNext.js (Turbopack)10.652s11.020s0.367s31.02x
🐘 PostgresNext.js (Turbopack)10.694s11.020s0.326s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro13.232s (-44.2% 🟢)15.258s (-39.2% 🟢)2.026s21.00x
▲ VercelNext.js (Turbopack)13.769s (-20.5% 🟢)15.278s (-21.2% 🟢)1.509s21.04x
▲ VercelExpress16.197s (-4.6%)17.973s (-10.2% 🟢)1.777s21.22x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro13.457s (-7.8% 🟢)14.018s (-6.7% 🟢)0.561s51.00x
🐘 PostgresExpress13.492s (-7.5% 🟢)14.017s (-6.7% 🟢)0.525s51.00x
💻 LocalExpress13.498s (-9.8% 🟢)14.027s (-6.7% 🟢)0.529s51.00x
💻 LocalNitro13.506s (-10.3% 🟢)14.029s (-12.5% 🟢)0.523s51.00x
💻 LocalNext.js (Turbopack)14.038s15.029s0.991s41.04x
🐘 PostgresNext.js (Turbopack)14.121s15.019s0.898s41.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro21.119s (-67.2% 🟢)22.768s (-65.8% 🟢)1.649s31.00x
▲ VercelExpress21.128s (-58.0% 🟢)22.810s (-56.6% 🟢)1.683s31.00x
▲ VercelNext.js (Turbopack)21.868s (-58.4% 🟢)22.948s (-58.0% 🟢)1.080s31.04x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express11.935s (-28.1% 🟢)12.022s (-29.4% 🟢)0.087s81.00x
🐘 PostgresExpress11.955s (-14.7% 🟢)12.142s (-16.8% 🟢)0.187s81.00x
💻 LocalNitro11.982s (-28.6% 🟢)12.147s (-28.7% 🟢)0.165s81.00x
🐘 PostgresNitro11.987s (-14.2% 🟢)12.393s (-13.4% 🟢)0.406s81.00x
💻 LocalNext.js (Turbopack)12.945s13.023s0.078s71.08x
🐘 PostgresNext.js (Turbopack)13.222s14.015s0.794s71.11x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express32.014s (-73.6% 🟢)33.895s (-72.6% 🟢)1.881s31.00x
▲ VercelNext.js (Turbopack)32.210s (-91.8% 🟢)33.857s (-91.4% 🟢)1.647s31.01x
▲ VercelNitro32.225s (-92.4% 🟢)34.212s (-91.9% 🟢)1.987s31.01x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.141s (-10.5% 🟢)2.006s (~)0.865s151.00x
🐘 PostgresExpress1.150s (-8.7% 🟢)2.007s (~)0.857s151.01x
💻 LocalExpress1.176s (-21.0% 🟢)2.007s (~)0.831s151.03x
💻 LocalNitro1.185s (-27.4% 🟢)2.007s (-3.2%)0.822s151.04x
🐘 PostgresNext.js (Turbopack)1.198s2.007s0.809s151.05x
💻 LocalNext.js (Turbopack)1.279s2.006s0.728s151.12x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.551s (-10.8% 🟢)4.135s (-10.6% 🟢)1.584s81.00x
▲ VercelNext.js (Turbopack)2.592s (-23.7% 🟢)4.220s (-14.5% 🟢)1.628s81.02x
▲ VercelNitro2.674s (-5.1% 🟢)4.354s (+0.7%)1.680s71.05x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.191s (-49.3% 🟢)2.006s (-33.3% 🟢)0.815s151.00x
🐘 PostgresExpress1.212s (-48.7% 🟢)2.007s (-33.3% 🟢)0.796s151.02x
🐘 PostgresNext.js (Turbopack)1.339s2.006s0.667s151.12x
💻 LocalNitro1.771s (-43.7% 🟢)2.006s (-48.4% 🟢)0.236s151.49x
💻 LocalNext.js (Turbopack)1.799s2.073s0.274s151.51x
💻 LocalExpress1.891s (-35.9% 🟢)2.142s (-38.0% 🟢)0.250s151.59x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.385s (-16.5% 🟢)4.730s (-20.1% 🟢)1.345s71.00x
▲ VercelExpress3.711s (+2.5%)5.633s (+10.2% 🔺)1.922s61.10x
▲ VercelNext.js (Turbopack)4.474s (-37.0% 🟢)5.883s (-33.9% 🟢)1.408s61.32x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.301s (-62.6% 🟢)2.007s (-49.9% 🟢)0.707s151.00x
🐘 PostgresExpress1.323s (-62.0% 🟢)2.007s (-49.9% 🟢)0.684s151.02x
🐘 PostgresNext.js (Turbopack)1.595s2.007s0.412s151.23x
💻 LocalNext.js (Turbopack)4.947s5.344s0.397s63.80x
💻 LocalNitro5.412s (-35.2% 🟢)5.847s (-35.2% 🟢)0.435s64.16x
💻 LocalExpress5.621s (-32.6% 🟢)6.013s (-33.4% 🟢)0.391s54.32x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.258s (+24.0% 🔺)7.088s (+15.7% 🔺)1.831s51.00x
▲ VercelNext.js (Turbopack)6.447s (-27.7% 🟢)7.992s (-27.1% 🟢)1.544s41.23x
▲ VercelNitro6.804s (+93.0% 🔺)8.588s (+55.2% 🔺)1.784s41.29x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.131s (-10.0% 🟢)2.007s (~)0.876s151.00x
🐘 PostgresExpress1.158s (-7.9% 🟢)2.008s (~)0.850s151.02x
🐘 PostgresNext.js (Turbopack)1.198s2.006s0.808s151.06x
💻 LocalNext.js (Turbopack)1.303s2.006s0.703s151.15x
💻 LocalNitro1.410s (-24.4% 🟢)2.006s (-14.3% 🟢)0.595s151.25x
💻 LocalExpress1.460s (-22.9% 🟢)2.006s (-15.1% 🟢)0.546s151.29x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.421s (-17.4% 🟢)3.689s (-20.5% 🟢)1.268s91.00x
▲ VercelNitro2.507s (+2.0%)3.960s (-5.0% 🟢)1.452s81.04x
▲ VercelExpress2.626s (+1.7%)4.498s (+3.4%)1.872s71.08x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.182s (-49.5% 🟢)2.007s (-33.3% 🟢)0.825s151.00x
🐘 PostgresExpress1.212s (-48.2% 🟢)2.009s (-33.3% 🟢)0.797s151.03x
🐘 PostgresNext.js (Turbopack)1.353s2.008s0.654s151.14x
💻 LocalNext.js (Turbopack)2.024s2.674s0.650s121.71x
💻 LocalExpress2.077s (-33.7% 🟢)2.508s (-33.3% 🟢)0.431s121.76x
💻 LocalNitro2.081s (-32.1% 🟢)2.507s (-35.5% 🟢)0.427s121.76x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.363s (+5.3% 🔺)5.109s (+6.6% 🔺)1.746s61.00x
▲ VercelNitro3.543s (+9.6% 🔺)4.722s (-7.0% 🟢)1.179s71.05x
▲ VercelNext.js (Turbopack)3.827s (+21.8% 🔺)5.241s (+15.9% 🔺)1.414s61.14x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.288s (-63.0% 🟢)2.007s (-49.9% 🟢)0.719s151.00x
🐘 PostgresExpress1.318s (-62.3% 🟢)2.008s (-49.9% 🟢)0.690s151.02x
🐘 PostgresNext.js (Turbopack)1.603s2.010s0.408s151.24x
💻 LocalNext.js (Turbopack)5.253s6.013s0.760s54.08x
💻 LocalNitro5.567s (-39.1% 🟢)6.014s (-40.0% 🟢)0.447s54.32x
💻 LocalExpress6.097s (-30.7% 🟢)6.415s (-30.8% 🟢)0.318s54.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.083s (-20.8% 🟢)6.959s (-14.9% 🟢)1.876s51.00x
▲ VercelNitro5.184s (+1.8%)7.046s (+3.4%)1.862s51.02x
▲ VercelNext.js (Turbopack)5.777s (-14.5% 🟢)7.101s (-16.9% 🟢)1.323s51.14x

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

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.442s (-46.1% 🟢)1.006s (~)0.564s601.00x
💻 LocalExpress0.484s (-50.8% 🟢)1.004s (-6.7% 🟢)0.520s601.10x
🐘 PostgresExpress0.486s (-42.1% 🟢)1.024s (~)0.538s591.10x
💻 LocalNitro0.525s (-46.5% 🟢)1.005s (-8.1% 🟢)0.480s601.19x
🐘 PostgresNext.js (Turbopack)0.682s1.006s0.325s601.54x
💻 LocalNext.js (Turbopack)0.705s1.005s0.300s601.59x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.886s (-74.3% 🟢)6.422s (-69.9% 🟢)1.536s101.00x
▲ VercelNitro5.443s (-75.3% 🟢)6.976s (-71.0% 🟢)1.533s91.11x
▲ VercelNext.js (Turbopack)5.491s (-62.1% 🟢)6.854s (-57.4% 🟢)1.362s91.12x

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

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.031s (-47.8% 🟢)1.586s (-29.8% 🟢)0.555s571.00x
🐘 PostgresNitro1.053s (-45.4% 🟢)1.603s (-23.7% 🟢)0.550s571.02x
💻 LocalExpress1.209s (-59.9% 🟢)2.006s (-44.1% 🟢)0.797s451.17x
💻 LocalNitro1.225s (-59.6% 🟢)2.006s (-46.6% 🟢)0.781s451.19x
🐘 PostgresNext.js (Turbopack)1.631s2.009s0.377s451.58x
💻 LocalNext.js (Turbopack)1.767s2.006s0.239s451.71x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.045s (-73.8% 🟢)14.636s (-71.7% 🟢)1.592s71.00x
▲ VercelExpress13.474s (-61.0% 🟢)15.249s (-58.6% 🟢)1.776s61.03x
▲ VercelNitro13.618s (-65.5% 🟢)15.326s (-62.9% 🟢)1.708s61.04x

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

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.009s (-51.0% 🟢)2.407s (-47.7% 🟢)0.398s501.00x
🐘 PostgresExpress2.175s (-45.5% 🟢)2.758s (-36.9% 🟢)0.583s441.08x
💻 LocalExpress2.767s (-70.0% 🟢)3.032s (-69.7% 🟢)0.265s401.38x
💻 LocalNitro2.796s (-69.9% 🟢)3.033s (-69.7% 🟢)0.237s401.39x
🐘 PostgresNext.js (Turbopack)3.182s4.009s0.827s301.58x
💻 LocalNext.js (Turbopack)3.712s4.008s0.296s301.85x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express27.669s (-78.7% 🟢)29.488s (-77.7% 🟢)1.819s51.00x
▲ VercelNitro29.741s (-69.3% 🟢)31.477s (-68.0% 🟢)1.736s41.07x
▲ VercelNext.js (Turbopack)31.048s (-71.0% 🟢)32.776s (-69.9% 🟢)1.727s41.12x

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

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.163s (-42.6% 🟢)1.005s (~)0.843s601.00x
🐘 PostgresExpress0.171s (-39.4% 🟢)1.006s (~)0.835s601.05x
🐘 PostgresNext.js (Turbopack)0.229s1.006s0.777s601.41x
💻 LocalNitro0.412s (-31.8% 🟢)1.004s (-1.7%)0.592s602.54x
💻 LocalExpress0.419s (-25.2% 🟢)1.004s (~)0.585s602.58x
💻 LocalNext.js (Turbopack)0.510s1.004s0.494s603.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.414s (+45.3% 🔺)4.251s (+26.9% 🔺)1.838s161.00x
▲ VercelExpress2.559s (+30.9% 🔺)4.101s (+12.7% 🔺)1.542s151.06x
▲ VercelNext.js (Turbopack)2.607s (+28.9% 🔺)3.926s (+3.5%)1.320s161.08x

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

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.282s (-43.3% 🟢)1.005s (~)0.724s901.00x
🐘 PostgresExpress0.306s (-39.9% 🟢)1.007s (~)0.701s901.09x
🐘 PostgresNext.js (Turbopack)0.449s1.007s0.558s901.59x
💻 LocalNitro2.140s (-15.7% 🟢)2.852s (-5.2% 🟢)0.712s327.60x
💻 LocalExpress2.162s (-14.0% 🟢)2.943s (-2.2%)0.781s317.68x
💻 LocalNext.js (Turbopack)2.219s2.944s0.726s317.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.743s (+55.7% 🔺)6.348s (+32.0% 🔺)1.604s151.00x
▲ VercelNitro5.316s (+64.8% 🔺)6.877s (+42.6% 🔺)1.561s141.12x
▲ VercelNext.js (Turbopack)5.355s (+51.5% 🔺)6.768s (+30.3% 🔺)1.413s141.13x

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

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.557s (-29.5% 🟢)1.005s (~)0.448s1201.00x
🐘 PostgresExpress0.626s (-23.6% 🟢)1.006s (-1.1%)0.380s1201.12x
🐘 PostgresNext.js (Turbopack)0.919s1.207s0.288s1001.65x
💻 LocalExpress10.512s (-6.1% 🟢)11.119s (-6.9% 🟢)0.607s1118.87x
💻 LocalNitro10.566s (-5.6% 🟢)11.119s (-4.7%)0.553s1118.97x
💻 LocalNext.js (Turbopack)10.761s11.481s0.720s1119.32x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro14.165s (+83.4% 🔺)15.767s (+67.7% 🔺)1.603s91.00x
▲ VercelNext.js (Turbopack)14.811s (+43.4% 🔺)16.301s (+32.7% 🔺)1.490s81.05x
▲ VercelExpress16.474s (+122.0% 🔺)18.379s (+98.8% 🔺)1.905s71.16x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.135s (+453.5% 🔺)2.002s (+100.3% 🔺)0.001s (-13.3% 🟢)2.009s (+98.7% 🔺)0.874s101.00x
💻 LocalExpress1.135s (+470.1% 🔺)2.006s (+99.7% 🔺)0.012s (+2.5%)2.020s (+98.5% 🔺)0.885s101.00x
🐘 PostgresExpress1.141s (+456.3% 🔺)2.001s (+100.4% 🔺)0.001s (-25.0% 🟢)2.011s (+98.9% 🔺)0.871s101.01x
💻 LocalNitro1.142s (+434.4% 🔺)2.005s (+99.6% 🔺)0.013s (+0.8%)2.020s (+98.3% 🔺)0.878s101.01x
💻 LocalNext.js (Turbopack)1.170s2.004s0.012s2.019s0.849s101.03x
🐘 PostgresNext.js (Turbopack)1.195s2.002s0.002s2.011s0.815s101.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.151s (-68.6% 🟢)2.881s (-66.7% 🟢)2.305s (+264.7% 🔺)5.547s (-43.3% 🟢)3.397s101.00x
▲ VercelNitro2.196s (-42.7% 🟢)2.985s (-43.4% 🟢)2.267s (+205.5% 🔺)5.704s (-12.0% 🟢)3.508s101.02x
▲ VercelExpress2.949s (+17.7% 🔺)4.011s (-1.9%)14.047s (+1362.0% 🔺)18.574s (+232.2% 🔺)15.625s101.37x

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

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.498s (+140.0% 🔺)2.007s (+99.3% 🔺)0.003s (-19.4% 🟢)2.022s (+97.8% 🔺)0.524s301.00x
🐘 PostgresExpress1.520s (+141.3% 🔺)2.006s (+99.3% 🔺)0.004s (+4.4%)2.025s (+98.0% 🔺)0.505s301.01x
💻 LocalNitro1.555s (+85.4% 🔺)2.013s (+98.9% 🔺)0.011s (+16.0% 🔺)2.026s (+81.5% 🔺)0.471s301.04x
💻 LocalNext.js (Turbopack)1.657s2.014s0.010s2.026s0.369s301.11x
🐘 PostgresNext.js (Turbopack)1.712s2.010s0.004s2.028s0.316s301.14x
💻 LocalExpress1.739s (+129.7% 🔺)2.012s (+95.6% 🔺)0.011s (+13.9% 🔺)2.198s (+111.4% 🔺)0.459s291.16x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.010s (-64.5% 🟢)6.776s (-62.9% 🟢)0.173s (-18.3% 🟢)7.342s (-61.2% 🟢)1.331s91.00x
▲ VercelNitro6.068s (-79.4% 🟢)7.063s (-77.1% 🟢)0.275s (+145.2% 🔺)7.733s (-75.7% 🟢)1.664s81.01x
▲ VercelExpress6.459s (-0.7%)7.852s (-2.0%)0.234s (-42.7% 🟢)8.609s (-2.6%)2.149s71.07x

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

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.610s (-37.1% 🟢)1.016s (-18.6% 🟢)0.000s (-58.6% 🟢)1.038s (-17.5% 🟢)0.428s581.00x
🐘 PostgresExpress0.695s (-27.6% 🟢)1.052s (-17.7% 🟢)0.000s (+101.8% 🔺)1.064s (-18.5% 🟢)0.369s571.14x
🐘 PostgresNext.js (Turbopack)0.768s1.053s0.000s1.059s0.292s571.26x
💻 LocalExpress1.370s (+11.8% 🔺)2.015s (~)0.000s (-50.0% 🟢)2.017s (~)0.647s302.25x
💻 LocalNext.js (Turbopack)1.402s2.013s0.000s2.016s0.615s302.30x
💻 LocalNitro1.431s (+17.0% 🔺)2.016s (~)0.000s (-66.7% 🟢)2.018s (~)0.587s302.35x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.669s (+20.3% 🔺)4.647s (+5.8% 🔺)0.000s (-100.0% 🟢)5.059s (+5.2% 🔺)1.389s121.00x
▲ VercelExpress3.790s (+1.3%)5.277s (+3.4%)0.000s (-100.0% 🟢)5.812s (+5.1% 🔺)2.022s111.03x
▲ VercelNext.js (Turbopack)3.849s (-62.2% 🟢)4.996s (-56.6% 🟢)0.000s (+Infinity% 🔺)5.474s (-54.6% 🟢)1.625s111.05x

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

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.254s (-30.0% 🟢)1.847s (-13.7% 🟢)0.000s (+154.5% 🔺)1.872s (-13.9% 🟢)0.617s331.00x
🐘 PostgresExpress1.325s (-25.2% 🟢)2.066s (-5.1% 🟢)0.000s (NaN%)2.076s (-5.6% 🟢)0.751s301.06x
🐘 PostgresNext.js (Turbopack)1.530s2.106s0.000s2.114s0.585s291.22x
💻 LocalNext.js (Turbopack)2.579s3.187s0.000s3.190s0.611s192.06x
💻 LocalExpress3.164s (-8.7% 🟢)4.029s (~)0.001s (-33.3% 🟢)4.032s (~)0.867s152.52x
💻 LocalNitro3.346s (-1.2%)3.968s (-1.6%)0.001s (+28.9% 🔺)3.971s (-1.6%)0.625s162.67x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.599s (~)6.937s (-0.6%)0.000s (-11.1% 🟢)7.371s (-2.2%)1.772s91.00x
▲ VercelExpress7.865s (+71.5% 🔺)9.206s (+52.9% 🔺)0.000s (+Infinity% 🔺)9.666s (+49.7% 🔺)1.801s71.40x
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress12/21
🐘 PostgresNitro19/21
▲ VercelExpress8/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres15/21
Next.js (Turbopack)🐘 Postgres14/21
Nitro🐘 Postgres18/21
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
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production122202191441
✅ 💻 Local Development161502191834
✅ 📦 Local Production161502191834
✅ 🐘 Local Postgres161502191834
✅ 🪟 Windows13100131
✅ 📋 Other7410176917
Total6939010527991

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro105026
✅ example105026
✅ express105026
✅ fastify105026
✅ hono105026
✅ nextjs-turbopack12902
✅ nextjs-webpack12902
✅ nitro105026
✅ nuxt105026
✅ sveltekit12407
✅ vite105026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13100
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable106025
✅ e2e-local-dev-tanstack-start-106025
✅ e2e-local-postgres-nest-stable106025
✅ e2e-local-postgres-tanstack-start-106025
✅ e2e-local-prod-nest-stable106025
✅ e2e-local-prod-tanstack-start-106025
✅ e2e-vercel-prod-tanstack-start105026

📋 View full workflow run

@karthikscale3karthikscale3 changed the title docs(cookbook): clarify tools are not individually durable in streamText patternFix cookbook pattern for AI SDKMay 22, 2026
@karthikscale3karthikscale3 changed the title Fix cookbook pattern for AI SDK[Docs] Fix cookbook pattern for AI SDKMay 22, 2026
@karthikscale3
karthikscale3force-pushed the karthik/cookbook-ai-sdk-tools-not-durable branch from 027316f to c661ac8CompareMay 22, 2026 23:56
@vercel

vercelBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

@karthikscale3
karthikscale3 deleted the karthik/cookbook-ai-sdk-tools-not-durable branch May 22, 2026 23:57
@karthikscale3
karthikscale3 restored the karthik/cookbook-ai-sdk-tools-not-durable branch May 22, 2026 23:59
Comment threaddocs/content/docs/v4/cookbook/integrations/ai-sdk.mdx Outdated

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM assuming this was tested, some wording nits

Comment threaddocs/content/docs/v4/cookbook/integrations/ai-sdk.mdx Outdated
karthikscale3and others added 4 commits May 25, 2026 09:59
The AI SDK cookbook entry presented `streamText` inside a `"use step"`
turn function with tools also marked `"use step"`. That implies tools
are individually durable, but the `"use step"` directive is a no-op
when called from another step — so tools run as plain inline functions
inside `runTurn`, and the durability boundary is the entire turn.
Changes:
- Remove the `"use step"` directive from tool implementations in the
workflow code sample and add an explanatory comment.
- Update the frontmatter summary and intro paragraph to drop the
inaccurate "tools remain durable steps" claim.
- Add a "Tools are not individually durable" entry to Pitfalls with
consequences and mitigations (idempotency or `DurableAgent`).
- Add a `runTurn` durability-boundary bullet to "How it works".
- Add a "Tool call durability" row to the `streamText` vs `DurableAgent`
comparison table.
- Fix two misleading Key APIs bullets that claimed tools wrap
`"use step"` functions and that `"use step"` makes tool executions
durable.
Applied identically to both v4 and v5 cookbook entries.
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Karthik Kalyan <105607645+karthikscale3@users.noreply.github.com>
The callout and comparison table incorrectly claimed DurableAgent lacks stopWhen, structured output, and onStepFinish — update them to reflect the actual implementation and clarify when raw streamText() is still appropriate.
Co-authored-by: Cursor <cursoragent@cursor.com>
Address review feedback: the inline comment should explain how tools run inside runTurn without referencing removed "use step" directives.
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

No backport to stable for ff167d0 (AI decision).

This commit only modifies docs/content/docs/v4/cookbook/integrations/ai-sdk.mdx and docs/content/docs/v5/cookbook/integrations/ai-sdk.mdx. Verified via git ls-tree origin/stable that the v4/v5 versioned docs directory structure (and the cookbook/integrations/ai-sdk.mdx files) does not exist on stable — stable has a flat docs/content/docs/ layout. There is nothing to backport.

To override, re-run the Backport to stable workflow manually via workflow_dispatch and paste this commit SHA into the ref input:

ff167d005d7b13163fe5819e132266afe3501fa4

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

@karthikscale3@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
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;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
[Docs] Fix cookbook pattern for AI SDK by karthikscale3 · Pull Request #2099 · vercel/workflow · GitHub
Skip to content

[Docs] Fix cookbook pattern for AI SDK - #2099

Merged
karthikscale3 merged 4 commits into
mainfrom
karthik/cookbook-ai-sdk-tools-not-durable
May 25, 2026
Merged

[Docs] Fix cookbook pattern for AI SDK#2099
karthikscale3 merged 4 commits into
mainfrom
karthik/cookbook-ai-sdk-tools-not-durable

Conversation

@karthikscale3

@karthikscale3karthikscale3 commented May 22, 2026

Copy link
Copy Markdown
Contributor

Summary

The AI SDK cookbook entry (docs/content/docs/v{4,5}/cookbook/integrations/ai-sdk.mdx) shows streamText inside a "use step" turn function with the example tools (lookupOrder, processRefund) also marked "use step". That presentation implies tool calls are individually durable, but per Workflows & Steps the "use step" directive is a no-op when called from another step. So in this pattern tools run as plain inline functions inside runTurn, and the durability boundary is the entire turn — if anything in the turn throws, every tool call that already ran is replayed.

This PR fixes the cookbook to reflect that reality and gives readers an explicit migration path (idempotent tools or DurableAgent).

Changes (applied identically to v4 and v5)

  • Removed the "use step" directive from lookupOrder and processRefund in the workflow code sample, with an inline comment explaining why.
  • Updated the frontmatter summary and intro paragraph: dropped the inaccurate "tools remain durable steps" claim; explicitly call out the per-turn durability boundary.
  • Added a new Tools are not individually durable entry to Pitfalls covering:
    • The retry unit is runTurn, not the tool call.
    • A side-effectful tool (e.g. processRefund) can run multiple times if the turn retries.
    • Mitigations: idempotent tool implementations, or DurableAgent (each tool call becomes its own durable step).
  • Added a runTurn durability-boundary bullet to How it works.
  • Added a Tool call durability row to the streamText vs DurableAgent table.
  • Rewrote two misleading Key APIs bullets:
    • tool() no longer claims tools wrap "use step" functions / are replayed from the log.
    • "use step" is now described as applied to runTurn, not to "tool executions".
  • Corrected outdated DurableAgent guidance after verifying the implementation:
    • Callout no longer claims DurableAgent lacks stopWhen, structured output, or onStepFinish — it reimplements the same agent loop and already supports those options.
    • Rewrote When to use streamText directly to focus on the raw AI SDK API, per-turn durability boundaries, and custom multi-turn orchestration (hook loops, sliceUntilFinish).
    • Updated the streamText vs DurableAgent comparison table: both support stopWhen/prepareStep; DurableAgent supports experimental_output and step callbacks (onStepFinish, onFinish, etc.); noted onChunk as the main gap.

Test plan

  • Visual check of the rendered /cookbook/integrations/ai-sdk page on v4 and v5.
  • Confirm the new in-page anchor (#tools-are-not-individually-durable) resolves from the intro paragraph, How it works, and Key APIs cross-links.
  • Confirm the code sample still typechecks in the docs typecheck pipeline.

Made with Cursor

@karthikscale3
karthikscale3 requested a review from a team as a code ownerMay 22, 2026 23:54
@changeset-bot

changeset-botBot commented May 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3270975

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@github-actions

github-actionsBot commented May 22, 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
💻 Local🥇 Express0.031s (-30.5% 🟢)1.006s (~)0.975s101.00x
💻 LocalNitro0.033s (-23.7% 🟢)1.006s (~)0.973s101.07x
🐘 PostgresNitro0.042s (-55.7% 🟢)1.010s (-3.1%)0.968s101.37x
💻 LocalNext.js (Turbopack)0.048s1.006s0.958s101.55x
🐘 PostgresExpress0.053s (-8.1% 🟢)1.014s (~)0.960s101.73x
🐘 PostgresNext.js (Turbopack)0.056s1.011s0.955s101.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.279s (-31.9% 🟢)2.044s (-18.6% 🟢)1.764s101.00x
▲ VercelExpress0.296s (+25.6% 🔺)2.469s (+15.6% 🔺)2.173s101.06x
▲ VercelNext.js (Turbopack)0.304s (+21.0% 🔺)2.151s (-7.8% 🟢)1.847s101.09x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.075s (-4.4%)2.006s (~)0.931s101.00x
💻 LocalNitro1.076s (-4.9%)2.006s (~)0.930s101.00x
🐘 PostgresNitro1.079s (-5.4% 🟢)2.008s (~)0.929s101.00x
🐘 PostgresExpress1.083s (-5.5% 🟢)2.009s (~)0.926s101.01x
💻 LocalNext.js (Turbopack)1.112s2.006s0.895s101.03x
🐘 PostgresNext.js (Turbopack)1.120s2.009s0.890s101.04x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.585s (-22.1% 🟢)3.301s (-13.8% 🟢)1.716s101.00x
▲ VercelNitro1.677s (-56.9% 🟢)3.257s (-44.9% 🟢)1.579s101.06x
▲ VercelExpress1.731s (-7.7% 🟢)3.615s (-5.1% 🟢)1.884s101.09x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro10.423s (-4.1%)11.015s (~)0.592s31.00x
💻 LocalExpress10.423s (-4.6%)11.021s (~)0.598s31.00x
💻 LocalNitro10.425s (-4.8%)11.021s (~)0.596s31.00x
🐘 PostgresExpress10.445s (-4.7%)11.017s (~)0.572s31.00x
💻 LocalNext.js (Turbopack)10.652s11.020s0.367s31.02x
🐘 PostgresNext.js (Turbopack)10.694s11.020s0.326s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro13.232s (-44.2% 🟢)15.258s (-39.2% 🟢)2.026s21.00x
▲ VercelNext.js (Turbopack)13.769s (-20.5% 🟢)15.278s (-21.2% 🟢)1.509s21.04x
▲ VercelExpress16.197s (-4.6%)17.973s (-10.2% 🟢)1.777s21.22x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro13.457s (-7.8% 🟢)14.018s (-6.7% 🟢)0.561s51.00x
🐘 PostgresExpress13.492s (-7.5% 🟢)14.017s (-6.7% 🟢)0.525s51.00x
💻 LocalExpress13.498s (-9.8% 🟢)14.027s (-6.7% 🟢)0.529s51.00x
💻 LocalNitro13.506s (-10.3% 🟢)14.029s (-12.5% 🟢)0.523s51.00x
💻 LocalNext.js (Turbopack)14.038s15.029s0.991s41.04x
🐘 PostgresNext.js (Turbopack)14.121s15.019s0.898s41.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro21.119s (-67.2% 🟢)22.768s (-65.8% 🟢)1.649s31.00x
▲ VercelExpress21.128s (-58.0% 🟢)22.810s (-56.6% 🟢)1.683s31.00x
▲ VercelNext.js (Turbopack)21.868s (-58.4% 🟢)22.948s (-58.0% 🟢)1.080s31.04x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express11.935s (-28.1% 🟢)12.022s (-29.4% 🟢)0.087s81.00x
🐘 PostgresExpress11.955s (-14.7% 🟢)12.142s (-16.8% 🟢)0.187s81.00x
💻 LocalNitro11.982s (-28.6% 🟢)12.147s (-28.7% 🟢)0.165s81.00x
🐘 PostgresNitro11.987s (-14.2% 🟢)12.393s (-13.4% 🟢)0.406s81.00x
💻 LocalNext.js (Turbopack)12.945s13.023s0.078s71.08x
🐘 PostgresNext.js (Turbopack)13.222s14.015s0.794s71.11x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express32.014s (-73.6% 🟢)33.895s (-72.6% 🟢)1.881s31.00x
▲ VercelNext.js (Turbopack)32.210s (-91.8% 🟢)33.857s (-91.4% 🟢)1.647s31.01x
▲ VercelNitro32.225s (-92.4% 🟢)34.212s (-91.9% 🟢)1.987s31.01x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.141s (-10.5% 🟢)2.006s (~)0.865s151.00x
🐘 PostgresExpress1.150s (-8.7% 🟢)2.007s (~)0.857s151.01x
💻 LocalExpress1.176s (-21.0% 🟢)2.007s (~)0.831s151.03x
💻 LocalNitro1.185s (-27.4% 🟢)2.007s (-3.2%)0.822s151.04x
🐘 PostgresNext.js (Turbopack)1.198s2.007s0.809s151.05x
💻 LocalNext.js (Turbopack)1.279s2.006s0.728s151.12x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.551s (-10.8% 🟢)4.135s (-10.6% 🟢)1.584s81.00x
▲ VercelNext.js (Turbopack)2.592s (-23.7% 🟢)4.220s (-14.5% 🟢)1.628s81.02x
▲ VercelNitro2.674s (-5.1% 🟢)4.354s (+0.7%)1.680s71.05x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.191s (-49.3% 🟢)2.006s (-33.3% 🟢)0.815s151.00x
🐘 PostgresExpress1.212s (-48.7% 🟢)2.007s (-33.3% 🟢)0.796s151.02x
🐘 PostgresNext.js (Turbopack)1.339s2.006s0.667s151.12x
💻 LocalNitro1.771s (-43.7% 🟢)2.006s (-48.4% 🟢)0.236s151.49x
💻 LocalNext.js (Turbopack)1.799s2.073s0.274s151.51x
💻 LocalExpress1.891s (-35.9% 🟢)2.142s (-38.0% 🟢)0.250s151.59x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.385s (-16.5% 🟢)4.730s (-20.1% 🟢)1.345s71.00x
▲ VercelExpress3.711s (+2.5%)5.633s (+10.2% 🔺)1.922s61.10x
▲ VercelNext.js (Turbopack)4.474s (-37.0% 🟢)5.883s (-33.9% 🟢)1.408s61.32x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.301s (-62.6% 🟢)2.007s (-49.9% 🟢)0.707s151.00x
🐘 PostgresExpress1.323s (-62.0% 🟢)2.007s (-49.9% 🟢)0.684s151.02x
🐘 PostgresNext.js (Turbopack)1.595s2.007s0.412s151.23x
💻 LocalNext.js (Turbopack)4.947s5.344s0.397s63.80x
💻 LocalNitro5.412s (-35.2% 🟢)5.847s (-35.2% 🟢)0.435s64.16x
💻 LocalExpress5.621s (-32.6% 🟢)6.013s (-33.4% 🟢)0.391s54.32x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.258s (+24.0% 🔺)7.088s (+15.7% 🔺)1.831s51.00x
▲ VercelNext.js (Turbopack)6.447s (-27.7% 🟢)7.992s (-27.1% 🟢)1.544s41.23x
▲ VercelNitro6.804s (+93.0% 🔺)8.588s (+55.2% 🔺)1.784s41.29x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.131s (-10.0% 🟢)2.007s (~)0.876s151.00x
🐘 PostgresExpress1.158s (-7.9% 🟢)2.008s (~)0.850s151.02x
🐘 PostgresNext.js (Turbopack)1.198s2.006s0.808s151.06x
💻 LocalNext.js (Turbopack)1.303s2.006s0.703s151.15x
💻 LocalNitro1.410s (-24.4% 🟢)2.006s (-14.3% 🟢)0.595s151.25x
💻 LocalExpress1.460s (-22.9% 🟢)2.006s (-15.1% 🟢)0.546s151.29x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.421s (-17.4% 🟢)3.689s (-20.5% 🟢)1.268s91.00x
▲ VercelNitro2.507s (+2.0%)3.960s (-5.0% 🟢)1.452s81.04x
▲ VercelExpress2.626s (+1.7%)4.498s (+3.4%)1.872s71.08x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.182s (-49.5% 🟢)2.007s (-33.3% 🟢)0.825s151.00x
🐘 PostgresExpress1.212s (-48.2% 🟢)2.009s (-33.3% 🟢)0.797s151.03x
🐘 PostgresNext.js (Turbopack)1.353s2.008s0.654s151.14x
💻 LocalNext.js (Turbopack)2.024s2.674s0.650s121.71x
💻 LocalExpress2.077s (-33.7% 🟢)2.508s (-33.3% 🟢)0.431s121.76x
💻 LocalNitro2.081s (-32.1% 🟢)2.507s (-35.5% 🟢)0.427s121.76x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.363s (+5.3% 🔺)5.109s (+6.6% 🔺)1.746s61.00x
▲ VercelNitro3.543s (+9.6% 🔺)4.722s (-7.0% 🟢)1.179s71.05x
▲ VercelNext.js (Turbopack)3.827s (+21.8% 🔺)5.241s (+15.9% 🔺)1.414s61.14x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.288s (-63.0% 🟢)2.007s (-49.9% 🟢)0.719s151.00x
🐘 PostgresExpress1.318s (-62.3% 🟢)2.008s (-49.9% 🟢)0.690s151.02x
🐘 PostgresNext.js (Turbopack)1.603s2.010s0.408s151.24x
💻 LocalNext.js (Turbopack)5.253s6.013s0.760s54.08x
💻 LocalNitro5.567s (-39.1% 🟢)6.014s (-40.0% 🟢)0.447s54.32x
💻 LocalExpress6.097s (-30.7% 🟢)6.415s (-30.8% 🟢)0.318s54.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.083s (-20.8% 🟢)6.959s (-14.9% 🟢)1.876s51.00x
▲ VercelNitro5.184s (+1.8%)7.046s (+3.4%)1.862s51.02x
▲ VercelNext.js (Turbopack)5.777s (-14.5% 🟢)7.101s (-16.9% 🟢)1.323s51.14x

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

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.442s (-46.1% 🟢)1.006s (~)0.564s601.00x
💻 LocalExpress0.484s (-50.8% 🟢)1.004s (-6.7% 🟢)0.520s601.10x
🐘 PostgresExpress0.486s (-42.1% 🟢)1.024s (~)0.538s591.10x
💻 LocalNitro0.525s (-46.5% 🟢)1.005s (-8.1% 🟢)0.480s601.19x
🐘 PostgresNext.js (Turbopack)0.682s1.006s0.325s601.54x
💻 LocalNext.js (Turbopack)0.705s1.005s0.300s601.59x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.886s (-74.3% 🟢)6.422s (-69.9% 🟢)1.536s101.00x
▲ VercelNitro5.443s (-75.3% 🟢)6.976s (-71.0% 🟢)1.533s91.11x
▲ VercelNext.js (Turbopack)5.491s (-62.1% 🟢)6.854s (-57.4% 🟢)1.362s91.12x

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

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.031s (-47.8% 🟢)1.586s (-29.8% 🟢)0.555s571.00x
🐘 PostgresNitro1.053s (-45.4% 🟢)1.603s (-23.7% 🟢)0.550s571.02x
💻 LocalExpress1.209s (-59.9% 🟢)2.006s (-44.1% 🟢)0.797s451.17x
💻 LocalNitro1.225s (-59.6% 🟢)2.006s (-46.6% 🟢)0.781s451.19x
🐘 PostgresNext.js (Turbopack)1.631s2.009s0.377s451.58x
💻 LocalNext.js (Turbopack)1.767s2.006s0.239s451.71x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.045s (-73.8% 🟢)14.636s (-71.7% 🟢)1.592s71.00x
▲ VercelExpress13.474s (-61.0% 🟢)15.249s (-58.6% 🟢)1.776s61.03x
▲ VercelNitro13.618s (-65.5% 🟢)15.326s (-62.9% 🟢)1.708s61.04x

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

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.009s (-51.0% 🟢)2.407s (-47.7% 🟢)0.398s501.00x
🐘 PostgresExpress2.175s (-45.5% 🟢)2.758s (-36.9% 🟢)0.583s441.08x
💻 LocalExpress2.767s (-70.0% 🟢)3.032s (-69.7% 🟢)0.265s401.38x
💻 LocalNitro2.796s (-69.9% 🟢)3.033s (-69.7% 🟢)0.237s401.39x
🐘 PostgresNext.js (Turbopack)3.182s4.009s0.827s301.58x
💻 LocalNext.js (Turbopack)3.712s4.008s0.296s301.85x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express27.669s (-78.7% 🟢)29.488s (-77.7% 🟢)1.819s51.00x
▲ VercelNitro29.741s (-69.3% 🟢)31.477s (-68.0% 🟢)1.736s41.07x
▲ VercelNext.js (Turbopack)31.048s (-71.0% 🟢)32.776s (-69.9% 🟢)1.727s41.12x

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

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.163s (-42.6% 🟢)1.005s (~)0.843s601.00x
🐘 PostgresExpress0.171s (-39.4% 🟢)1.006s (~)0.835s601.05x
🐘 PostgresNext.js (Turbopack)0.229s1.006s0.777s601.41x
💻 LocalNitro0.412s (-31.8% 🟢)1.004s (-1.7%)0.592s602.54x
💻 LocalExpress0.419s (-25.2% 🟢)1.004s (~)0.585s602.58x
💻 LocalNext.js (Turbopack)0.510s1.004s0.494s603.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.414s (+45.3% 🔺)4.251s (+26.9% 🔺)1.838s161.00x
▲ VercelExpress2.559s (+30.9% 🔺)4.101s (+12.7% 🔺)1.542s151.06x
▲ VercelNext.js (Turbopack)2.607s (+28.9% 🔺)3.926s (+3.5%)1.320s161.08x

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

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.282s (-43.3% 🟢)1.005s (~)0.724s901.00x
🐘 PostgresExpress0.306s (-39.9% 🟢)1.007s (~)0.701s901.09x
🐘 PostgresNext.js (Turbopack)0.449s1.007s0.558s901.59x
💻 LocalNitro2.140s (-15.7% 🟢)2.852s (-5.2% 🟢)0.712s327.60x
💻 LocalExpress2.162s (-14.0% 🟢)2.943s (-2.2%)0.781s317.68x
💻 LocalNext.js (Turbopack)2.219s2.944s0.726s317.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.743s (+55.7% 🔺)6.348s (+32.0% 🔺)1.604s151.00x
▲ VercelNitro5.316s (+64.8% 🔺)6.877s (+42.6% 🔺)1.561s141.12x
▲ VercelNext.js (Turbopack)5.355s (+51.5% 🔺)6.768s (+30.3% 🔺)1.413s141.13x

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

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.557s (-29.5% 🟢)1.005s (~)0.448s1201.00x
🐘 PostgresExpress0.626s (-23.6% 🟢)1.006s (-1.1%)0.380s1201.12x
🐘 PostgresNext.js (Turbopack)0.919s1.207s0.288s1001.65x
💻 LocalExpress10.512s (-6.1% 🟢)11.119s (-6.9% 🟢)0.607s1118.87x
💻 LocalNitro10.566s (-5.6% 🟢)11.119s (-4.7%)0.553s1118.97x
💻 LocalNext.js (Turbopack)10.761s11.481s0.720s1119.32x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro14.165s (+83.4% 🔺)15.767s (+67.7% 🔺)1.603s91.00x
▲ VercelNext.js (Turbopack)14.811s (+43.4% 🔺)16.301s (+32.7% 🔺)1.490s81.05x
▲ VercelExpress16.474s (+122.0% 🔺)18.379s (+98.8% 🔺)1.905s71.16x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.135s (+453.5% 🔺)2.002s (+100.3% 🔺)0.001s (-13.3% 🟢)2.009s (+98.7% 🔺)0.874s101.00x
💻 LocalExpress1.135s (+470.1% 🔺)2.006s (+99.7% 🔺)0.012s (+2.5%)2.020s (+98.5% 🔺)0.885s101.00x
🐘 PostgresExpress1.141s (+456.3% 🔺)2.001s (+100.4% 🔺)0.001s (-25.0% 🟢)2.011s (+98.9% 🔺)0.871s101.01x
💻 LocalNitro1.142s (+434.4% 🔺)2.005s (+99.6% 🔺)0.013s (+0.8%)2.020s (+98.3% 🔺)0.878s101.01x
💻 LocalNext.js (Turbopack)1.170s2.004s0.012s2.019s0.849s101.03x
🐘 PostgresNext.js (Turbopack)1.195s2.002s0.002s2.011s0.815s101.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.151s (-68.6% 🟢)2.881s (-66.7% 🟢)2.305s (+264.7% 🔺)5.547s (-43.3% 🟢)3.397s101.00x
▲ VercelNitro2.196s (-42.7% 🟢)2.985s (-43.4% 🟢)2.267s (+205.5% 🔺)5.704s (-12.0% 🟢)3.508s101.02x
▲ VercelExpress2.949s (+17.7% 🔺)4.011s (-1.9%)14.047s (+1362.0% 🔺)18.574s (+232.2% 🔺)15.625s101.37x

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

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.498s (+140.0% 🔺)2.007s (+99.3% 🔺)0.003s (-19.4% 🟢)2.022s (+97.8% 🔺)0.524s301.00x
🐘 PostgresExpress1.520s (+141.3% 🔺)2.006s (+99.3% 🔺)0.004s (+4.4%)2.025s (+98.0% 🔺)0.505s301.01x
💻 LocalNitro1.555s (+85.4% 🔺)2.013s (+98.9% 🔺)0.011s (+16.0% 🔺)2.026s (+81.5% 🔺)0.471s301.04x
💻 LocalNext.js (Turbopack)1.657s2.014s0.010s2.026s0.369s301.11x
🐘 PostgresNext.js (Turbopack)1.712s2.010s0.004s2.028s0.316s301.14x
💻 LocalExpress1.739s (+129.7% 🔺)2.012s (+95.6% 🔺)0.011s (+13.9% 🔺)2.198s (+111.4% 🔺)0.459s291.16x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.010s (-64.5% 🟢)6.776s (-62.9% 🟢)0.173s (-18.3% 🟢)7.342s (-61.2% 🟢)1.331s91.00x
▲ VercelNitro6.068s (-79.4% 🟢)7.063s (-77.1% 🟢)0.275s (+145.2% 🔺)7.733s (-75.7% 🟢)1.664s81.01x
▲ VercelExpress6.459s (-0.7%)7.852s (-2.0%)0.234s (-42.7% 🟢)8.609s (-2.6%)2.149s71.07x

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

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.610s (-37.1% 🟢)1.016s (-18.6% 🟢)0.000s (-58.6% 🟢)1.038s (-17.5% 🟢)0.428s581.00x
🐘 PostgresExpress0.695s (-27.6% 🟢)1.052s (-17.7% 🟢)0.000s (+101.8% 🔺)1.064s (-18.5% 🟢)0.369s571.14x
🐘 PostgresNext.js (Turbopack)0.768s1.053s0.000s1.059s0.292s571.26x
💻 LocalExpress1.370s (+11.8% 🔺)2.015s (~)0.000s (-50.0% 🟢)2.017s (~)0.647s302.25x
💻 LocalNext.js (Turbopack)1.402s2.013s0.000s2.016s0.615s302.30x
💻 LocalNitro1.431s (+17.0% 🔺)2.016s (~)0.000s (-66.7% 🟢)2.018s (~)0.587s302.35x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.669s (+20.3% 🔺)4.647s (+5.8% 🔺)0.000s (-100.0% 🟢)5.059s (+5.2% 🔺)1.389s121.00x
▲ VercelExpress3.790s (+1.3%)5.277s (+3.4%)0.000s (-100.0% 🟢)5.812s (+5.1% 🔺)2.022s111.03x
▲ VercelNext.js (Turbopack)3.849s (-62.2% 🟢)4.996s (-56.6% 🟢)0.000s (+Infinity% 🔺)5.474s (-54.6% 🟢)1.625s111.05x

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

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.254s (-30.0% 🟢)1.847s (-13.7% 🟢)0.000s (+154.5% 🔺)1.872s (-13.9% 🟢)0.617s331.00x
🐘 PostgresExpress1.325s (-25.2% 🟢)2.066s (-5.1% 🟢)0.000s (NaN%)2.076s (-5.6% 🟢)0.751s301.06x
🐘 PostgresNext.js (Turbopack)1.530s2.106s0.000s2.114s0.585s291.22x
💻 LocalNext.js (Turbopack)2.579s3.187s0.000s3.190s0.611s192.06x
💻 LocalExpress3.164s (-8.7% 🟢)4.029s (~)0.001s (-33.3% 🟢)4.032s (~)0.867s152.52x
💻 LocalNitro3.346s (-1.2%)3.968s (-1.6%)0.001s (+28.9% 🔺)3.971s (-1.6%)0.625s162.67x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.599s (~)6.937s (-0.6%)0.000s (-11.1% 🟢)7.371s (-2.2%)1.772s91.00x
▲ VercelExpress7.865s (+71.5% 🔺)9.206s (+52.9% 🔺)0.000s (+Infinity% 🔺)9.666s (+49.7% 🔺)1.801s71.40x
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress12/21
🐘 PostgresNitro19/21
▲ VercelExpress8/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres15/21
Next.js (Turbopack)🐘 Postgres14/21
Nitro🐘 Postgres18/21
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
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production122202191441
✅ 💻 Local Development161502191834
✅ 📦 Local Production161502191834
✅ 🐘 Local Postgres161502191834
✅ 🪟 Windows13100131
✅ 📋 Other7410176917
Total6939010527991

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro105026
✅ example105026
✅ express105026
✅ fastify105026
✅ hono105026
✅ nextjs-turbopack12902
✅ nextjs-webpack12902
✅ nitro105026
✅ nuxt105026
✅ sveltekit12407
✅ vite105026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13100
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable106025
✅ e2e-local-dev-tanstack-start-106025
✅ e2e-local-postgres-nest-stable106025
✅ e2e-local-postgres-tanstack-start-106025
✅ e2e-local-prod-nest-stable106025
✅ e2e-local-prod-tanstack-start-106025
✅ e2e-vercel-prod-tanstack-start105026

📋 View full workflow run

@karthikscale3karthikscale3 changed the title docs(cookbook): clarify tools are not individually durable in streamText patternFix cookbook pattern for AI SDKMay 22, 2026
@karthikscale3karthikscale3 changed the title Fix cookbook pattern for AI SDK[Docs] Fix cookbook pattern for AI SDKMay 22, 2026
@karthikscale3
karthikscale3force-pushed the karthik/cookbook-ai-sdk-tools-not-durable branch from 027316f to c661ac8CompareMay 22, 2026 23:56
@vercel

vercelBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

@karthikscale3
karthikscale3 deleted the karthik/cookbook-ai-sdk-tools-not-durable branch May 22, 2026 23:57
@karthikscale3
karthikscale3 restored the karthik/cookbook-ai-sdk-tools-not-durable branch May 22, 2026 23:59
Comment threaddocs/content/docs/v4/cookbook/integrations/ai-sdk.mdx Outdated

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM assuming this was tested, some wording nits

Comment threaddocs/content/docs/v4/cookbook/integrations/ai-sdk.mdx Outdated
karthikscale3and others added 4 commits May 25, 2026 09:59
The AI SDK cookbook entry presented `streamText` inside a `"use step"`
turn function with tools also marked `"use step"`. That implies tools
are individually durable, but the `"use step"` directive is a no-op
when called from another step — so tools run as plain inline functions
inside `runTurn`, and the durability boundary is the entire turn.
Changes:
- Remove the `"use step"` directive from tool implementations in the
workflow code sample and add an explanatory comment.
- Update the frontmatter summary and intro paragraph to drop the
inaccurate "tools remain durable steps" claim.
- Add a "Tools are not individually durable" entry to Pitfalls with
consequences and mitigations (idempotency or `DurableAgent`).
- Add a `runTurn` durability-boundary bullet to "How it works".
- Add a "Tool call durability" row to the `streamText` vs `DurableAgent`
comparison table.
- Fix two misleading Key APIs bullets that claimed tools wrap
`"use step"` functions and that `"use step"` makes tool executions
durable.
Applied identically to both v4 and v5 cookbook entries.
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Karthik Kalyan <105607645+karthikscale3@users.noreply.github.com>
The callout and comparison table incorrectly claimed DurableAgent lacks stopWhen, structured output, and onStepFinish — update them to reflect the actual implementation and clarify when raw streamText() is still appropriate.
Co-authored-by: Cursor <cursoragent@cursor.com>
Address review feedback: the inline comment should explain how tools run inside runTurn without referencing removed "use step" directives.
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

No backport to stable for ff167d0 (AI decision).

This commit only modifies docs/content/docs/v4/cookbook/integrations/ai-sdk.mdx and docs/content/docs/v5/cookbook/integrations/ai-sdk.mdx. Verified via git ls-tree origin/stable that the v4/v5 versioned docs directory structure (and the cookbook/integrations/ai-sdk.mdx files) does not exist on stable — stable has a flat docs/content/docs/ layout. There is nothing to backport.

To override, re-run the Backport to stable workflow manually via workflow_dispatch and paste this commit SHA into the ref input:

ff167d005d7b13163fe5819e132266afe3501fa4

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

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

[Docs] Fix cookbook pattern for AI SDK - #2099

Merged
karthikscale3 merged 4 commits into
mainfrom
karthik/cookbook-ai-sdk-tools-not-durable
May 25, 2026
Merged

[Docs] Fix cookbook pattern for AI SDK#2099
karthikscale3 merged 4 commits into
mainfrom
karthik/cookbook-ai-sdk-tools-not-durable

Conversation

@karthikscale3

@karthikscale3karthikscale3 commented May 22, 2026

Copy link
Copy Markdown
Contributor

Summary

The AI SDK cookbook entry (docs/content/docs/v{4,5}/cookbook/integrations/ai-sdk.mdx) shows streamText inside a "use step" turn function with the example tools (lookupOrder, processRefund) also marked "use step". That presentation implies tool calls are individually durable, but per Workflows & Steps the "use step" directive is a no-op when called from another step. So in this pattern tools run as plain inline functions inside runTurn, and the durability boundary is the entire turn — if anything in the turn throws, every tool call that already ran is replayed.

This PR fixes the cookbook to reflect that reality and gives readers an explicit migration path (idempotent tools or DurableAgent).

Changes (applied identically to v4 and v5)

  • Removed the "use step" directive from lookupOrder and processRefund in the workflow code sample, with an inline comment explaining why.
  • Updated the frontmatter summary and intro paragraph: dropped the inaccurate "tools remain durable steps" claim; explicitly call out the per-turn durability boundary.
  • Added a new Tools are not individually durable entry to Pitfalls covering:
    • The retry unit is runTurn, not the tool call.
    • A side-effectful tool (e.g. processRefund) can run multiple times if the turn retries.
    • Mitigations: idempotent tool implementations, or DurableAgent (each tool call becomes its own durable step).
  • Added a runTurn durability-boundary bullet to How it works.
  • Added a Tool call durability row to the streamText vs DurableAgent table.
  • Rewrote two misleading Key APIs bullets:
    • tool() no longer claims tools wrap "use step" functions / are replayed from the log.
    • "use step" is now described as applied to runTurn, not to "tool executions".
  • Corrected outdated DurableAgent guidance after verifying the implementation:
    • Callout no longer claims DurableAgent lacks stopWhen, structured output, or onStepFinish — it reimplements the same agent loop and already supports those options.
    • Rewrote When to use streamText directly to focus on the raw AI SDK API, per-turn durability boundaries, and custom multi-turn orchestration (hook loops, sliceUntilFinish).
    • Updated the streamText vs DurableAgent comparison table: both support stopWhen/prepareStep; DurableAgent supports experimental_output and step callbacks (onStepFinish, onFinish, etc.); noted onChunk as the main gap.

Test plan

  • Visual check of the rendered /cookbook/integrations/ai-sdk page on v4 and v5.
  • Confirm the new in-page anchor (#tools-are-not-individually-durable) resolves from the intro paragraph, How it works, and Key APIs cross-links.
  • Confirm the code sample still typechecks in the docs typecheck pipeline.

Made with Cursor

@karthikscale3
karthikscale3 requested a review from a team as a code ownerMay 22, 2026 23:54
@changeset-bot

changeset-botBot commented May 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3270975

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@github-actions

github-actionsBot commented May 22, 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
💻 Local🥇 Express0.031s (-30.5% 🟢)1.006s (~)0.975s101.00x
💻 LocalNitro0.033s (-23.7% 🟢)1.006s (~)0.973s101.07x
🐘 PostgresNitro0.042s (-55.7% 🟢)1.010s (-3.1%)0.968s101.37x
💻 LocalNext.js (Turbopack)0.048s1.006s0.958s101.55x
🐘 PostgresExpress0.053s (-8.1% 🟢)1.014s (~)0.960s101.73x
🐘 PostgresNext.js (Turbopack)0.056s1.011s0.955s101.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.279s (-31.9% 🟢)2.044s (-18.6% 🟢)1.764s101.00x
▲ VercelExpress0.296s (+25.6% 🔺)2.469s (+15.6% 🔺)2.173s101.06x
▲ VercelNext.js (Turbopack)0.304s (+21.0% 🔺)2.151s (-7.8% 🟢)1.847s101.09x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.075s (-4.4%)2.006s (~)0.931s101.00x
💻 LocalNitro1.076s (-4.9%)2.006s (~)0.930s101.00x
🐘 PostgresNitro1.079s (-5.4% 🟢)2.008s (~)0.929s101.00x
🐘 PostgresExpress1.083s (-5.5% 🟢)2.009s (~)0.926s101.01x
💻 LocalNext.js (Turbopack)1.112s2.006s0.895s101.03x
🐘 PostgresNext.js (Turbopack)1.120s2.009s0.890s101.04x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.585s (-22.1% 🟢)3.301s (-13.8% 🟢)1.716s101.00x
▲ VercelNitro1.677s (-56.9% 🟢)3.257s (-44.9% 🟢)1.579s101.06x
▲ VercelExpress1.731s (-7.7% 🟢)3.615s (-5.1% 🟢)1.884s101.09x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro10.423s (-4.1%)11.015s (~)0.592s31.00x
💻 LocalExpress10.423s (-4.6%)11.021s (~)0.598s31.00x
💻 LocalNitro10.425s (-4.8%)11.021s (~)0.596s31.00x
🐘 PostgresExpress10.445s (-4.7%)11.017s (~)0.572s31.00x
💻 LocalNext.js (Turbopack)10.652s11.020s0.367s31.02x
🐘 PostgresNext.js (Turbopack)10.694s11.020s0.326s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro13.232s (-44.2% 🟢)15.258s (-39.2% 🟢)2.026s21.00x
▲ VercelNext.js (Turbopack)13.769s (-20.5% 🟢)15.278s (-21.2% 🟢)1.509s21.04x
▲ VercelExpress16.197s (-4.6%)17.973s (-10.2% 🟢)1.777s21.22x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro13.457s (-7.8% 🟢)14.018s (-6.7% 🟢)0.561s51.00x
🐘 PostgresExpress13.492s (-7.5% 🟢)14.017s (-6.7% 🟢)0.525s51.00x
💻 LocalExpress13.498s (-9.8% 🟢)14.027s (-6.7% 🟢)0.529s51.00x
💻 LocalNitro13.506s (-10.3% 🟢)14.029s (-12.5% 🟢)0.523s51.00x
💻 LocalNext.js (Turbopack)14.038s15.029s0.991s41.04x
🐘 PostgresNext.js (Turbopack)14.121s15.019s0.898s41.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro21.119s (-67.2% 🟢)22.768s (-65.8% 🟢)1.649s31.00x
▲ VercelExpress21.128s (-58.0% 🟢)22.810s (-56.6% 🟢)1.683s31.00x
▲ VercelNext.js (Turbopack)21.868s (-58.4% 🟢)22.948s (-58.0% 🟢)1.080s31.04x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express11.935s (-28.1% 🟢)12.022s (-29.4% 🟢)0.087s81.00x
🐘 PostgresExpress11.955s (-14.7% 🟢)12.142s (-16.8% 🟢)0.187s81.00x
💻 LocalNitro11.982s (-28.6% 🟢)12.147s (-28.7% 🟢)0.165s81.00x
🐘 PostgresNitro11.987s (-14.2% 🟢)12.393s (-13.4% 🟢)0.406s81.00x
💻 LocalNext.js (Turbopack)12.945s13.023s0.078s71.08x
🐘 PostgresNext.js (Turbopack)13.222s14.015s0.794s71.11x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express32.014s (-73.6% 🟢)33.895s (-72.6% 🟢)1.881s31.00x
▲ VercelNext.js (Turbopack)32.210s (-91.8% 🟢)33.857s (-91.4% 🟢)1.647s31.01x
▲ VercelNitro32.225s (-92.4% 🟢)34.212s (-91.9% 🟢)1.987s31.01x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.141s (-10.5% 🟢)2.006s (~)0.865s151.00x
🐘 PostgresExpress1.150s (-8.7% 🟢)2.007s (~)0.857s151.01x
💻 LocalExpress1.176s (-21.0% 🟢)2.007s (~)0.831s151.03x
💻 LocalNitro1.185s (-27.4% 🟢)2.007s (-3.2%)0.822s151.04x
🐘 PostgresNext.js (Turbopack)1.198s2.007s0.809s151.05x
💻 LocalNext.js (Turbopack)1.279s2.006s0.728s151.12x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.551s (-10.8% 🟢)4.135s (-10.6% 🟢)1.584s81.00x
▲ VercelNext.js (Turbopack)2.592s (-23.7% 🟢)4.220s (-14.5% 🟢)1.628s81.02x
▲ VercelNitro2.674s (-5.1% 🟢)4.354s (+0.7%)1.680s71.05x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.191s (-49.3% 🟢)2.006s (-33.3% 🟢)0.815s151.00x
🐘 PostgresExpress1.212s (-48.7% 🟢)2.007s (-33.3% 🟢)0.796s151.02x
🐘 PostgresNext.js (Turbopack)1.339s2.006s0.667s151.12x
💻 LocalNitro1.771s (-43.7% 🟢)2.006s (-48.4% 🟢)0.236s151.49x
💻 LocalNext.js (Turbopack)1.799s2.073s0.274s151.51x
💻 LocalExpress1.891s (-35.9% 🟢)2.142s (-38.0% 🟢)0.250s151.59x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.385s (-16.5% 🟢)4.730s (-20.1% 🟢)1.345s71.00x
▲ VercelExpress3.711s (+2.5%)5.633s (+10.2% 🔺)1.922s61.10x
▲ VercelNext.js (Turbopack)4.474s (-37.0% 🟢)5.883s (-33.9% 🟢)1.408s61.32x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.301s (-62.6% 🟢)2.007s (-49.9% 🟢)0.707s151.00x
🐘 PostgresExpress1.323s (-62.0% 🟢)2.007s (-49.9% 🟢)0.684s151.02x
🐘 PostgresNext.js (Turbopack)1.595s2.007s0.412s151.23x
💻 LocalNext.js (Turbopack)4.947s5.344s0.397s63.80x
💻 LocalNitro5.412s (-35.2% 🟢)5.847s (-35.2% 🟢)0.435s64.16x
💻 LocalExpress5.621s (-32.6% 🟢)6.013s (-33.4% 🟢)0.391s54.32x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.258s (+24.0% 🔺)7.088s (+15.7% 🔺)1.831s51.00x
▲ VercelNext.js (Turbopack)6.447s (-27.7% 🟢)7.992s (-27.1% 🟢)1.544s41.23x
▲ VercelNitro6.804s (+93.0% 🔺)8.588s (+55.2% 🔺)1.784s41.29x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.131s (-10.0% 🟢)2.007s (~)0.876s151.00x
🐘 PostgresExpress1.158s (-7.9% 🟢)2.008s (~)0.850s151.02x
🐘 PostgresNext.js (Turbopack)1.198s2.006s0.808s151.06x
💻 LocalNext.js (Turbopack)1.303s2.006s0.703s151.15x
💻 LocalNitro1.410s (-24.4% 🟢)2.006s (-14.3% 🟢)0.595s151.25x
💻 LocalExpress1.460s (-22.9% 🟢)2.006s (-15.1% 🟢)0.546s151.29x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.421s (-17.4% 🟢)3.689s (-20.5% 🟢)1.268s91.00x
▲ VercelNitro2.507s (+2.0%)3.960s (-5.0% 🟢)1.452s81.04x
▲ VercelExpress2.626s (+1.7%)4.498s (+3.4%)1.872s71.08x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.182s (-49.5% 🟢)2.007s (-33.3% 🟢)0.825s151.00x
🐘 PostgresExpress1.212s (-48.2% 🟢)2.009s (-33.3% 🟢)0.797s151.03x
🐘 PostgresNext.js (Turbopack)1.353s2.008s0.654s151.14x
💻 LocalNext.js (Turbopack)2.024s2.674s0.650s121.71x
💻 LocalExpress2.077s (-33.7% 🟢)2.508s (-33.3% 🟢)0.431s121.76x
💻 LocalNitro2.081s (-32.1% 🟢)2.507s (-35.5% 🟢)0.427s121.76x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.363s (+5.3% 🔺)5.109s (+6.6% 🔺)1.746s61.00x
▲ VercelNitro3.543s (+9.6% 🔺)4.722s (-7.0% 🟢)1.179s71.05x
▲ VercelNext.js (Turbopack)3.827s (+21.8% 🔺)5.241s (+15.9% 🔺)1.414s61.14x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.288s (-63.0% 🟢)2.007s (-49.9% 🟢)0.719s151.00x
🐘 PostgresExpress1.318s (-62.3% 🟢)2.008s (-49.9% 🟢)0.690s151.02x
🐘 PostgresNext.js (Turbopack)1.603s2.010s0.408s151.24x
💻 LocalNext.js (Turbopack)5.253s6.013s0.760s54.08x
💻 LocalNitro5.567s (-39.1% 🟢)6.014s (-40.0% 🟢)0.447s54.32x
💻 LocalExpress6.097s (-30.7% 🟢)6.415s (-30.8% 🟢)0.318s54.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.083s (-20.8% 🟢)6.959s (-14.9% 🟢)1.876s51.00x
▲ VercelNitro5.184s (+1.8%)7.046s (+3.4%)1.862s51.02x
▲ VercelNext.js (Turbopack)5.777s (-14.5% 🟢)7.101s (-16.9% 🟢)1.323s51.14x

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

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.442s (-46.1% 🟢)1.006s (~)0.564s601.00x
💻 LocalExpress0.484s (-50.8% 🟢)1.004s (-6.7% 🟢)0.520s601.10x
🐘 PostgresExpress0.486s (-42.1% 🟢)1.024s (~)0.538s591.10x
💻 LocalNitro0.525s (-46.5% 🟢)1.005s (-8.1% 🟢)0.480s601.19x
🐘 PostgresNext.js (Turbopack)0.682s1.006s0.325s601.54x
💻 LocalNext.js (Turbopack)0.705s1.005s0.300s601.59x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.886s (-74.3% 🟢)6.422s (-69.9% 🟢)1.536s101.00x
▲ VercelNitro5.443s (-75.3% 🟢)6.976s (-71.0% 🟢)1.533s91.11x
▲ VercelNext.js (Turbopack)5.491s (-62.1% 🟢)6.854s (-57.4% 🟢)1.362s91.12x

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

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.031s (-47.8% 🟢)1.586s (-29.8% 🟢)0.555s571.00x
🐘 PostgresNitro1.053s (-45.4% 🟢)1.603s (-23.7% 🟢)0.550s571.02x
💻 LocalExpress1.209s (-59.9% 🟢)2.006s (-44.1% 🟢)0.797s451.17x
💻 LocalNitro1.225s (-59.6% 🟢)2.006s (-46.6% 🟢)0.781s451.19x
🐘 PostgresNext.js (Turbopack)1.631s2.009s0.377s451.58x
💻 LocalNext.js (Turbopack)1.767s2.006s0.239s451.71x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.045s (-73.8% 🟢)14.636s (-71.7% 🟢)1.592s71.00x
▲ VercelExpress13.474s (-61.0% 🟢)15.249s (-58.6% 🟢)1.776s61.03x
▲ VercelNitro13.618s (-65.5% 🟢)15.326s (-62.9% 🟢)1.708s61.04x

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

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.009s (-51.0% 🟢)2.407s (-47.7% 🟢)0.398s501.00x
🐘 PostgresExpress2.175s (-45.5% 🟢)2.758s (-36.9% 🟢)0.583s441.08x
💻 LocalExpress2.767s (-70.0% 🟢)3.032s (-69.7% 🟢)0.265s401.38x
💻 LocalNitro2.796s (-69.9% 🟢)3.033s (-69.7% 🟢)0.237s401.39x
🐘 PostgresNext.js (Turbopack)3.182s4.009s0.827s301.58x
💻 LocalNext.js (Turbopack)3.712s4.008s0.296s301.85x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express27.669s (-78.7% 🟢)29.488s (-77.7% 🟢)1.819s51.00x
▲ VercelNitro29.741s (-69.3% 🟢)31.477s (-68.0% 🟢)1.736s41.07x
▲ VercelNext.js (Turbopack)31.048s (-71.0% 🟢)32.776s (-69.9% 🟢)1.727s41.12x

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

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.163s (-42.6% 🟢)1.005s (~)0.843s601.00x
🐘 PostgresExpress0.171s (-39.4% 🟢)1.006s (~)0.835s601.05x
🐘 PostgresNext.js (Turbopack)0.229s1.006s0.777s601.41x
💻 LocalNitro0.412s (-31.8% 🟢)1.004s (-1.7%)0.592s602.54x
💻 LocalExpress0.419s (-25.2% 🟢)1.004s (~)0.585s602.58x
💻 LocalNext.js (Turbopack)0.510s1.004s0.494s603.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.414s (+45.3% 🔺)4.251s (+26.9% 🔺)1.838s161.00x
▲ VercelExpress2.559s (+30.9% 🔺)4.101s (+12.7% 🔺)1.542s151.06x
▲ VercelNext.js (Turbopack)2.607s (+28.9% 🔺)3.926s (+3.5%)1.320s161.08x

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

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.282s (-43.3% 🟢)1.005s (~)0.724s901.00x
🐘 PostgresExpress0.306s (-39.9% 🟢)1.007s (~)0.701s901.09x
🐘 PostgresNext.js (Turbopack)0.449s1.007s0.558s901.59x
💻 LocalNitro2.140s (-15.7% 🟢)2.852s (-5.2% 🟢)0.712s327.60x
💻 LocalExpress2.162s (-14.0% 🟢)2.943s (-2.2%)0.781s317.68x
💻 LocalNext.js (Turbopack)2.219s2.944s0.726s317.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.743s (+55.7% 🔺)6.348s (+32.0% 🔺)1.604s151.00x
▲ VercelNitro5.316s (+64.8% 🔺)6.877s (+42.6% 🔺)1.561s141.12x
▲ VercelNext.js (Turbopack)5.355s (+51.5% 🔺)6.768s (+30.3% 🔺)1.413s141.13x

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

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.557s (-29.5% 🟢)1.005s (~)0.448s1201.00x
🐘 PostgresExpress0.626s (-23.6% 🟢)1.006s (-1.1%)0.380s1201.12x
🐘 PostgresNext.js (Turbopack)0.919s1.207s0.288s1001.65x
💻 LocalExpress10.512s (-6.1% 🟢)11.119s (-6.9% 🟢)0.607s1118.87x
💻 LocalNitro10.566s (-5.6% 🟢)11.119s (-4.7%)0.553s1118.97x
💻 LocalNext.js (Turbopack)10.761s11.481s0.720s1119.32x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro14.165s (+83.4% 🔺)15.767s (+67.7% 🔺)1.603s91.00x
▲ VercelNext.js (Turbopack)14.811s (+43.4% 🔺)16.301s (+32.7% 🔺)1.490s81.05x
▲ VercelExpress16.474s (+122.0% 🔺)18.379s (+98.8% 🔺)1.905s71.16x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.135s (+453.5% 🔺)2.002s (+100.3% 🔺)0.001s (-13.3% 🟢)2.009s (+98.7% 🔺)0.874s101.00x
💻 LocalExpress1.135s (+470.1% 🔺)2.006s (+99.7% 🔺)0.012s (+2.5%)2.020s (+98.5% 🔺)0.885s101.00x
🐘 PostgresExpress1.141s (+456.3% 🔺)2.001s (+100.4% 🔺)0.001s (-25.0% 🟢)2.011s (+98.9% 🔺)0.871s101.01x
💻 LocalNitro1.142s (+434.4% 🔺)2.005s (+99.6% 🔺)0.013s (+0.8%)2.020s (+98.3% 🔺)0.878s101.01x
💻 LocalNext.js (Turbopack)1.170s2.004s0.012s2.019s0.849s101.03x
🐘 PostgresNext.js (Turbopack)1.195s2.002s0.002s2.011s0.815s101.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.151s (-68.6% 🟢)2.881s (-66.7% 🟢)2.305s (+264.7% 🔺)5.547s (-43.3% 🟢)3.397s101.00x
▲ VercelNitro2.196s (-42.7% 🟢)2.985s (-43.4% 🟢)2.267s (+205.5% 🔺)5.704s (-12.0% 🟢)3.508s101.02x
▲ VercelExpress2.949s (+17.7% 🔺)4.011s (-1.9%)14.047s (+1362.0% 🔺)18.574s (+232.2% 🔺)15.625s101.37x

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

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.498s (+140.0% 🔺)2.007s (+99.3% 🔺)0.003s (-19.4% 🟢)2.022s (+97.8% 🔺)0.524s301.00x
🐘 PostgresExpress1.520s (+141.3% 🔺)2.006s (+99.3% 🔺)0.004s (+4.4%)2.025s (+98.0% 🔺)0.505s301.01x
💻 LocalNitro1.555s (+85.4% 🔺)2.013s (+98.9% 🔺)0.011s (+16.0% 🔺)2.026s (+81.5% 🔺)0.471s301.04x
💻 LocalNext.js (Turbopack)1.657s2.014s0.010s2.026s0.369s301.11x
🐘 PostgresNext.js (Turbopack)1.712s2.010s0.004s2.028s0.316s301.14x
💻 LocalExpress1.739s (+129.7% 🔺)2.012s (+95.6% 🔺)0.011s (+13.9% 🔺)2.198s (+111.4% 🔺)0.459s291.16x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.010s (-64.5% 🟢)6.776s (-62.9% 🟢)0.173s (-18.3% 🟢)7.342s (-61.2% 🟢)1.331s91.00x
▲ VercelNitro6.068s (-79.4% 🟢)7.063s (-77.1% 🟢)0.275s (+145.2% 🔺)7.733s (-75.7% 🟢)1.664s81.01x
▲ VercelExpress6.459s (-0.7%)7.852s (-2.0%)0.234s (-42.7% 🟢)8.609s (-2.6%)2.149s71.07x

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

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.610s (-37.1% 🟢)1.016s (-18.6% 🟢)0.000s (-58.6% 🟢)1.038s (-17.5% 🟢)0.428s581.00x
🐘 PostgresExpress0.695s (-27.6% 🟢)1.052s (-17.7% 🟢)0.000s (+101.8% 🔺)1.064s (-18.5% 🟢)0.369s571.14x
🐘 PostgresNext.js (Turbopack)0.768s1.053s0.000s1.059s0.292s571.26x
💻 LocalExpress1.370s (+11.8% 🔺)2.015s (~)0.000s (-50.0% 🟢)2.017s (~)0.647s302.25x
💻 LocalNext.js (Turbopack)1.402s2.013s0.000s2.016s0.615s302.30x
💻 LocalNitro1.431s (+17.0% 🔺)2.016s (~)0.000s (-66.7% 🟢)2.018s (~)0.587s302.35x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.669s (+20.3% 🔺)4.647s (+5.8% 🔺)0.000s (-100.0% 🟢)5.059s (+5.2% 🔺)1.389s121.00x
▲ VercelExpress3.790s (+1.3%)5.277s (+3.4%)0.000s (-100.0% 🟢)5.812s (+5.1% 🔺)2.022s111.03x
▲ VercelNext.js (Turbopack)3.849s (-62.2% 🟢)4.996s (-56.6% 🟢)0.000s (+Infinity% 🔺)5.474s (-54.6% 🟢)1.625s111.05x

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

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.254s (-30.0% 🟢)1.847s (-13.7% 🟢)0.000s (+154.5% 🔺)1.872s (-13.9% 🟢)0.617s331.00x
🐘 PostgresExpress1.325s (-25.2% 🟢)2.066s (-5.1% 🟢)0.000s (NaN%)2.076s (-5.6% 🟢)0.751s301.06x
🐘 PostgresNext.js (Turbopack)1.530s2.106s0.000s2.114s0.585s291.22x
💻 LocalNext.js (Turbopack)2.579s3.187s0.000s3.190s0.611s192.06x
💻 LocalExpress3.164s (-8.7% 🟢)4.029s (~)0.001s (-33.3% 🟢)4.032s (~)0.867s152.52x
💻 LocalNitro3.346s (-1.2%)3.968s (-1.6%)0.001s (+28.9% 🔺)3.971s (-1.6%)0.625s162.67x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.599s (~)6.937s (-0.6%)0.000s (-11.1% 🟢)7.371s (-2.2%)1.772s91.00x
▲ VercelExpress7.865s (+71.5% 🔺)9.206s (+52.9% 🔺)0.000s (+Infinity% 🔺)9.666s (+49.7% 🔺)1.801s71.40x
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress12/21
🐘 PostgresNitro19/21
▲ VercelExpress8/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres15/21
Next.js (Turbopack)🐘 Postgres14/21
Nitro🐘 Postgres18/21
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
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production122202191441
✅ 💻 Local Development161502191834
✅ 📦 Local Production161502191834
✅ 🐘 Local Postgres161502191834
✅ 🪟 Windows13100131
✅ 📋 Other7410176917
Total6939010527991

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro105026
✅ example105026
✅ express105026
✅ fastify105026
✅ hono105026
✅ nextjs-turbopack12902
✅ nextjs-webpack12902
✅ nitro105026
✅ nuxt105026
✅ sveltekit12407
✅ vite105026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13100
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable106025
✅ e2e-local-dev-tanstack-start-106025
✅ e2e-local-postgres-nest-stable106025
✅ e2e-local-postgres-tanstack-start-106025
✅ e2e-local-prod-nest-stable106025
✅ e2e-local-prod-tanstack-start-106025
✅ e2e-vercel-prod-tanstack-start105026

📋 View full workflow run

@karthikscale3karthikscale3 changed the title docs(cookbook): clarify tools are not individually durable in streamText patternFix cookbook pattern for AI SDKMay 22, 2026
@karthikscale3karthikscale3 changed the title Fix cookbook pattern for AI SDK[Docs] Fix cookbook pattern for AI SDKMay 22, 2026
@karthikscale3
karthikscale3force-pushed the karthik/cookbook-ai-sdk-tools-not-durable branch from 027316f to c661ac8CompareMay 22, 2026 23:56
@vercel

vercelBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

@karthikscale3
karthikscale3 deleted the karthik/cookbook-ai-sdk-tools-not-durable branch May 22, 2026 23:57
@karthikscale3
karthikscale3 restored the karthik/cookbook-ai-sdk-tools-not-durable branch May 22, 2026 23:59
Comment threaddocs/content/docs/v4/cookbook/integrations/ai-sdk.mdx Outdated

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM assuming this was tested, some wording nits

Comment threaddocs/content/docs/v4/cookbook/integrations/ai-sdk.mdx Outdated
karthikscale3and others added 4 commits May 25, 2026 09:59
The AI SDK cookbook entry presented `streamText` inside a `"use step"`
turn function with tools also marked `"use step"`. That implies tools
are individually durable, but the `"use step"` directive is a no-op
when called from another step — so tools run as plain inline functions
inside `runTurn`, and the durability boundary is the entire turn.
Changes:
- Remove the `"use step"` directive from tool implementations in the
workflow code sample and add an explanatory comment.
- Update the frontmatter summary and intro paragraph to drop the
inaccurate "tools remain durable steps" claim.
- Add a "Tools are not individually durable" entry to Pitfalls with
consequences and mitigations (idempotency or `DurableAgent`).
- Add a `runTurn` durability-boundary bullet to "How it works".
- Add a "Tool call durability" row to the `streamText` vs `DurableAgent`
comparison table.
- Fix two misleading Key APIs bullets that claimed tools wrap
`"use step"` functions and that `"use step"` makes tool executions
durable.
Applied identically to both v4 and v5 cookbook entries.
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Karthik Kalyan <105607645+karthikscale3@users.noreply.github.com>
The callout and comparison table incorrectly claimed DurableAgent lacks stopWhen, structured output, and onStepFinish — update them to reflect the actual implementation and clarify when raw streamText() is still appropriate.
Co-authored-by: Cursor <cursoragent@cursor.com>
Address review feedback: the inline comment should explain how tools run inside runTurn without referencing removed "use step" directives.
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

No backport to stable for ff167d0 (AI decision).

This commit only modifies docs/content/docs/v4/cookbook/integrations/ai-sdk.mdx and docs/content/docs/v5/cookbook/integrations/ai-sdk.mdx. Verified via git ls-tree origin/stable that the v4/v5 versioned docs directory structure (and the cookbook/integrations/ai-sdk.mdx files) does not exist on stable — stable has a flat docs/content/docs/ layout. There is nothing to backport.

To override, re-run the Backport to stable workflow manually via workflow_dispatch and paste this commit SHA into the ref input:

ff167d005d7b13163fe5819e132266afe3501fa4

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

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

[Docs] Fix cookbook pattern for AI SDK - #2099

Merged
karthikscale3 merged 4 commits into
mainfrom
karthik/cookbook-ai-sdk-tools-not-durable
May 25, 2026
Merged

[Docs] Fix cookbook pattern for AI SDK#2099
karthikscale3 merged 4 commits into
mainfrom
karthik/cookbook-ai-sdk-tools-not-durable

Conversation

@karthikscale3

@karthikscale3karthikscale3 commented May 22, 2026

Copy link
Copy Markdown
Contributor

Summary

The AI SDK cookbook entry (docs/content/docs/v{4,5}/cookbook/integrations/ai-sdk.mdx) shows streamText inside a "use step" turn function with the example tools (lookupOrder, processRefund) also marked "use step". That presentation implies tool calls are individually durable, but per Workflows & Steps the "use step" directive is a no-op when called from another step. So in this pattern tools run as plain inline functions inside runTurn, and the durability boundary is the entire turn — if anything in the turn throws, every tool call that already ran is replayed.

This PR fixes the cookbook to reflect that reality and gives readers an explicit migration path (idempotent tools or DurableAgent).

Changes (applied identically to v4 and v5)

  • Removed the "use step" directive from lookupOrder and processRefund in the workflow code sample, with an inline comment explaining why.
  • Updated the frontmatter summary and intro paragraph: dropped the inaccurate "tools remain durable steps" claim; explicitly call out the per-turn durability boundary.
  • Added a new Tools are not individually durable entry to Pitfalls covering:
    • The retry unit is runTurn, not the tool call.
    • A side-effectful tool (e.g. processRefund) can run multiple times if the turn retries.
    • Mitigations: idempotent tool implementations, or DurableAgent (each tool call becomes its own durable step).
  • Added a runTurn durability-boundary bullet to How it works.
  • Added a Tool call durability row to the streamText vs DurableAgent table.
  • Rewrote two misleading Key APIs bullets:
    • tool() no longer claims tools wrap "use step" functions / are replayed from the log.
    • "use step" is now described as applied to runTurn, not to "tool executions".
  • Corrected outdated DurableAgent guidance after verifying the implementation:
    • Callout no longer claims DurableAgent lacks stopWhen, structured output, or onStepFinish — it reimplements the same agent loop and already supports those options.
    • Rewrote When to use streamText directly to focus on the raw AI SDK API, per-turn durability boundaries, and custom multi-turn orchestration (hook loops, sliceUntilFinish).
    • Updated the streamText vs DurableAgent comparison table: both support stopWhen/prepareStep; DurableAgent supports experimental_output and step callbacks (onStepFinish, onFinish, etc.); noted onChunk as the main gap.

Test plan

  • Visual check of the rendered /cookbook/integrations/ai-sdk page on v4 and v5.
  • Confirm the new in-page anchor (#tools-are-not-individually-durable) resolves from the intro paragraph, How it works, and Key APIs cross-links.
  • Confirm the code sample still typechecks in the docs typecheck pipeline.

Made with Cursor

@karthikscale3
karthikscale3 requested a review from a team as a code ownerMay 22, 2026 23:54
@changeset-bot

changeset-botBot commented May 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3270975

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@github-actions

github-actionsBot commented May 22, 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
💻 Local🥇 Express0.031s (-30.5% 🟢)1.006s (~)0.975s101.00x
💻 LocalNitro0.033s (-23.7% 🟢)1.006s (~)0.973s101.07x
🐘 PostgresNitro0.042s (-55.7% 🟢)1.010s (-3.1%)0.968s101.37x
💻 LocalNext.js (Turbopack)0.048s1.006s0.958s101.55x
🐘 PostgresExpress0.053s (-8.1% 🟢)1.014s (~)0.960s101.73x
🐘 PostgresNext.js (Turbopack)0.056s1.011s0.955s101.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.279s (-31.9% 🟢)2.044s (-18.6% 🟢)1.764s101.00x
▲ VercelExpress0.296s (+25.6% 🔺)2.469s (+15.6% 🔺)2.173s101.06x
▲ VercelNext.js (Turbopack)0.304s (+21.0% 🔺)2.151s (-7.8% 🟢)1.847s101.09x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.075s (-4.4%)2.006s (~)0.931s101.00x
💻 LocalNitro1.076s (-4.9%)2.006s (~)0.930s101.00x
🐘 PostgresNitro1.079s (-5.4% 🟢)2.008s (~)0.929s101.00x
🐘 PostgresExpress1.083s (-5.5% 🟢)2.009s (~)0.926s101.01x
💻 LocalNext.js (Turbopack)1.112s2.006s0.895s101.03x
🐘 PostgresNext.js (Turbopack)1.120s2.009s0.890s101.04x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.585s (-22.1% 🟢)3.301s (-13.8% 🟢)1.716s101.00x
▲ VercelNitro1.677s (-56.9% 🟢)3.257s (-44.9% 🟢)1.579s101.06x
▲ VercelExpress1.731s (-7.7% 🟢)3.615s (-5.1% 🟢)1.884s101.09x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro10.423s (-4.1%)11.015s (~)0.592s31.00x
💻 LocalExpress10.423s (-4.6%)11.021s (~)0.598s31.00x
💻 LocalNitro10.425s (-4.8%)11.021s (~)0.596s31.00x
🐘 PostgresExpress10.445s (-4.7%)11.017s (~)0.572s31.00x
💻 LocalNext.js (Turbopack)10.652s11.020s0.367s31.02x
🐘 PostgresNext.js (Turbopack)10.694s11.020s0.326s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro13.232s (-44.2% 🟢)15.258s (-39.2% 🟢)2.026s21.00x
▲ VercelNext.js (Turbopack)13.769s (-20.5% 🟢)15.278s (-21.2% 🟢)1.509s21.04x
▲ VercelExpress16.197s (-4.6%)17.973s (-10.2% 🟢)1.777s21.22x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro13.457s (-7.8% 🟢)14.018s (-6.7% 🟢)0.561s51.00x
🐘 PostgresExpress13.492s (-7.5% 🟢)14.017s (-6.7% 🟢)0.525s51.00x
💻 LocalExpress13.498s (-9.8% 🟢)14.027s (-6.7% 🟢)0.529s51.00x
💻 LocalNitro13.506s (-10.3% 🟢)14.029s (-12.5% 🟢)0.523s51.00x
💻 LocalNext.js (Turbopack)14.038s15.029s0.991s41.04x
🐘 PostgresNext.js (Turbopack)14.121s15.019s0.898s41.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro21.119s (-67.2% 🟢)22.768s (-65.8% 🟢)1.649s31.00x
▲ VercelExpress21.128s (-58.0% 🟢)22.810s (-56.6% 🟢)1.683s31.00x
▲ VercelNext.js (Turbopack)21.868s (-58.4% 🟢)22.948s (-58.0% 🟢)1.080s31.04x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express11.935s (-28.1% 🟢)12.022s (-29.4% 🟢)0.087s81.00x
🐘 PostgresExpress11.955s (-14.7% 🟢)12.142s (-16.8% 🟢)0.187s81.00x
💻 LocalNitro11.982s (-28.6% 🟢)12.147s (-28.7% 🟢)0.165s81.00x
🐘 PostgresNitro11.987s (-14.2% 🟢)12.393s (-13.4% 🟢)0.406s81.00x
💻 LocalNext.js (Turbopack)12.945s13.023s0.078s71.08x
🐘 PostgresNext.js (Turbopack)13.222s14.015s0.794s71.11x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express32.014s (-73.6% 🟢)33.895s (-72.6% 🟢)1.881s31.00x
▲ VercelNext.js (Turbopack)32.210s (-91.8% 🟢)33.857s (-91.4% 🟢)1.647s31.01x
▲ VercelNitro32.225s (-92.4% 🟢)34.212s (-91.9% 🟢)1.987s31.01x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.141s (-10.5% 🟢)2.006s (~)0.865s151.00x
🐘 PostgresExpress1.150s (-8.7% 🟢)2.007s (~)0.857s151.01x
💻 LocalExpress1.176s (-21.0% 🟢)2.007s (~)0.831s151.03x
💻 LocalNitro1.185s (-27.4% 🟢)2.007s (-3.2%)0.822s151.04x
🐘 PostgresNext.js (Turbopack)1.198s2.007s0.809s151.05x
💻 LocalNext.js (Turbopack)1.279s2.006s0.728s151.12x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.551s (-10.8% 🟢)4.135s (-10.6% 🟢)1.584s81.00x
▲ VercelNext.js (Turbopack)2.592s (-23.7% 🟢)4.220s (-14.5% 🟢)1.628s81.02x
▲ VercelNitro2.674s (-5.1% 🟢)4.354s (+0.7%)1.680s71.05x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.191s (-49.3% 🟢)2.006s (-33.3% 🟢)0.815s151.00x
🐘 PostgresExpress1.212s (-48.7% 🟢)2.007s (-33.3% 🟢)0.796s151.02x
🐘 PostgresNext.js (Turbopack)1.339s2.006s0.667s151.12x
💻 LocalNitro1.771s (-43.7% 🟢)2.006s (-48.4% 🟢)0.236s151.49x
💻 LocalNext.js (Turbopack)1.799s2.073s0.274s151.51x
💻 LocalExpress1.891s (-35.9% 🟢)2.142s (-38.0% 🟢)0.250s151.59x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.385s (-16.5% 🟢)4.730s (-20.1% 🟢)1.345s71.00x
▲ VercelExpress3.711s (+2.5%)5.633s (+10.2% 🔺)1.922s61.10x
▲ VercelNext.js (Turbopack)4.474s (-37.0% 🟢)5.883s (-33.9% 🟢)1.408s61.32x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.301s (-62.6% 🟢)2.007s (-49.9% 🟢)0.707s151.00x
🐘 PostgresExpress1.323s (-62.0% 🟢)2.007s (-49.9% 🟢)0.684s151.02x
🐘 PostgresNext.js (Turbopack)1.595s2.007s0.412s151.23x
💻 LocalNext.js (Turbopack)4.947s5.344s0.397s63.80x
💻 LocalNitro5.412s (-35.2% 🟢)5.847s (-35.2% 🟢)0.435s64.16x
💻 LocalExpress5.621s (-32.6% 🟢)6.013s (-33.4% 🟢)0.391s54.32x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.258s (+24.0% 🔺)7.088s (+15.7% 🔺)1.831s51.00x
▲ VercelNext.js (Turbopack)6.447s (-27.7% 🟢)7.992s (-27.1% 🟢)1.544s41.23x
▲ VercelNitro6.804s (+93.0% 🔺)8.588s (+55.2% 🔺)1.784s41.29x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.131s (-10.0% 🟢)2.007s (~)0.876s151.00x
🐘 PostgresExpress1.158s (-7.9% 🟢)2.008s (~)0.850s151.02x
🐘 PostgresNext.js (Turbopack)1.198s2.006s0.808s151.06x
💻 LocalNext.js (Turbopack)1.303s2.006s0.703s151.15x
💻 LocalNitro1.410s (-24.4% 🟢)2.006s (-14.3% 🟢)0.595s151.25x
💻 LocalExpress1.460s (-22.9% 🟢)2.006s (-15.1% 🟢)0.546s151.29x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.421s (-17.4% 🟢)3.689s (-20.5% 🟢)1.268s91.00x
▲ VercelNitro2.507s (+2.0%)3.960s (-5.0% 🟢)1.452s81.04x
▲ VercelExpress2.626s (+1.7%)4.498s (+3.4%)1.872s71.08x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.182s (-49.5% 🟢)2.007s (-33.3% 🟢)0.825s151.00x
🐘 PostgresExpress1.212s (-48.2% 🟢)2.009s (-33.3% 🟢)0.797s151.03x
🐘 PostgresNext.js (Turbopack)1.353s2.008s0.654s151.14x
💻 LocalNext.js (Turbopack)2.024s2.674s0.650s121.71x
💻 LocalExpress2.077s (-33.7% 🟢)2.508s (-33.3% 🟢)0.431s121.76x
💻 LocalNitro2.081s (-32.1% 🟢)2.507s (-35.5% 🟢)0.427s121.76x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.363s (+5.3% 🔺)5.109s (+6.6% 🔺)1.746s61.00x
▲ VercelNitro3.543s (+9.6% 🔺)4.722s (-7.0% 🟢)1.179s71.05x
▲ VercelNext.js (Turbopack)3.827s (+21.8% 🔺)5.241s (+15.9% 🔺)1.414s61.14x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.288s (-63.0% 🟢)2.007s (-49.9% 🟢)0.719s151.00x
🐘 PostgresExpress1.318s (-62.3% 🟢)2.008s (-49.9% 🟢)0.690s151.02x
🐘 PostgresNext.js (Turbopack)1.603s2.010s0.408s151.24x
💻 LocalNext.js (Turbopack)5.253s6.013s0.760s54.08x
💻 LocalNitro5.567s (-39.1% 🟢)6.014s (-40.0% 🟢)0.447s54.32x
💻 LocalExpress6.097s (-30.7% 🟢)6.415s (-30.8% 🟢)0.318s54.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.083s (-20.8% 🟢)6.959s (-14.9% 🟢)1.876s51.00x
▲ VercelNitro5.184s (+1.8%)7.046s (+3.4%)1.862s51.02x
▲ VercelNext.js (Turbopack)5.777s (-14.5% 🟢)7.101s (-16.9% 🟢)1.323s51.14x

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

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.442s (-46.1% 🟢)1.006s (~)0.564s601.00x
💻 LocalExpress0.484s (-50.8% 🟢)1.004s (-6.7% 🟢)0.520s601.10x
🐘 PostgresExpress0.486s (-42.1% 🟢)1.024s (~)0.538s591.10x
💻 LocalNitro0.525s (-46.5% 🟢)1.005s (-8.1% 🟢)0.480s601.19x
🐘 PostgresNext.js (Turbopack)0.682s1.006s0.325s601.54x
💻 LocalNext.js (Turbopack)0.705s1.005s0.300s601.59x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.886s (-74.3% 🟢)6.422s (-69.9% 🟢)1.536s101.00x
▲ VercelNitro5.443s (-75.3% 🟢)6.976s (-71.0% 🟢)1.533s91.11x
▲ VercelNext.js (Turbopack)5.491s (-62.1% 🟢)6.854s (-57.4% 🟢)1.362s91.12x

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

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.031s (-47.8% 🟢)1.586s (-29.8% 🟢)0.555s571.00x
🐘 PostgresNitro1.053s (-45.4% 🟢)1.603s (-23.7% 🟢)0.550s571.02x
💻 LocalExpress1.209s (-59.9% 🟢)2.006s (-44.1% 🟢)0.797s451.17x
💻 LocalNitro1.225s (-59.6% 🟢)2.006s (-46.6% 🟢)0.781s451.19x
🐘 PostgresNext.js (Turbopack)1.631s2.009s0.377s451.58x
💻 LocalNext.js (Turbopack)1.767s2.006s0.239s451.71x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.045s (-73.8% 🟢)14.636s (-71.7% 🟢)1.592s71.00x
▲ VercelExpress13.474s (-61.0% 🟢)15.249s (-58.6% 🟢)1.776s61.03x
▲ VercelNitro13.618s (-65.5% 🟢)15.326s (-62.9% 🟢)1.708s61.04x

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

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.009s (-51.0% 🟢)2.407s (-47.7% 🟢)0.398s501.00x
🐘 PostgresExpress2.175s (-45.5% 🟢)2.758s (-36.9% 🟢)0.583s441.08x
💻 LocalExpress2.767s (-70.0% 🟢)3.032s (-69.7% 🟢)0.265s401.38x
💻 LocalNitro2.796s (-69.9% 🟢)3.033s (-69.7% 🟢)0.237s401.39x
🐘 PostgresNext.js (Turbopack)3.182s4.009s0.827s301.58x
💻 LocalNext.js (Turbopack)3.712s4.008s0.296s301.85x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express27.669s (-78.7% 🟢)29.488s (-77.7% 🟢)1.819s51.00x
▲ VercelNitro29.741s (-69.3% 🟢)31.477s (-68.0% 🟢)1.736s41.07x
▲ VercelNext.js (Turbopack)31.048s (-71.0% 🟢)32.776s (-69.9% 🟢)1.727s41.12x

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

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.163s (-42.6% 🟢)1.005s (~)0.843s601.00x
🐘 PostgresExpress0.171s (-39.4% 🟢)1.006s (~)0.835s601.05x
🐘 PostgresNext.js (Turbopack)0.229s1.006s0.777s601.41x
💻 LocalNitro0.412s (-31.8% 🟢)1.004s (-1.7%)0.592s602.54x
💻 LocalExpress0.419s (-25.2% 🟢)1.004s (~)0.585s602.58x
💻 LocalNext.js (Turbopack)0.510s1.004s0.494s603.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.414s (+45.3% 🔺)4.251s (+26.9% 🔺)1.838s161.00x
▲ VercelExpress2.559s (+30.9% 🔺)4.101s (+12.7% 🔺)1.542s151.06x
▲ VercelNext.js (Turbopack)2.607s (+28.9% 🔺)3.926s (+3.5%)1.320s161.08x

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

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.282s (-43.3% 🟢)1.005s (~)0.724s901.00x
🐘 PostgresExpress0.306s (-39.9% 🟢)1.007s (~)0.701s901.09x
🐘 PostgresNext.js (Turbopack)0.449s1.007s0.558s901.59x
💻 LocalNitro2.140s (-15.7% 🟢)2.852s (-5.2% 🟢)0.712s327.60x
💻 LocalExpress2.162s (-14.0% 🟢)2.943s (-2.2%)0.781s317.68x
💻 LocalNext.js (Turbopack)2.219s2.944s0.726s317.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.743s (+55.7% 🔺)6.348s (+32.0% 🔺)1.604s151.00x
▲ VercelNitro5.316s (+64.8% 🔺)6.877s (+42.6% 🔺)1.561s141.12x
▲ VercelNext.js (Turbopack)5.355s (+51.5% 🔺)6.768s (+30.3% 🔺)1.413s141.13x

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

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.557s (-29.5% 🟢)1.005s (~)0.448s1201.00x
🐘 PostgresExpress0.626s (-23.6% 🟢)1.006s (-1.1%)0.380s1201.12x
🐘 PostgresNext.js (Turbopack)0.919s1.207s0.288s1001.65x
💻 LocalExpress10.512s (-6.1% 🟢)11.119s (-6.9% 🟢)0.607s1118.87x
💻 LocalNitro10.566s (-5.6% 🟢)11.119s (-4.7%)0.553s1118.97x
💻 LocalNext.js (Turbopack)10.761s11.481s0.720s1119.32x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro14.165s (+83.4% 🔺)15.767s (+67.7% 🔺)1.603s91.00x
▲ VercelNext.js (Turbopack)14.811s (+43.4% 🔺)16.301s (+32.7% 🔺)1.490s81.05x
▲ VercelExpress16.474s (+122.0% 🔺)18.379s (+98.8% 🔺)1.905s71.16x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.135s (+453.5% 🔺)2.002s (+100.3% 🔺)0.001s (-13.3% 🟢)2.009s (+98.7% 🔺)0.874s101.00x
💻 LocalExpress1.135s (+470.1% 🔺)2.006s (+99.7% 🔺)0.012s (+2.5%)2.020s (+98.5% 🔺)0.885s101.00x
🐘 PostgresExpress1.141s (+456.3% 🔺)2.001s (+100.4% 🔺)0.001s (-25.0% 🟢)2.011s (+98.9% 🔺)0.871s101.01x
💻 LocalNitro1.142s (+434.4% 🔺)2.005s (+99.6% 🔺)0.013s (+0.8%)2.020s (+98.3% 🔺)0.878s101.01x
💻 LocalNext.js (Turbopack)1.170s2.004s0.012s2.019s0.849s101.03x
🐘 PostgresNext.js (Turbopack)1.195s2.002s0.002s2.011s0.815s101.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.151s (-68.6% 🟢)2.881s (-66.7% 🟢)2.305s (+264.7% 🔺)5.547s (-43.3% 🟢)3.397s101.00x
▲ VercelNitro2.196s (-42.7% 🟢)2.985s (-43.4% 🟢)2.267s (+205.5% 🔺)5.704s (-12.0% 🟢)3.508s101.02x
▲ VercelExpress2.949s (+17.7% 🔺)4.011s (-1.9%)14.047s (+1362.0% 🔺)18.574s (+232.2% 🔺)15.625s101.37x

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

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.498s (+140.0% 🔺)2.007s (+99.3% 🔺)0.003s (-19.4% 🟢)2.022s (+97.8% 🔺)0.524s301.00x
🐘 PostgresExpress1.520s (+141.3% 🔺)2.006s (+99.3% 🔺)0.004s (+4.4%)2.025s (+98.0% 🔺)0.505s301.01x
💻 LocalNitro1.555s (+85.4% 🔺)2.013s (+98.9% 🔺)0.011s (+16.0% 🔺)2.026s (+81.5% 🔺)0.471s301.04x
💻 LocalNext.js (Turbopack)1.657s2.014s0.010s2.026s0.369s301.11x
🐘 PostgresNext.js (Turbopack)1.712s2.010s0.004s2.028s0.316s301.14x
💻 LocalExpress1.739s (+129.7% 🔺)2.012s (+95.6% 🔺)0.011s (+13.9% 🔺)2.198s (+111.4% 🔺)0.459s291.16x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.010s (-64.5% 🟢)6.776s (-62.9% 🟢)0.173s (-18.3% 🟢)7.342s (-61.2% 🟢)1.331s91.00x
▲ VercelNitro6.068s (-79.4% 🟢)7.063s (-77.1% 🟢)0.275s (+145.2% 🔺)7.733s (-75.7% 🟢)1.664s81.01x
▲ VercelExpress6.459s (-0.7%)7.852s (-2.0%)0.234s (-42.7% 🟢)8.609s (-2.6%)2.149s71.07x

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

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.610s (-37.1% 🟢)1.016s (-18.6% 🟢)0.000s (-58.6% 🟢)1.038s (-17.5% 🟢)0.428s581.00x
🐘 PostgresExpress0.695s (-27.6% 🟢)1.052s (-17.7% 🟢)0.000s (+101.8% 🔺)1.064s (-18.5% 🟢)0.369s571.14x
🐘 PostgresNext.js (Turbopack)0.768s1.053s0.000s1.059s0.292s571.26x
💻 LocalExpress1.370s (+11.8% 🔺)2.015s (~)0.000s (-50.0% 🟢)2.017s (~)0.647s302.25x
💻 LocalNext.js (Turbopack)1.402s2.013s0.000s2.016s0.615s302.30x
💻 LocalNitro1.431s (+17.0% 🔺)2.016s (~)0.000s (-66.7% 🟢)2.018s (~)0.587s302.35x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.669s (+20.3% 🔺)4.647s (+5.8% 🔺)0.000s (-100.0% 🟢)5.059s (+5.2% 🔺)1.389s121.00x
▲ VercelExpress3.790s (+1.3%)5.277s (+3.4%)0.000s (-100.0% 🟢)5.812s (+5.1% 🔺)2.022s111.03x
▲ VercelNext.js (Turbopack)3.849s (-62.2% 🟢)4.996s (-56.6% 🟢)0.000s (+Infinity% 🔺)5.474s (-54.6% 🟢)1.625s111.05x

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

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.254s (-30.0% 🟢)1.847s (-13.7% 🟢)0.000s (+154.5% 🔺)1.872s (-13.9% 🟢)0.617s331.00x
🐘 PostgresExpress1.325s (-25.2% 🟢)2.066s (-5.1% 🟢)0.000s (NaN%)2.076s (-5.6% 🟢)0.751s301.06x
🐘 PostgresNext.js (Turbopack)1.530s2.106s0.000s2.114s0.585s291.22x
💻 LocalNext.js (Turbopack)2.579s3.187s0.000s3.190s0.611s192.06x
💻 LocalExpress3.164s (-8.7% 🟢)4.029s (~)0.001s (-33.3% 🟢)4.032s (~)0.867s152.52x
💻 LocalNitro3.346s (-1.2%)3.968s (-1.6%)0.001s (+28.9% 🔺)3.971s (-1.6%)0.625s162.67x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.599s (~)6.937s (-0.6%)0.000s (-11.1% 🟢)7.371s (-2.2%)1.772s91.00x
▲ VercelExpress7.865s (+71.5% 🔺)9.206s (+52.9% 🔺)0.000s (+Infinity% 🔺)9.666s (+49.7% 🔺)1.801s71.40x
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress12/21
🐘 PostgresNitro19/21
▲ VercelExpress8/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres15/21
Next.js (Turbopack)🐘 Postgres14/21
Nitro🐘 Postgres18/21
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
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production122202191441
✅ 💻 Local Development161502191834
✅ 📦 Local Production161502191834
✅ 🐘 Local Postgres161502191834
✅ 🪟 Windows13100131
✅ 📋 Other7410176917
Total6939010527991

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro105026
✅ example105026
✅ express105026
✅ fastify105026
✅ hono105026
✅ nextjs-turbopack12902
✅ nextjs-webpack12902
✅ nitro105026
✅ nuxt105026
✅ sveltekit12407
✅ vite105026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13100
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable106025
✅ e2e-local-dev-tanstack-start-106025
✅ e2e-local-postgres-nest-stable106025
✅ e2e-local-postgres-tanstack-start-106025
✅ e2e-local-prod-nest-stable106025
✅ e2e-local-prod-tanstack-start-106025
✅ e2e-vercel-prod-tanstack-start105026

📋 View full workflow run

@karthikscale3karthikscale3 changed the title docs(cookbook): clarify tools are not individually durable in streamText patternFix cookbook pattern for AI SDKMay 22, 2026
@karthikscale3karthikscale3 changed the title Fix cookbook pattern for AI SDK[Docs] Fix cookbook pattern for AI SDKMay 22, 2026
@karthikscale3
karthikscale3force-pushed the karthik/cookbook-ai-sdk-tools-not-durable branch from 027316f to c661ac8CompareMay 22, 2026 23:56
@vercel

vercelBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

@karthikscale3
karthikscale3 deleted the karthik/cookbook-ai-sdk-tools-not-durable branch May 22, 2026 23:57
@karthikscale3
karthikscale3 restored the karthik/cookbook-ai-sdk-tools-not-durable branch May 22, 2026 23:59
Comment threaddocs/content/docs/v4/cookbook/integrations/ai-sdk.mdx Outdated

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM assuming this was tested, some wording nits

Comment threaddocs/content/docs/v4/cookbook/integrations/ai-sdk.mdx Outdated
karthikscale3and others added 4 commits May 25, 2026 09:59
The AI SDK cookbook entry presented `streamText` inside a `"use step"`
turn function with tools also marked `"use step"`. That implies tools
are individually durable, but the `"use step"` directive is a no-op
when called from another step — so tools run as plain inline functions
inside `runTurn`, and the durability boundary is the entire turn.
Changes:
- Remove the `"use step"` directive from tool implementations in the
workflow code sample and add an explanatory comment.
- Update the frontmatter summary and intro paragraph to drop the
inaccurate "tools remain durable steps" claim.
- Add a "Tools are not individually durable" entry to Pitfalls with
consequences and mitigations (idempotency or `DurableAgent`).
- Add a `runTurn` durability-boundary bullet to "How it works".
- Add a "Tool call durability" row to the `streamText` vs `DurableAgent`
comparison table.
- Fix two misleading Key APIs bullets that claimed tools wrap
`"use step"` functions and that `"use step"` makes tool executions
durable.
Applied identically to both v4 and v5 cookbook entries.
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Karthik Kalyan <105607645+karthikscale3@users.noreply.github.com>
The callout and comparison table incorrectly claimed DurableAgent lacks stopWhen, structured output, and onStepFinish — update them to reflect the actual implementation and clarify when raw streamText() is still appropriate.
Co-authored-by: Cursor <cursoragent@cursor.com>
Address review feedback: the inline comment should explain how tools run inside runTurn without referencing removed "use step" directives.
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

No backport to stable for ff167d0 (AI decision).

This commit only modifies docs/content/docs/v4/cookbook/integrations/ai-sdk.mdx and docs/content/docs/v5/cookbook/integrations/ai-sdk.mdx. Verified via git ls-tree origin/stable that the v4/v5 versioned docs directory structure (and the cookbook/integrations/ai-sdk.mdx files) does not exist on stable — stable has a flat docs/content/docs/ layout. There is nothing to backport.

To override, re-run the Backport to stable workflow manually via workflow_dispatch and paste this commit SHA into the ref input:

ff167d005d7b13163fe5819e132266afe3501fa4

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

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

[Docs] Fix cookbook pattern for AI SDK - #2099

Merged
karthikscale3 merged 4 commits into
mainfrom
karthik/cookbook-ai-sdk-tools-not-durable
May 25, 2026
Merged

[Docs] Fix cookbook pattern for AI SDK#2099
karthikscale3 merged 4 commits into
mainfrom
karthik/cookbook-ai-sdk-tools-not-durable

Conversation

@karthikscale3

@karthikscale3karthikscale3 commented May 22, 2026

Copy link
Copy Markdown
Contributor

Summary

The AI SDK cookbook entry (docs/content/docs/v{4,5}/cookbook/integrations/ai-sdk.mdx) shows streamText inside a "use step" turn function with the example tools (lookupOrder, processRefund) also marked "use step". That presentation implies tool calls are individually durable, but per Workflows & Steps the "use step" directive is a no-op when called from another step. So in this pattern tools run as plain inline functions inside runTurn, and the durability boundary is the entire turn — if anything in the turn throws, every tool call that already ran is replayed.

This PR fixes the cookbook to reflect that reality and gives readers an explicit migration path (idempotent tools or DurableAgent).

Changes (applied identically to v4 and v5)

  • Removed the "use step" directive from lookupOrder and processRefund in the workflow code sample, with an inline comment explaining why.
  • Updated the frontmatter summary and intro paragraph: dropped the inaccurate "tools remain durable steps" claim; explicitly call out the per-turn durability boundary.
  • Added a new Tools are not individually durable entry to Pitfalls covering:
    • The retry unit is runTurn, not the tool call.
    • A side-effectful tool (e.g. processRefund) can run multiple times if the turn retries.
    • Mitigations: idempotent tool implementations, or DurableAgent (each tool call becomes its own durable step).
  • Added a runTurn durability-boundary bullet to How it works.
  • Added a Tool call durability row to the streamText vs DurableAgent table.
  • Rewrote two misleading Key APIs bullets:
    • tool() no longer claims tools wrap "use step" functions / are replayed from the log.
    • "use step" is now described as applied to runTurn, not to "tool executions".
  • Corrected outdated DurableAgent guidance after verifying the implementation:
    • Callout no longer claims DurableAgent lacks stopWhen, structured output, or onStepFinish — it reimplements the same agent loop and already supports those options.
    • Rewrote When to use streamText directly to focus on the raw AI SDK API, per-turn durability boundaries, and custom multi-turn orchestration (hook loops, sliceUntilFinish).
    • Updated the streamText vs DurableAgent comparison table: both support stopWhen/prepareStep; DurableAgent supports experimental_output and step callbacks (onStepFinish, onFinish, etc.); noted onChunk as the main gap.

Test plan

  • Visual check of the rendered /cookbook/integrations/ai-sdk page on v4 and v5.
  • Confirm the new in-page anchor (#tools-are-not-individually-durable) resolves from the intro paragraph, How it works, and Key APIs cross-links.
  • Confirm the code sample still typechecks in the docs typecheck pipeline.

Made with Cursor

@karthikscale3
karthikscale3 requested a review from a team as a code ownerMay 22, 2026 23:54
@changeset-bot

changeset-botBot commented May 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3270975

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@github-actions

github-actionsBot commented May 22, 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
💻 Local🥇 Express0.031s (-30.5% 🟢)1.006s (~)0.975s101.00x
💻 LocalNitro0.033s (-23.7% 🟢)1.006s (~)0.973s101.07x
🐘 PostgresNitro0.042s (-55.7% 🟢)1.010s (-3.1%)0.968s101.37x
💻 LocalNext.js (Turbopack)0.048s1.006s0.958s101.55x
🐘 PostgresExpress0.053s (-8.1% 🟢)1.014s (~)0.960s101.73x
🐘 PostgresNext.js (Turbopack)0.056s1.011s0.955s101.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.279s (-31.9% 🟢)2.044s (-18.6% 🟢)1.764s101.00x
▲ VercelExpress0.296s (+25.6% 🔺)2.469s (+15.6% 🔺)2.173s101.06x
▲ VercelNext.js (Turbopack)0.304s (+21.0% 🔺)2.151s (-7.8% 🟢)1.847s101.09x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.075s (-4.4%)2.006s (~)0.931s101.00x
💻 LocalNitro1.076s (-4.9%)2.006s (~)0.930s101.00x
🐘 PostgresNitro1.079s (-5.4% 🟢)2.008s (~)0.929s101.00x
🐘 PostgresExpress1.083s (-5.5% 🟢)2.009s (~)0.926s101.01x
💻 LocalNext.js (Turbopack)1.112s2.006s0.895s101.03x
🐘 PostgresNext.js (Turbopack)1.120s2.009s0.890s101.04x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.585s (-22.1% 🟢)3.301s (-13.8% 🟢)1.716s101.00x
▲ VercelNitro1.677s (-56.9% 🟢)3.257s (-44.9% 🟢)1.579s101.06x
▲ VercelExpress1.731s (-7.7% 🟢)3.615s (-5.1% 🟢)1.884s101.09x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro10.423s (-4.1%)11.015s (~)0.592s31.00x
💻 LocalExpress10.423s (-4.6%)11.021s (~)0.598s31.00x
💻 LocalNitro10.425s (-4.8%)11.021s (~)0.596s31.00x
🐘 PostgresExpress10.445s (-4.7%)11.017s (~)0.572s31.00x
💻 LocalNext.js (Turbopack)10.652s11.020s0.367s31.02x
🐘 PostgresNext.js (Turbopack)10.694s11.020s0.326s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro13.232s (-44.2% 🟢)15.258s (-39.2% 🟢)2.026s21.00x
▲ VercelNext.js (Turbopack)13.769s (-20.5% 🟢)15.278s (-21.2% 🟢)1.509s21.04x
▲ VercelExpress16.197s (-4.6%)17.973s (-10.2% 🟢)1.777s21.22x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro13.457s (-7.8% 🟢)14.018s (-6.7% 🟢)0.561s51.00x
🐘 PostgresExpress13.492s (-7.5% 🟢)14.017s (-6.7% 🟢)0.525s51.00x
💻 LocalExpress13.498s (-9.8% 🟢)14.027s (-6.7% 🟢)0.529s51.00x
💻 LocalNitro13.506s (-10.3% 🟢)14.029s (-12.5% 🟢)0.523s51.00x
💻 LocalNext.js (Turbopack)14.038s15.029s0.991s41.04x
🐘 PostgresNext.js (Turbopack)14.121s15.019s0.898s41.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro21.119s (-67.2% 🟢)22.768s (-65.8% 🟢)1.649s31.00x
▲ VercelExpress21.128s (-58.0% 🟢)22.810s (-56.6% 🟢)1.683s31.00x
▲ VercelNext.js (Turbopack)21.868s (-58.4% 🟢)22.948s (-58.0% 🟢)1.080s31.04x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express11.935s (-28.1% 🟢)12.022s (-29.4% 🟢)0.087s81.00x
🐘 PostgresExpress11.955s (-14.7% 🟢)12.142s (-16.8% 🟢)0.187s81.00x
💻 LocalNitro11.982s (-28.6% 🟢)12.147s (-28.7% 🟢)0.165s81.00x
🐘 PostgresNitro11.987s (-14.2% 🟢)12.393s (-13.4% 🟢)0.406s81.00x
💻 LocalNext.js (Turbopack)12.945s13.023s0.078s71.08x
🐘 PostgresNext.js (Turbopack)13.222s14.015s0.794s71.11x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express32.014s (-73.6% 🟢)33.895s (-72.6% 🟢)1.881s31.00x
▲ VercelNext.js (Turbopack)32.210s (-91.8% 🟢)33.857s (-91.4% 🟢)1.647s31.01x
▲ VercelNitro32.225s (-92.4% 🟢)34.212s (-91.9% 🟢)1.987s31.01x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.141s (-10.5% 🟢)2.006s (~)0.865s151.00x
🐘 PostgresExpress1.150s (-8.7% 🟢)2.007s (~)0.857s151.01x
💻 LocalExpress1.176s (-21.0% 🟢)2.007s (~)0.831s151.03x
💻 LocalNitro1.185s (-27.4% 🟢)2.007s (-3.2%)0.822s151.04x
🐘 PostgresNext.js (Turbopack)1.198s2.007s0.809s151.05x
💻 LocalNext.js (Turbopack)1.279s2.006s0.728s151.12x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.551s (-10.8% 🟢)4.135s (-10.6% 🟢)1.584s81.00x
▲ VercelNext.js (Turbopack)2.592s (-23.7% 🟢)4.220s (-14.5% 🟢)1.628s81.02x
▲ VercelNitro2.674s (-5.1% 🟢)4.354s (+0.7%)1.680s71.05x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.191s (-49.3% 🟢)2.006s (-33.3% 🟢)0.815s151.00x
🐘 PostgresExpress1.212s (-48.7% 🟢)2.007s (-33.3% 🟢)0.796s151.02x
🐘 PostgresNext.js (Turbopack)1.339s2.006s0.667s151.12x
💻 LocalNitro1.771s (-43.7% 🟢)2.006s (-48.4% 🟢)0.236s151.49x
💻 LocalNext.js (Turbopack)1.799s2.073s0.274s151.51x
💻 LocalExpress1.891s (-35.9% 🟢)2.142s (-38.0% 🟢)0.250s151.59x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.385s (-16.5% 🟢)4.730s (-20.1% 🟢)1.345s71.00x
▲ VercelExpress3.711s (+2.5%)5.633s (+10.2% 🔺)1.922s61.10x
▲ VercelNext.js (Turbopack)4.474s (-37.0% 🟢)5.883s (-33.9% 🟢)1.408s61.32x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.301s (-62.6% 🟢)2.007s (-49.9% 🟢)0.707s151.00x
🐘 PostgresExpress1.323s (-62.0% 🟢)2.007s (-49.9% 🟢)0.684s151.02x
🐘 PostgresNext.js (Turbopack)1.595s2.007s0.412s151.23x
💻 LocalNext.js (Turbopack)4.947s5.344s0.397s63.80x
💻 LocalNitro5.412s (-35.2% 🟢)5.847s (-35.2% 🟢)0.435s64.16x
💻 LocalExpress5.621s (-32.6% 🟢)6.013s (-33.4% 🟢)0.391s54.32x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.258s (+24.0% 🔺)7.088s (+15.7% 🔺)1.831s51.00x
▲ VercelNext.js (Turbopack)6.447s (-27.7% 🟢)7.992s (-27.1% 🟢)1.544s41.23x
▲ VercelNitro6.804s (+93.0% 🔺)8.588s (+55.2% 🔺)1.784s41.29x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.131s (-10.0% 🟢)2.007s (~)0.876s151.00x
🐘 PostgresExpress1.158s (-7.9% 🟢)2.008s (~)0.850s151.02x
🐘 PostgresNext.js (Turbopack)1.198s2.006s0.808s151.06x
💻 LocalNext.js (Turbopack)1.303s2.006s0.703s151.15x
💻 LocalNitro1.410s (-24.4% 🟢)2.006s (-14.3% 🟢)0.595s151.25x
💻 LocalExpress1.460s (-22.9% 🟢)2.006s (-15.1% 🟢)0.546s151.29x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.421s (-17.4% 🟢)3.689s (-20.5% 🟢)1.268s91.00x
▲ VercelNitro2.507s (+2.0%)3.960s (-5.0% 🟢)1.452s81.04x
▲ VercelExpress2.626s (+1.7%)4.498s (+3.4%)1.872s71.08x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.182s (-49.5% 🟢)2.007s (-33.3% 🟢)0.825s151.00x
🐘 PostgresExpress1.212s (-48.2% 🟢)2.009s (-33.3% 🟢)0.797s151.03x
🐘 PostgresNext.js (Turbopack)1.353s2.008s0.654s151.14x
💻 LocalNext.js (Turbopack)2.024s2.674s0.650s121.71x
💻 LocalExpress2.077s (-33.7% 🟢)2.508s (-33.3% 🟢)0.431s121.76x
💻 LocalNitro2.081s (-32.1% 🟢)2.507s (-35.5% 🟢)0.427s121.76x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.363s (+5.3% 🔺)5.109s (+6.6% 🔺)1.746s61.00x
▲ VercelNitro3.543s (+9.6% 🔺)4.722s (-7.0% 🟢)1.179s71.05x
▲ VercelNext.js (Turbopack)3.827s (+21.8% 🔺)5.241s (+15.9% 🔺)1.414s61.14x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.288s (-63.0% 🟢)2.007s (-49.9% 🟢)0.719s151.00x
🐘 PostgresExpress1.318s (-62.3% 🟢)2.008s (-49.9% 🟢)0.690s151.02x
🐘 PostgresNext.js (Turbopack)1.603s2.010s0.408s151.24x
💻 LocalNext.js (Turbopack)5.253s6.013s0.760s54.08x
💻 LocalNitro5.567s (-39.1% 🟢)6.014s (-40.0% 🟢)0.447s54.32x
💻 LocalExpress6.097s (-30.7% 🟢)6.415s (-30.8% 🟢)0.318s54.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.083s (-20.8% 🟢)6.959s (-14.9% 🟢)1.876s51.00x
▲ VercelNitro5.184s (+1.8%)7.046s (+3.4%)1.862s51.02x
▲ VercelNext.js (Turbopack)5.777s (-14.5% 🟢)7.101s (-16.9% 🟢)1.323s51.14x

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

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.442s (-46.1% 🟢)1.006s (~)0.564s601.00x
💻 LocalExpress0.484s (-50.8% 🟢)1.004s (-6.7% 🟢)0.520s601.10x
🐘 PostgresExpress0.486s (-42.1% 🟢)1.024s (~)0.538s591.10x
💻 LocalNitro0.525s (-46.5% 🟢)1.005s (-8.1% 🟢)0.480s601.19x
🐘 PostgresNext.js (Turbopack)0.682s1.006s0.325s601.54x
💻 LocalNext.js (Turbopack)0.705s1.005s0.300s601.59x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.886s (-74.3% 🟢)6.422s (-69.9% 🟢)1.536s101.00x
▲ VercelNitro5.443s (-75.3% 🟢)6.976s (-71.0% 🟢)1.533s91.11x
▲ VercelNext.js (Turbopack)5.491s (-62.1% 🟢)6.854s (-57.4% 🟢)1.362s91.12x

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

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.031s (-47.8% 🟢)1.586s (-29.8% 🟢)0.555s571.00x
🐘 PostgresNitro1.053s (-45.4% 🟢)1.603s (-23.7% 🟢)0.550s571.02x
💻 LocalExpress1.209s (-59.9% 🟢)2.006s (-44.1% 🟢)0.797s451.17x
💻 LocalNitro1.225s (-59.6% 🟢)2.006s (-46.6% 🟢)0.781s451.19x
🐘 PostgresNext.js (Turbopack)1.631s2.009s0.377s451.58x
💻 LocalNext.js (Turbopack)1.767s2.006s0.239s451.71x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.045s (-73.8% 🟢)14.636s (-71.7% 🟢)1.592s71.00x
▲ VercelExpress13.474s (-61.0% 🟢)15.249s (-58.6% 🟢)1.776s61.03x
▲ VercelNitro13.618s (-65.5% 🟢)15.326s (-62.9% 🟢)1.708s61.04x

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

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.009s (-51.0% 🟢)2.407s (-47.7% 🟢)0.398s501.00x
🐘 PostgresExpress2.175s (-45.5% 🟢)2.758s (-36.9% 🟢)0.583s441.08x
💻 LocalExpress2.767s (-70.0% 🟢)3.032s (-69.7% 🟢)0.265s401.38x
💻 LocalNitro2.796s (-69.9% 🟢)3.033s (-69.7% 🟢)0.237s401.39x
🐘 PostgresNext.js (Turbopack)3.182s4.009s0.827s301.58x
💻 LocalNext.js (Turbopack)3.712s4.008s0.296s301.85x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express27.669s (-78.7% 🟢)29.488s (-77.7% 🟢)1.819s51.00x
▲ VercelNitro29.741s (-69.3% 🟢)31.477s (-68.0% 🟢)1.736s41.07x
▲ VercelNext.js (Turbopack)31.048s (-71.0% 🟢)32.776s (-69.9% 🟢)1.727s41.12x

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

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.163s (-42.6% 🟢)1.005s (~)0.843s601.00x
🐘 PostgresExpress0.171s (-39.4% 🟢)1.006s (~)0.835s601.05x
🐘 PostgresNext.js (Turbopack)0.229s1.006s0.777s601.41x
💻 LocalNitro0.412s (-31.8% 🟢)1.004s (-1.7%)0.592s602.54x
💻 LocalExpress0.419s (-25.2% 🟢)1.004s (~)0.585s602.58x
💻 LocalNext.js (Turbopack)0.510s1.004s0.494s603.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.414s (+45.3% 🔺)4.251s (+26.9% 🔺)1.838s161.00x
▲ VercelExpress2.559s (+30.9% 🔺)4.101s (+12.7% 🔺)1.542s151.06x
▲ VercelNext.js (Turbopack)2.607s (+28.9% 🔺)3.926s (+3.5%)1.320s161.08x

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

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.282s (-43.3% 🟢)1.005s (~)0.724s901.00x
🐘 PostgresExpress0.306s (-39.9% 🟢)1.007s (~)0.701s901.09x
🐘 PostgresNext.js (Turbopack)0.449s1.007s0.558s901.59x
💻 LocalNitro2.140s (-15.7% 🟢)2.852s (-5.2% 🟢)0.712s327.60x
💻 LocalExpress2.162s (-14.0% 🟢)2.943s (-2.2%)0.781s317.68x
💻 LocalNext.js (Turbopack)2.219s2.944s0.726s317.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.743s (+55.7% 🔺)6.348s (+32.0% 🔺)1.604s151.00x
▲ VercelNitro5.316s (+64.8% 🔺)6.877s (+42.6% 🔺)1.561s141.12x
▲ VercelNext.js (Turbopack)5.355s (+51.5% 🔺)6.768s (+30.3% 🔺)1.413s141.13x

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

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.557s (-29.5% 🟢)1.005s (~)0.448s1201.00x
🐘 PostgresExpress0.626s (-23.6% 🟢)1.006s (-1.1%)0.380s1201.12x
🐘 PostgresNext.js (Turbopack)0.919s1.207s0.288s1001.65x
💻 LocalExpress10.512s (-6.1% 🟢)11.119s (-6.9% 🟢)0.607s1118.87x
💻 LocalNitro10.566s (-5.6% 🟢)11.119s (-4.7%)0.553s1118.97x
💻 LocalNext.js (Turbopack)10.761s11.481s0.720s1119.32x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro14.165s (+83.4% 🔺)15.767s (+67.7% 🔺)1.603s91.00x
▲ VercelNext.js (Turbopack)14.811s (+43.4% 🔺)16.301s (+32.7% 🔺)1.490s81.05x
▲ VercelExpress16.474s (+122.0% 🔺)18.379s (+98.8% 🔺)1.905s71.16x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.135s (+453.5% 🔺)2.002s (+100.3% 🔺)0.001s (-13.3% 🟢)2.009s (+98.7% 🔺)0.874s101.00x
💻 LocalExpress1.135s (+470.1% 🔺)2.006s (+99.7% 🔺)0.012s (+2.5%)2.020s (+98.5% 🔺)0.885s101.00x
🐘 PostgresExpress1.141s (+456.3% 🔺)2.001s (+100.4% 🔺)0.001s (-25.0% 🟢)2.011s (+98.9% 🔺)0.871s101.01x
💻 LocalNitro1.142s (+434.4% 🔺)2.005s (+99.6% 🔺)0.013s (+0.8%)2.020s (+98.3% 🔺)0.878s101.01x
💻 LocalNext.js (Turbopack)1.170s2.004s0.012s2.019s0.849s101.03x
🐘 PostgresNext.js (Turbopack)1.195s2.002s0.002s2.011s0.815s101.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.151s (-68.6% 🟢)2.881s (-66.7% 🟢)2.305s (+264.7% 🔺)5.547s (-43.3% 🟢)3.397s101.00x
▲ VercelNitro2.196s (-42.7% 🟢)2.985s (-43.4% 🟢)2.267s (+205.5% 🔺)5.704s (-12.0% 🟢)3.508s101.02x
▲ VercelExpress2.949s (+17.7% 🔺)4.011s (-1.9%)14.047s (+1362.0% 🔺)18.574s (+232.2% 🔺)15.625s101.37x

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

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.498s (+140.0% 🔺)2.007s (+99.3% 🔺)0.003s (-19.4% 🟢)2.022s (+97.8% 🔺)0.524s301.00x
🐘 PostgresExpress1.520s (+141.3% 🔺)2.006s (+99.3% 🔺)0.004s (+4.4%)2.025s (+98.0% 🔺)0.505s301.01x
💻 LocalNitro1.555s (+85.4% 🔺)2.013s (+98.9% 🔺)0.011s (+16.0% 🔺)2.026s (+81.5% 🔺)0.471s301.04x
💻 LocalNext.js (Turbopack)1.657s2.014s0.010s2.026s0.369s301.11x
🐘 PostgresNext.js (Turbopack)1.712s2.010s0.004s2.028s0.316s301.14x
💻 LocalExpress1.739s (+129.7% 🔺)2.012s (+95.6% 🔺)0.011s (+13.9% 🔺)2.198s (+111.4% 🔺)0.459s291.16x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.010s (-64.5% 🟢)6.776s (-62.9% 🟢)0.173s (-18.3% 🟢)7.342s (-61.2% 🟢)1.331s91.00x
▲ VercelNitro6.068s (-79.4% 🟢)7.063s (-77.1% 🟢)0.275s (+145.2% 🔺)7.733s (-75.7% 🟢)1.664s81.01x
▲ VercelExpress6.459s (-0.7%)7.852s (-2.0%)0.234s (-42.7% 🟢)8.609s (-2.6%)2.149s71.07x

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

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.610s (-37.1% 🟢)1.016s (-18.6% 🟢)0.000s (-58.6% 🟢)1.038s (-17.5% 🟢)0.428s581.00x
🐘 PostgresExpress0.695s (-27.6% 🟢)1.052s (-17.7% 🟢)0.000s (+101.8% 🔺)1.064s (-18.5% 🟢)0.369s571.14x
🐘 PostgresNext.js (Turbopack)0.768s1.053s0.000s1.059s0.292s571.26x
💻 LocalExpress1.370s (+11.8% 🔺)2.015s (~)0.000s (-50.0% 🟢)2.017s (~)0.647s302.25x
💻 LocalNext.js (Turbopack)1.402s2.013s0.000s2.016s0.615s302.30x
💻 LocalNitro1.431s (+17.0% 🔺)2.016s (~)0.000s (-66.7% 🟢)2.018s (~)0.587s302.35x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.669s (+20.3% 🔺)4.647s (+5.8% 🔺)0.000s (-100.0% 🟢)5.059s (+5.2% 🔺)1.389s121.00x
▲ VercelExpress3.790s (+1.3%)5.277s (+3.4%)0.000s (-100.0% 🟢)5.812s (+5.1% 🔺)2.022s111.03x
▲ VercelNext.js (Turbopack)3.849s (-62.2% 🟢)4.996s (-56.6% 🟢)0.000s (+Infinity% 🔺)5.474s (-54.6% 🟢)1.625s111.05x

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

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.254s (-30.0% 🟢)1.847s (-13.7% 🟢)0.000s (+154.5% 🔺)1.872s (-13.9% 🟢)0.617s331.00x
🐘 PostgresExpress1.325s (-25.2% 🟢)2.066s (-5.1% 🟢)0.000s (NaN%)2.076s (-5.6% 🟢)0.751s301.06x
🐘 PostgresNext.js (Turbopack)1.530s2.106s0.000s2.114s0.585s291.22x
💻 LocalNext.js (Turbopack)2.579s3.187s0.000s3.190s0.611s192.06x
💻 LocalExpress3.164s (-8.7% 🟢)4.029s (~)0.001s (-33.3% 🟢)4.032s (~)0.867s152.52x
💻 LocalNitro3.346s (-1.2%)3.968s (-1.6%)0.001s (+28.9% 🔺)3.971s (-1.6%)0.625s162.67x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.599s (~)6.937s (-0.6%)0.000s (-11.1% 🟢)7.371s (-2.2%)1.772s91.00x
▲ VercelExpress7.865s (+71.5% 🔺)9.206s (+52.9% 🔺)0.000s (+Infinity% 🔺)9.666s (+49.7% 🔺)1.801s71.40x
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress12/21
🐘 PostgresNitro19/21
▲ VercelExpress8/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres15/21
Next.js (Turbopack)🐘 Postgres14/21
Nitro🐘 Postgres18/21
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
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production122202191441
✅ 💻 Local Development161502191834
✅ 📦 Local Production161502191834
✅ 🐘 Local Postgres161502191834
✅ 🪟 Windows13100131
✅ 📋 Other7410176917
Total6939010527991

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro105026
✅ example105026
✅ express105026
✅ fastify105026
✅ hono105026
✅ nextjs-turbopack12902
✅ nextjs-webpack12902
✅ nitro105026
✅ nuxt105026
✅ sveltekit12407
✅ vite105026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13100
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable106025
✅ e2e-local-dev-tanstack-start-106025
✅ e2e-local-postgres-nest-stable106025
✅ e2e-local-postgres-tanstack-start-106025
✅ e2e-local-prod-nest-stable106025
✅ e2e-local-prod-tanstack-start-106025
✅ e2e-vercel-prod-tanstack-start105026

📋 View full workflow run

@karthikscale3karthikscale3 changed the title docs(cookbook): clarify tools are not individually durable in streamText patternFix cookbook pattern for AI SDKMay 22, 2026
@karthikscale3karthikscale3 changed the title Fix cookbook pattern for AI SDK[Docs] Fix cookbook pattern for AI SDKMay 22, 2026
@karthikscale3
karthikscale3force-pushed the karthik/cookbook-ai-sdk-tools-not-durable branch from 027316f to c661ac8CompareMay 22, 2026 23:56
@vercel

vercelBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

@karthikscale3
karthikscale3 deleted the karthik/cookbook-ai-sdk-tools-not-durable branch May 22, 2026 23:57
@karthikscale3
karthikscale3 restored the karthik/cookbook-ai-sdk-tools-not-durable branch May 22, 2026 23:59
Comment threaddocs/content/docs/v4/cookbook/integrations/ai-sdk.mdx Outdated

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM assuming this was tested, some wording nits

Comment threaddocs/content/docs/v4/cookbook/integrations/ai-sdk.mdx Outdated
karthikscale3and others added 4 commits May 25, 2026 09:59
The AI SDK cookbook entry presented `streamText` inside a `"use step"`
turn function with tools also marked `"use step"`. That implies tools
are individually durable, but the `"use step"` directive is a no-op
when called from another step — so tools run as plain inline functions
inside `runTurn`, and the durability boundary is the entire turn.
Changes:
- Remove the `"use step"` directive from tool implementations in the
workflow code sample and add an explanatory comment.
- Update the frontmatter summary and intro paragraph to drop the
inaccurate "tools remain durable steps" claim.
- Add a "Tools are not individually durable" entry to Pitfalls with
consequences and mitigations (idempotency or `DurableAgent`).
- Add a `runTurn` durability-boundary bullet to "How it works".
- Add a "Tool call durability" row to the `streamText` vs `DurableAgent`
comparison table.
- Fix two misleading Key APIs bullets that claimed tools wrap
`"use step"` functions and that `"use step"` makes tool executions
durable.
Applied identically to both v4 and v5 cookbook entries.
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Karthik Kalyan <105607645+karthikscale3@users.noreply.github.com>
The callout and comparison table incorrectly claimed DurableAgent lacks stopWhen, structured output, and onStepFinish — update them to reflect the actual implementation and clarify when raw streamText() is still appropriate.
Co-authored-by: Cursor <cursoragent@cursor.com>
Address review feedback: the inline comment should explain how tools run inside runTurn without referencing removed "use step" directives.
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

No backport to stable for ff167d0 (AI decision).

This commit only modifies docs/content/docs/v4/cookbook/integrations/ai-sdk.mdx and docs/content/docs/v5/cookbook/integrations/ai-sdk.mdx. Verified via git ls-tree origin/stable that the v4/v5 versioned docs directory structure (and the cookbook/integrations/ai-sdk.mdx files) does not exist on stable — stable has a flat docs/content/docs/ layout. There is nothing to backport.

To override, re-run the Backport to stable workflow manually via workflow_dispatch and paste this commit SHA into the ref input:

ff167d005d7b13163fe5819e132266afe3501fa4

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

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

[Docs] Fix cookbook pattern for AI SDK - #2099

Merged
karthikscale3 merged 4 commits into
mainfrom
karthik/cookbook-ai-sdk-tools-not-durable
May 25, 2026
Merged

[Docs] Fix cookbook pattern for AI SDK#2099
karthikscale3 merged 4 commits into
mainfrom
karthik/cookbook-ai-sdk-tools-not-durable

Conversation

@karthikscale3

@karthikscale3karthikscale3 commented May 22, 2026

Copy link
Copy Markdown
Contributor

Summary

The AI SDK cookbook entry (docs/content/docs/v{4,5}/cookbook/integrations/ai-sdk.mdx) shows streamText inside a "use step" turn function with the example tools (lookupOrder, processRefund) also marked "use step". That presentation implies tool calls are individually durable, but per Workflows & Steps the "use step" directive is a no-op when called from another step. So in this pattern tools run as plain inline functions inside runTurn, and the durability boundary is the entire turn — if anything in the turn throws, every tool call that already ran is replayed.

This PR fixes the cookbook to reflect that reality and gives readers an explicit migration path (idempotent tools or DurableAgent).

Changes (applied identically to v4 and v5)

  • Removed the "use step" directive from lookupOrder and processRefund in the workflow code sample, with an inline comment explaining why.
  • Updated the frontmatter summary and intro paragraph: dropped the inaccurate "tools remain durable steps" claim; explicitly call out the per-turn durability boundary.
  • Added a new Tools are not individually durable entry to Pitfalls covering:
    • The retry unit is runTurn, not the tool call.
    • A side-effectful tool (e.g. processRefund) can run multiple times if the turn retries.
    • Mitigations: idempotent tool implementations, or DurableAgent (each tool call becomes its own durable step).
  • Added a runTurn durability-boundary bullet to How it works.
  • Added a Tool call durability row to the streamText vs DurableAgent table.
  • Rewrote two misleading Key APIs bullets:
    • tool() no longer claims tools wrap "use step" functions / are replayed from the log.
    • "use step" is now described as applied to runTurn, not to "tool executions".
  • Corrected outdated DurableAgent guidance after verifying the implementation:
    • Callout no longer claims DurableAgent lacks stopWhen, structured output, or onStepFinish — it reimplements the same agent loop and already supports those options.
    • Rewrote When to use streamText directly to focus on the raw AI SDK API, per-turn durability boundaries, and custom multi-turn orchestration (hook loops, sliceUntilFinish).
    • Updated the streamText vs DurableAgent comparison table: both support stopWhen/prepareStep; DurableAgent supports experimental_output and step callbacks (onStepFinish, onFinish, etc.); noted onChunk as the main gap.

Test plan

  • Visual check of the rendered /cookbook/integrations/ai-sdk page on v4 and v5.
  • Confirm the new in-page anchor (#tools-are-not-individually-durable) resolves from the intro paragraph, How it works, and Key APIs cross-links.
  • Confirm the code sample still typechecks in the docs typecheck pipeline.

Made with Cursor

@karthikscale3
karthikscale3 requested a review from a team as a code ownerMay 22, 2026 23:54
@changeset-bot

changeset-botBot commented May 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3270975

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@github-actions

github-actionsBot commented May 22, 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
💻 Local🥇 Express0.031s (-30.5% 🟢)1.006s (~)0.975s101.00x
💻 LocalNitro0.033s (-23.7% 🟢)1.006s (~)0.973s101.07x
🐘 PostgresNitro0.042s (-55.7% 🟢)1.010s (-3.1%)0.968s101.37x
💻 LocalNext.js (Turbopack)0.048s1.006s0.958s101.55x
🐘 PostgresExpress0.053s (-8.1% 🟢)1.014s (~)0.960s101.73x
🐘 PostgresNext.js (Turbopack)0.056s1.011s0.955s101.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.279s (-31.9% 🟢)2.044s (-18.6% 🟢)1.764s101.00x
▲ VercelExpress0.296s (+25.6% 🔺)2.469s (+15.6% 🔺)2.173s101.06x
▲ VercelNext.js (Turbopack)0.304s (+21.0% 🔺)2.151s (-7.8% 🟢)1.847s101.09x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.075s (-4.4%)2.006s (~)0.931s101.00x
💻 LocalNitro1.076s (-4.9%)2.006s (~)0.930s101.00x
🐘 PostgresNitro1.079s (-5.4% 🟢)2.008s (~)0.929s101.00x
🐘 PostgresExpress1.083s (-5.5% 🟢)2.009s (~)0.926s101.01x
💻 LocalNext.js (Turbopack)1.112s2.006s0.895s101.03x
🐘 PostgresNext.js (Turbopack)1.120s2.009s0.890s101.04x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.585s (-22.1% 🟢)3.301s (-13.8% 🟢)1.716s101.00x
▲ VercelNitro1.677s (-56.9% 🟢)3.257s (-44.9% 🟢)1.579s101.06x
▲ VercelExpress1.731s (-7.7% 🟢)3.615s (-5.1% 🟢)1.884s101.09x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro10.423s (-4.1%)11.015s (~)0.592s31.00x
💻 LocalExpress10.423s (-4.6%)11.021s (~)0.598s31.00x
💻 LocalNitro10.425s (-4.8%)11.021s (~)0.596s31.00x
🐘 PostgresExpress10.445s (-4.7%)11.017s (~)0.572s31.00x
💻 LocalNext.js (Turbopack)10.652s11.020s0.367s31.02x
🐘 PostgresNext.js (Turbopack)10.694s11.020s0.326s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro13.232s (-44.2% 🟢)15.258s (-39.2% 🟢)2.026s21.00x
▲ VercelNext.js (Turbopack)13.769s (-20.5% 🟢)15.278s (-21.2% 🟢)1.509s21.04x
▲ VercelExpress16.197s (-4.6%)17.973s (-10.2% 🟢)1.777s21.22x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro13.457s (-7.8% 🟢)14.018s (-6.7% 🟢)0.561s51.00x
🐘 PostgresExpress13.492s (-7.5% 🟢)14.017s (-6.7% 🟢)0.525s51.00x
💻 LocalExpress13.498s (-9.8% 🟢)14.027s (-6.7% 🟢)0.529s51.00x
💻 LocalNitro13.506s (-10.3% 🟢)14.029s (-12.5% 🟢)0.523s51.00x
💻 LocalNext.js (Turbopack)14.038s15.029s0.991s41.04x
🐘 PostgresNext.js (Turbopack)14.121s15.019s0.898s41.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro21.119s (-67.2% 🟢)22.768s (-65.8% 🟢)1.649s31.00x
▲ VercelExpress21.128s (-58.0% 🟢)22.810s (-56.6% 🟢)1.683s31.00x
▲ VercelNext.js (Turbopack)21.868s (-58.4% 🟢)22.948s (-58.0% 🟢)1.080s31.04x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express11.935s (-28.1% 🟢)12.022s (-29.4% 🟢)0.087s81.00x
🐘 PostgresExpress11.955s (-14.7% 🟢)12.142s (-16.8% 🟢)0.187s81.00x
💻 LocalNitro11.982s (-28.6% 🟢)12.147s (-28.7% 🟢)0.165s81.00x
🐘 PostgresNitro11.987s (-14.2% 🟢)12.393s (-13.4% 🟢)0.406s81.00x
💻 LocalNext.js (Turbopack)12.945s13.023s0.078s71.08x
🐘 PostgresNext.js (Turbopack)13.222s14.015s0.794s71.11x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express32.014s (-73.6% 🟢)33.895s (-72.6% 🟢)1.881s31.00x
▲ VercelNext.js (Turbopack)32.210s (-91.8% 🟢)33.857s (-91.4% 🟢)1.647s31.01x
▲ VercelNitro32.225s (-92.4% 🟢)34.212s (-91.9% 🟢)1.987s31.01x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.141s (-10.5% 🟢)2.006s (~)0.865s151.00x
🐘 PostgresExpress1.150s (-8.7% 🟢)2.007s (~)0.857s151.01x
💻 LocalExpress1.176s (-21.0% 🟢)2.007s (~)0.831s151.03x
💻 LocalNitro1.185s (-27.4% 🟢)2.007s (-3.2%)0.822s151.04x
🐘 PostgresNext.js (Turbopack)1.198s2.007s0.809s151.05x
💻 LocalNext.js (Turbopack)1.279s2.006s0.728s151.12x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.551s (-10.8% 🟢)4.135s (-10.6% 🟢)1.584s81.00x
▲ VercelNext.js (Turbopack)2.592s (-23.7% 🟢)4.220s (-14.5% 🟢)1.628s81.02x
▲ VercelNitro2.674s (-5.1% 🟢)4.354s (+0.7%)1.680s71.05x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.191s (-49.3% 🟢)2.006s (-33.3% 🟢)0.815s151.00x
🐘 PostgresExpress1.212s (-48.7% 🟢)2.007s (-33.3% 🟢)0.796s151.02x
🐘 PostgresNext.js (Turbopack)1.339s2.006s0.667s151.12x
💻 LocalNitro1.771s (-43.7% 🟢)2.006s (-48.4% 🟢)0.236s151.49x
💻 LocalNext.js (Turbopack)1.799s2.073s0.274s151.51x
💻 LocalExpress1.891s (-35.9% 🟢)2.142s (-38.0% 🟢)0.250s151.59x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.385s (-16.5% 🟢)4.730s (-20.1% 🟢)1.345s71.00x
▲ VercelExpress3.711s (+2.5%)5.633s (+10.2% 🔺)1.922s61.10x
▲ VercelNext.js (Turbopack)4.474s (-37.0% 🟢)5.883s (-33.9% 🟢)1.408s61.32x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.301s (-62.6% 🟢)2.007s (-49.9% 🟢)0.707s151.00x
🐘 PostgresExpress1.323s (-62.0% 🟢)2.007s (-49.9% 🟢)0.684s151.02x
🐘 PostgresNext.js (Turbopack)1.595s2.007s0.412s151.23x
💻 LocalNext.js (Turbopack)4.947s5.344s0.397s63.80x
💻 LocalNitro5.412s (-35.2% 🟢)5.847s (-35.2% 🟢)0.435s64.16x
💻 LocalExpress5.621s (-32.6% 🟢)6.013s (-33.4% 🟢)0.391s54.32x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.258s (+24.0% 🔺)7.088s (+15.7% 🔺)1.831s51.00x
▲ VercelNext.js (Turbopack)6.447s (-27.7% 🟢)7.992s (-27.1% 🟢)1.544s41.23x
▲ VercelNitro6.804s (+93.0% 🔺)8.588s (+55.2% 🔺)1.784s41.29x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.131s (-10.0% 🟢)2.007s (~)0.876s151.00x
🐘 PostgresExpress1.158s (-7.9% 🟢)2.008s (~)0.850s151.02x
🐘 PostgresNext.js (Turbopack)1.198s2.006s0.808s151.06x
💻 LocalNext.js (Turbopack)1.303s2.006s0.703s151.15x
💻 LocalNitro1.410s (-24.4% 🟢)2.006s (-14.3% 🟢)0.595s151.25x
💻 LocalExpress1.460s (-22.9% 🟢)2.006s (-15.1% 🟢)0.546s151.29x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.421s (-17.4% 🟢)3.689s (-20.5% 🟢)1.268s91.00x
▲ VercelNitro2.507s (+2.0%)3.960s (-5.0% 🟢)1.452s81.04x
▲ VercelExpress2.626s (+1.7%)4.498s (+3.4%)1.872s71.08x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.182s (-49.5% 🟢)2.007s (-33.3% 🟢)0.825s151.00x
🐘 PostgresExpress1.212s (-48.2% 🟢)2.009s (-33.3% 🟢)0.797s151.03x
🐘 PostgresNext.js (Turbopack)1.353s2.008s0.654s151.14x
💻 LocalNext.js (Turbopack)2.024s2.674s0.650s121.71x
💻 LocalExpress2.077s (-33.7% 🟢)2.508s (-33.3% 🟢)0.431s121.76x
💻 LocalNitro2.081s (-32.1% 🟢)2.507s (-35.5% 🟢)0.427s121.76x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.363s (+5.3% 🔺)5.109s (+6.6% 🔺)1.746s61.00x
▲ VercelNitro3.543s (+9.6% 🔺)4.722s (-7.0% 🟢)1.179s71.05x
▲ VercelNext.js (Turbopack)3.827s (+21.8% 🔺)5.241s (+15.9% 🔺)1.414s61.14x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.288s (-63.0% 🟢)2.007s (-49.9% 🟢)0.719s151.00x
🐘 PostgresExpress1.318s (-62.3% 🟢)2.008s (-49.9% 🟢)0.690s151.02x
🐘 PostgresNext.js (Turbopack)1.603s2.010s0.408s151.24x
💻 LocalNext.js (Turbopack)5.253s6.013s0.760s54.08x
💻 LocalNitro5.567s (-39.1% 🟢)6.014s (-40.0% 🟢)0.447s54.32x
💻 LocalExpress6.097s (-30.7% 🟢)6.415s (-30.8% 🟢)0.318s54.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.083s (-20.8% 🟢)6.959s (-14.9% 🟢)1.876s51.00x
▲ VercelNitro5.184s (+1.8%)7.046s (+3.4%)1.862s51.02x
▲ VercelNext.js (Turbopack)5.777s (-14.5% 🟢)7.101s (-16.9% 🟢)1.323s51.14x

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

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.442s (-46.1% 🟢)1.006s (~)0.564s601.00x
💻 LocalExpress0.484s (-50.8% 🟢)1.004s (-6.7% 🟢)0.520s601.10x
🐘 PostgresExpress0.486s (-42.1% 🟢)1.024s (~)0.538s591.10x
💻 LocalNitro0.525s (-46.5% 🟢)1.005s (-8.1% 🟢)0.480s601.19x
🐘 PostgresNext.js (Turbopack)0.682s1.006s0.325s601.54x
💻 LocalNext.js (Turbopack)0.705s1.005s0.300s601.59x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.886s (-74.3% 🟢)6.422s (-69.9% 🟢)1.536s101.00x
▲ VercelNitro5.443s (-75.3% 🟢)6.976s (-71.0% 🟢)1.533s91.11x
▲ VercelNext.js (Turbopack)5.491s (-62.1% 🟢)6.854s (-57.4% 🟢)1.362s91.12x

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

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.031s (-47.8% 🟢)1.586s (-29.8% 🟢)0.555s571.00x
🐘 PostgresNitro1.053s (-45.4% 🟢)1.603s (-23.7% 🟢)0.550s571.02x
💻 LocalExpress1.209s (-59.9% 🟢)2.006s (-44.1% 🟢)0.797s451.17x
💻 LocalNitro1.225s (-59.6% 🟢)2.006s (-46.6% 🟢)0.781s451.19x
🐘 PostgresNext.js (Turbopack)1.631s2.009s0.377s451.58x
💻 LocalNext.js (Turbopack)1.767s2.006s0.239s451.71x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.045s (-73.8% 🟢)14.636s (-71.7% 🟢)1.592s71.00x
▲ VercelExpress13.474s (-61.0% 🟢)15.249s (-58.6% 🟢)1.776s61.03x
▲ VercelNitro13.618s (-65.5% 🟢)15.326s (-62.9% 🟢)1.708s61.04x

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

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.009s (-51.0% 🟢)2.407s (-47.7% 🟢)0.398s501.00x
🐘 PostgresExpress2.175s (-45.5% 🟢)2.758s (-36.9% 🟢)0.583s441.08x
💻 LocalExpress2.767s (-70.0% 🟢)3.032s (-69.7% 🟢)0.265s401.38x
💻 LocalNitro2.796s (-69.9% 🟢)3.033s (-69.7% 🟢)0.237s401.39x
🐘 PostgresNext.js (Turbopack)3.182s4.009s0.827s301.58x
💻 LocalNext.js (Turbopack)3.712s4.008s0.296s301.85x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express27.669s (-78.7% 🟢)29.488s (-77.7% 🟢)1.819s51.00x
▲ VercelNitro29.741s (-69.3% 🟢)31.477s (-68.0% 🟢)1.736s41.07x
▲ VercelNext.js (Turbopack)31.048s (-71.0% 🟢)32.776s (-69.9% 🟢)1.727s41.12x

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

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.163s (-42.6% 🟢)1.005s (~)0.843s601.00x
🐘 PostgresExpress0.171s (-39.4% 🟢)1.006s (~)0.835s601.05x
🐘 PostgresNext.js (Turbopack)0.229s1.006s0.777s601.41x
💻 LocalNitro0.412s (-31.8% 🟢)1.004s (-1.7%)0.592s602.54x
💻 LocalExpress0.419s (-25.2% 🟢)1.004s (~)0.585s602.58x
💻 LocalNext.js (Turbopack)0.510s1.004s0.494s603.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.414s (+45.3% 🔺)4.251s (+26.9% 🔺)1.838s161.00x
▲ VercelExpress2.559s (+30.9% 🔺)4.101s (+12.7% 🔺)1.542s151.06x
▲ VercelNext.js (Turbopack)2.607s (+28.9% 🔺)3.926s (+3.5%)1.320s161.08x

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

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.282s (-43.3% 🟢)1.005s (~)0.724s901.00x
🐘 PostgresExpress0.306s (-39.9% 🟢)1.007s (~)0.701s901.09x
🐘 PostgresNext.js (Turbopack)0.449s1.007s0.558s901.59x
💻 LocalNitro2.140s (-15.7% 🟢)2.852s (-5.2% 🟢)0.712s327.60x
💻 LocalExpress2.162s (-14.0% 🟢)2.943s (-2.2%)0.781s317.68x
💻 LocalNext.js (Turbopack)2.219s2.944s0.726s317.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.743s (+55.7% 🔺)6.348s (+32.0% 🔺)1.604s151.00x
▲ VercelNitro5.316s (+64.8% 🔺)6.877s (+42.6% 🔺)1.561s141.12x
▲ VercelNext.js (Turbopack)5.355s (+51.5% 🔺)6.768s (+30.3% 🔺)1.413s141.13x

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

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.557s (-29.5% 🟢)1.005s (~)0.448s1201.00x
🐘 PostgresExpress0.626s (-23.6% 🟢)1.006s (-1.1%)0.380s1201.12x
🐘 PostgresNext.js (Turbopack)0.919s1.207s0.288s1001.65x
💻 LocalExpress10.512s (-6.1% 🟢)11.119s (-6.9% 🟢)0.607s1118.87x
💻 LocalNitro10.566s (-5.6% 🟢)11.119s (-4.7%)0.553s1118.97x
💻 LocalNext.js (Turbopack)10.761s11.481s0.720s1119.32x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro14.165s (+83.4% 🔺)15.767s (+67.7% 🔺)1.603s91.00x
▲ VercelNext.js (Turbopack)14.811s (+43.4% 🔺)16.301s (+32.7% 🔺)1.490s81.05x
▲ VercelExpress16.474s (+122.0% 🔺)18.379s (+98.8% 🔺)1.905s71.16x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.135s (+453.5% 🔺)2.002s (+100.3% 🔺)0.001s (-13.3% 🟢)2.009s (+98.7% 🔺)0.874s101.00x
💻 LocalExpress1.135s (+470.1% 🔺)2.006s (+99.7% 🔺)0.012s (+2.5%)2.020s (+98.5% 🔺)0.885s101.00x
🐘 PostgresExpress1.141s (+456.3% 🔺)2.001s (+100.4% 🔺)0.001s (-25.0% 🟢)2.011s (+98.9% 🔺)0.871s101.01x
💻 LocalNitro1.142s (+434.4% 🔺)2.005s (+99.6% 🔺)0.013s (+0.8%)2.020s (+98.3% 🔺)0.878s101.01x
💻 LocalNext.js (Turbopack)1.170s2.004s0.012s2.019s0.849s101.03x
🐘 PostgresNext.js (Turbopack)1.195s2.002s0.002s2.011s0.815s101.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.151s (-68.6% 🟢)2.881s (-66.7% 🟢)2.305s (+264.7% 🔺)5.547s (-43.3% 🟢)3.397s101.00x
▲ VercelNitro2.196s (-42.7% 🟢)2.985s (-43.4% 🟢)2.267s (+205.5% 🔺)5.704s (-12.0% 🟢)3.508s101.02x
▲ VercelExpress2.949s (+17.7% 🔺)4.011s (-1.9%)14.047s (+1362.0% 🔺)18.574s (+232.2% 🔺)15.625s101.37x

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

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.498s (+140.0% 🔺)2.007s (+99.3% 🔺)0.003s (-19.4% 🟢)2.022s (+97.8% 🔺)0.524s301.00x
🐘 PostgresExpress1.520s (+141.3% 🔺)2.006s (+99.3% 🔺)0.004s (+4.4%)2.025s (+98.0% 🔺)0.505s301.01x
💻 LocalNitro1.555s (+85.4% 🔺)2.013s (+98.9% 🔺)0.011s (+16.0% 🔺)2.026s (+81.5% 🔺)0.471s301.04x
💻 LocalNext.js (Turbopack)1.657s2.014s0.010s2.026s0.369s301.11x
🐘 PostgresNext.js (Turbopack)1.712s2.010s0.004s2.028s0.316s301.14x
💻 LocalExpress1.739s (+129.7% 🔺)2.012s (+95.6% 🔺)0.011s (+13.9% 🔺)2.198s (+111.4% 🔺)0.459s291.16x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.010s (-64.5% 🟢)6.776s (-62.9% 🟢)0.173s (-18.3% 🟢)7.342s (-61.2% 🟢)1.331s91.00x
▲ VercelNitro6.068s (-79.4% 🟢)7.063s (-77.1% 🟢)0.275s (+145.2% 🔺)7.733s (-75.7% 🟢)1.664s81.01x
▲ VercelExpress6.459s (-0.7%)7.852s (-2.0%)0.234s (-42.7% 🟢)8.609s (-2.6%)2.149s71.07x

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

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.610s (-37.1% 🟢)1.016s (-18.6% 🟢)0.000s (-58.6% 🟢)1.038s (-17.5% 🟢)0.428s581.00x
🐘 PostgresExpress0.695s (-27.6% 🟢)1.052s (-17.7% 🟢)0.000s (+101.8% 🔺)1.064s (-18.5% 🟢)0.369s571.14x
🐘 PostgresNext.js (Turbopack)0.768s1.053s0.000s1.059s0.292s571.26x
💻 LocalExpress1.370s (+11.8% 🔺)2.015s (~)0.000s (-50.0% 🟢)2.017s (~)0.647s302.25x
💻 LocalNext.js (Turbopack)1.402s2.013s0.000s2.016s0.615s302.30x
💻 LocalNitro1.431s (+17.0% 🔺)2.016s (~)0.000s (-66.7% 🟢)2.018s (~)0.587s302.35x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.669s (+20.3% 🔺)4.647s (+5.8% 🔺)0.000s (-100.0% 🟢)5.059s (+5.2% 🔺)1.389s121.00x
▲ VercelExpress3.790s (+1.3%)5.277s (+3.4%)0.000s (-100.0% 🟢)5.812s (+5.1% 🔺)2.022s111.03x
▲ VercelNext.js (Turbopack)3.849s (-62.2% 🟢)4.996s (-56.6% 🟢)0.000s (+Infinity% 🔺)5.474s (-54.6% 🟢)1.625s111.05x

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

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.254s (-30.0% 🟢)1.847s (-13.7% 🟢)0.000s (+154.5% 🔺)1.872s (-13.9% 🟢)0.617s331.00x
🐘 PostgresExpress1.325s (-25.2% 🟢)2.066s (-5.1% 🟢)0.000s (NaN%)2.076s (-5.6% 🟢)0.751s301.06x
🐘 PostgresNext.js (Turbopack)1.530s2.106s0.000s2.114s0.585s291.22x
💻 LocalNext.js (Turbopack)2.579s3.187s0.000s3.190s0.611s192.06x
💻 LocalExpress3.164s (-8.7% 🟢)4.029s (~)0.001s (-33.3% 🟢)4.032s (~)0.867s152.52x
💻 LocalNitro3.346s (-1.2%)3.968s (-1.6%)0.001s (+28.9% 🔺)3.971s (-1.6%)0.625s162.67x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.599s (~)6.937s (-0.6%)0.000s (-11.1% 🟢)7.371s (-2.2%)1.772s91.00x
▲ VercelExpress7.865s (+71.5% 🔺)9.206s (+52.9% 🔺)0.000s (+Infinity% 🔺)9.666s (+49.7% 🔺)1.801s71.40x
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress12/21
🐘 PostgresNitro19/21
▲ VercelExpress8/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres15/21
Next.js (Turbopack)🐘 Postgres14/21
Nitro🐘 Postgres18/21
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
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production122202191441
✅ 💻 Local Development161502191834
✅ 📦 Local Production161502191834
✅ 🐘 Local Postgres161502191834
✅ 🪟 Windows13100131
✅ 📋 Other7410176917
Total6939010527991

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro105026
✅ example105026
✅ express105026
✅ fastify105026
✅ hono105026
✅ nextjs-turbopack12902
✅ nextjs-webpack12902
✅ nitro105026
✅ nuxt105026
✅ sveltekit12407
✅ vite105026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13100
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable106025
✅ e2e-local-dev-tanstack-start-106025
✅ e2e-local-postgres-nest-stable106025
✅ e2e-local-postgres-tanstack-start-106025
✅ e2e-local-prod-nest-stable106025
✅ e2e-local-prod-tanstack-start-106025
✅ e2e-vercel-prod-tanstack-start105026

📋 View full workflow run

@karthikscale3karthikscale3 changed the title docs(cookbook): clarify tools are not individually durable in streamText patternFix cookbook pattern for AI SDKMay 22, 2026
@karthikscale3karthikscale3 changed the title Fix cookbook pattern for AI SDK[Docs] Fix cookbook pattern for AI SDKMay 22, 2026
@karthikscale3
karthikscale3force-pushed the karthik/cookbook-ai-sdk-tools-not-durable branch from 027316f to c661ac8CompareMay 22, 2026 23:56
@vercel

vercelBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

@karthikscale3
karthikscale3 deleted the karthik/cookbook-ai-sdk-tools-not-durable branch May 22, 2026 23:57
@karthikscale3
karthikscale3 restored the karthik/cookbook-ai-sdk-tools-not-durable branch May 22, 2026 23:59
Comment threaddocs/content/docs/v4/cookbook/integrations/ai-sdk.mdx Outdated

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM assuming this was tested, some wording nits

Comment threaddocs/content/docs/v4/cookbook/integrations/ai-sdk.mdx Outdated
karthikscale3and others added 4 commits May 25, 2026 09:59
The AI SDK cookbook entry presented `streamText` inside a `"use step"`
turn function with tools also marked `"use step"`. That implies tools
are individually durable, but the `"use step"` directive is a no-op
when called from another step — so tools run as plain inline functions
inside `runTurn`, and the durability boundary is the entire turn.
Changes:
- Remove the `"use step"` directive from tool implementations in the
workflow code sample and add an explanatory comment.
- Update the frontmatter summary and intro paragraph to drop the
inaccurate "tools remain durable steps" claim.
- Add a "Tools are not individually durable" entry to Pitfalls with
consequences and mitigations (idempotency or `DurableAgent`).
- Add a `runTurn` durability-boundary bullet to "How it works".
- Add a "Tool call durability" row to the `streamText` vs `DurableAgent`
comparison table.
- Fix two misleading Key APIs bullets that claimed tools wrap
`"use step"` functions and that `"use step"` makes tool executions
durable.
Applied identically to both v4 and v5 cookbook entries.
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Karthik Kalyan <105607645+karthikscale3@users.noreply.github.com>
The callout and comparison table incorrectly claimed DurableAgent lacks stopWhen, structured output, and onStepFinish — update them to reflect the actual implementation and clarify when raw streamText() is still appropriate.
Co-authored-by: Cursor <cursoragent@cursor.com>
Address review feedback: the inline comment should explain how tools run inside runTurn without referencing removed "use step" directives.
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

No backport to stable for ff167d0 (AI decision).

This commit only modifies docs/content/docs/v4/cookbook/integrations/ai-sdk.mdx and docs/content/docs/v5/cookbook/integrations/ai-sdk.mdx. Verified via git ls-tree origin/stable that the v4/v5 versioned docs directory structure (and the cookbook/integrations/ai-sdk.mdx files) does not exist on stable — stable has a flat docs/content/docs/ layout. There is nothing to backport.

To override, re-run the Backport to stable workflow manually via workflow_dispatch and paste this commit SHA into the ref input:

ff167d005d7b13163fe5819e132266afe3501fa4

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

@karthikscale3@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' [Docs] Fix cookbook pattern for AI SDK by karthikscale3 · Pull Request #2099 · vercel/workflow · GitHub
Skip to content

[Docs] Fix cookbook pattern for AI SDK - #2099

Merged
karthikscale3 merged 4 commits into
mainfrom
karthik/cookbook-ai-sdk-tools-not-durable
May 25, 2026
Merged

[Docs] Fix cookbook pattern for AI SDK#2099
karthikscale3 merged 4 commits into
mainfrom
karthik/cookbook-ai-sdk-tools-not-durable

Conversation

@karthikscale3

@karthikscale3karthikscale3 commented May 22, 2026

Copy link
Copy Markdown
Contributor

Summary

The AI SDK cookbook entry (docs/content/docs/v{4,5}/cookbook/integrations/ai-sdk.mdx) shows streamText inside a "use step" turn function with the example tools (lookupOrder, processRefund) also marked "use step". That presentation implies tool calls are individually durable, but per Workflows & Steps the "use step" directive is a no-op when called from another step. So in this pattern tools run as plain inline functions inside runTurn, and the durability boundary is the entire turn — if anything in the turn throws, every tool call that already ran is replayed.

This PR fixes the cookbook to reflect that reality and gives readers an explicit migration path (idempotent tools or DurableAgent).

Changes (applied identically to v4 and v5)

  • Removed the "use step" directive from lookupOrder and processRefund in the workflow code sample, with an inline comment explaining why.
  • Updated the frontmatter summary and intro paragraph: dropped the inaccurate "tools remain durable steps" claim; explicitly call out the per-turn durability boundary.
  • Added a new Tools are not individually durable entry to Pitfalls covering:
    • The retry unit is runTurn, not the tool call.
    • A side-effectful tool (e.g. processRefund) can run multiple times if the turn retries.
    • Mitigations: idempotent tool implementations, or DurableAgent (each tool call becomes its own durable step).
  • Added a runTurn durability-boundary bullet to How it works.
  • Added a Tool call durability row to the streamText vs DurableAgent table.
  • Rewrote two misleading Key APIs bullets:
    • tool() no longer claims tools wrap "use step" functions / are replayed from the log.
    • "use step" is now described as applied to runTurn, not to "tool executions".
  • Corrected outdated DurableAgent guidance after verifying the implementation:
    • Callout no longer claims DurableAgent lacks stopWhen, structured output, or onStepFinish — it reimplements the same agent loop and already supports those options.
    • Rewrote When to use streamText directly to focus on the raw AI SDK API, per-turn durability boundaries, and custom multi-turn orchestration (hook loops, sliceUntilFinish).
    • Updated the streamText vs DurableAgent comparison table: both support stopWhen/prepareStep; DurableAgent supports experimental_output and step callbacks (onStepFinish, onFinish, etc.); noted onChunk as the main gap.

Test plan

  • Visual check of the rendered /cookbook/integrations/ai-sdk page on v4 and v5.
  • Confirm the new in-page anchor (#tools-are-not-individually-durable) resolves from the intro paragraph, How it works, and Key APIs cross-links.
  • Confirm the code sample still typechecks in the docs typecheck pipeline.

Made with Cursor

@karthikscale3
karthikscale3 requested a review from a team as a code ownerMay 22, 2026 23:54
@changeset-bot

changeset-botBot commented May 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3270975

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@github-actions

github-actionsBot commented May 22, 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
💻 Local🥇 Express0.031s (-30.5% 🟢)1.006s (~)0.975s101.00x
💻 LocalNitro0.033s (-23.7% 🟢)1.006s (~)0.973s101.07x
🐘 PostgresNitro0.042s (-55.7% 🟢)1.010s (-3.1%)0.968s101.37x
💻 LocalNext.js (Turbopack)0.048s1.006s0.958s101.55x
🐘 PostgresExpress0.053s (-8.1% 🟢)1.014s (~)0.960s101.73x
🐘 PostgresNext.js (Turbopack)0.056s1.011s0.955s101.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.279s (-31.9% 🟢)2.044s (-18.6% 🟢)1.764s101.00x
▲ VercelExpress0.296s (+25.6% 🔺)2.469s (+15.6% 🔺)2.173s101.06x
▲ VercelNext.js (Turbopack)0.304s (+21.0% 🔺)2.151s (-7.8% 🟢)1.847s101.09x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.075s (-4.4%)2.006s (~)0.931s101.00x
💻 LocalNitro1.076s (-4.9%)2.006s (~)0.930s101.00x
🐘 PostgresNitro1.079s (-5.4% 🟢)2.008s (~)0.929s101.00x
🐘 PostgresExpress1.083s (-5.5% 🟢)2.009s (~)0.926s101.01x
💻 LocalNext.js (Turbopack)1.112s2.006s0.895s101.03x
🐘 PostgresNext.js (Turbopack)1.120s2.009s0.890s101.04x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.585s (-22.1% 🟢)3.301s (-13.8% 🟢)1.716s101.00x
▲ VercelNitro1.677s (-56.9% 🟢)3.257s (-44.9% 🟢)1.579s101.06x
▲ VercelExpress1.731s (-7.7% 🟢)3.615s (-5.1% 🟢)1.884s101.09x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro10.423s (-4.1%)11.015s (~)0.592s31.00x
💻 LocalExpress10.423s (-4.6%)11.021s (~)0.598s31.00x
💻 LocalNitro10.425s (-4.8%)11.021s (~)0.596s31.00x
🐘 PostgresExpress10.445s (-4.7%)11.017s (~)0.572s31.00x
💻 LocalNext.js (Turbopack)10.652s11.020s0.367s31.02x
🐘 PostgresNext.js (Turbopack)10.694s11.020s0.326s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro13.232s (-44.2% 🟢)15.258s (-39.2% 🟢)2.026s21.00x
▲ VercelNext.js (Turbopack)13.769s (-20.5% 🟢)15.278s (-21.2% 🟢)1.509s21.04x
▲ VercelExpress16.197s (-4.6%)17.973s (-10.2% 🟢)1.777s21.22x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro13.457s (-7.8% 🟢)14.018s (-6.7% 🟢)0.561s51.00x
🐘 PostgresExpress13.492s (-7.5% 🟢)14.017s (-6.7% 🟢)0.525s51.00x
💻 LocalExpress13.498s (-9.8% 🟢)14.027s (-6.7% 🟢)0.529s51.00x
💻 LocalNitro13.506s (-10.3% 🟢)14.029s (-12.5% 🟢)0.523s51.00x
💻 LocalNext.js (Turbopack)14.038s15.029s0.991s41.04x
🐘 PostgresNext.js (Turbopack)14.121s15.019s0.898s41.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro21.119s (-67.2% 🟢)22.768s (-65.8% 🟢)1.649s31.00x
▲ VercelExpress21.128s (-58.0% 🟢)22.810s (-56.6% 🟢)1.683s31.00x
▲ VercelNext.js (Turbopack)21.868s (-58.4% 🟢)22.948s (-58.0% 🟢)1.080s31.04x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express11.935s (-28.1% 🟢)12.022s (-29.4% 🟢)0.087s81.00x
🐘 PostgresExpress11.955s (-14.7% 🟢)12.142s (-16.8% 🟢)0.187s81.00x
💻 LocalNitro11.982s (-28.6% 🟢)12.147s (-28.7% 🟢)0.165s81.00x
🐘 PostgresNitro11.987s (-14.2% 🟢)12.393s (-13.4% 🟢)0.406s81.00x
💻 LocalNext.js (Turbopack)12.945s13.023s0.078s71.08x
🐘 PostgresNext.js (Turbopack)13.222s14.015s0.794s71.11x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express32.014s (-73.6% 🟢)33.895s (-72.6% 🟢)1.881s31.00x
▲ VercelNext.js (Turbopack)32.210s (-91.8% 🟢)33.857s (-91.4% 🟢)1.647s31.01x
▲ VercelNitro32.225s (-92.4% 🟢)34.212s (-91.9% 🟢)1.987s31.01x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.141s (-10.5% 🟢)2.006s (~)0.865s151.00x
🐘 PostgresExpress1.150s (-8.7% 🟢)2.007s (~)0.857s151.01x
💻 LocalExpress1.176s (-21.0% 🟢)2.007s (~)0.831s151.03x
💻 LocalNitro1.185s (-27.4% 🟢)2.007s (-3.2%)0.822s151.04x
🐘 PostgresNext.js (Turbopack)1.198s2.007s0.809s151.05x
💻 LocalNext.js (Turbopack)1.279s2.006s0.728s151.12x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.551s (-10.8% 🟢)4.135s (-10.6% 🟢)1.584s81.00x
▲ VercelNext.js (Turbopack)2.592s (-23.7% 🟢)4.220s (-14.5% 🟢)1.628s81.02x
▲ VercelNitro2.674s (-5.1% 🟢)4.354s (+0.7%)1.680s71.05x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.191s (-49.3% 🟢)2.006s (-33.3% 🟢)0.815s151.00x
🐘 PostgresExpress1.212s (-48.7% 🟢)2.007s (-33.3% 🟢)0.796s151.02x
🐘 PostgresNext.js (Turbopack)1.339s2.006s0.667s151.12x
💻 LocalNitro1.771s (-43.7% 🟢)2.006s (-48.4% 🟢)0.236s151.49x
💻 LocalNext.js (Turbopack)1.799s2.073s0.274s151.51x
💻 LocalExpress1.891s (-35.9% 🟢)2.142s (-38.0% 🟢)0.250s151.59x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.385s (-16.5% 🟢)4.730s (-20.1% 🟢)1.345s71.00x
▲ VercelExpress3.711s (+2.5%)5.633s (+10.2% 🔺)1.922s61.10x
▲ VercelNext.js (Turbopack)4.474s (-37.0% 🟢)5.883s (-33.9% 🟢)1.408s61.32x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.301s (-62.6% 🟢)2.007s (-49.9% 🟢)0.707s151.00x
🐘 PostgresExpress1.323s (-62.0% 🟢)2.007s (-49.9% 🟢)0.684s151.02x
🐘 PostgresNext.js (Turbopack)1.595s2.007s0.412s151.23x
💻 LocalNext.js (Turbopack)4.947s5.344s0.397s63.80x
💻 LocalNitro5.412s (-35.2% 🟢)5.847s (-35.2% 🟢)0.435s64.16x
💻 LocalExpress5.621s (-32.6% 🟢)6.013s (-33.4% 🟢)0.391s54.32x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.258s (+24.0% 🔺)7.088s (+15.7% 🔺)1.831s51.00x
▲ VercelNext.js (Turbopack)6.447s (-27.7% 🟢)7.992s (-27.1% 🟢)1.544s41.23x
▲ VercelNitro6.804s (+93.0% 🔺)8.588s (+55.2% 🔺)1.784s41.29x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.131s (-10.0% 🟢)2.007s (~)0.876s151.00x
🐘 PostgresExpress1.158s (-7.9% 🟢)2.008s (~)0.850s151.02x
🐘 PostgresNext.js (Turbopack)1.198s2.006s0.808s151.06x
💻 LocalNext.js (Turbopack)1.303s2.006s0.703s151.15x
💻 LocalNitro1.410s (-24.4% 🟢)2.006s (-14.3% 🟢)0.595s151.25x
💻 LocalExpress1.460s (-22.9% 🟢)2.006s (-15.1% 🟢)0.546s151.29x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.421s (-17.4% 🟢)3.689s (-20.5% 🟢)1.268s91.00x
▲ VercelNitro2.507s (+2.0%)3.960s (-5.0% 🟢)1.452s81.04x
▲ VercelExpress2.626s (+1.7%)4.498s (+3.4%)1.872s71.08x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.182s (-49.5% 🟢)2.007s (-33.3% 🟢)0.825s151.00x
🐘 PostgresExpress1.212s (-48.2% 🟢)2.009s (-33.3% 🟢)0.797s151.03x
🐘 PostgresNext.js (Turbopack)1.353s2.008s0.654s151.14x
💻 LocalNext.js (Turbopack)2.024s2.674s0.650s121.71x
💻 LocalExpress2.077s (-33.7% 🟢)2.508s (-33.3% 🟢)0.431s121.76x
💻 LocalNitro2.081s (-32.1% 🟢)2.507s (-35.5% 🟢)0.427s121.76x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.363s (+5.3% 🔺)5.109s (+6.6% 🔺)1.746s61.00x
▲ VercelNitro3.543s (+9.6% 🔺)4.722s (-7.0% 🟢)1.179s71.05x
▲ VercelNext.js (Turbopack)3.827s (+21.8% 🔺)5.241s (+15.9% 🔺)1.414s61.14x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.288s (-63.0% 🟢)2.007s (-49.9% 🟢)0.719s151.00x
🐘 PostgresExpress1.318s (-62.3% 🟢)2.008s (-49.9% 🟢)0.690s151.02x
🐘 PostgresNext.js (Turbopack)1.603s2.010s0.408s151.24x
💻 LocalNext.js (Turbopack)5.253s6.013s0.760s54.08x
💻 LocalNitro5.567s (-39.1% 🟢)6.014s (-40.0% 🟢)0.447s54.32x
💻 LocalExpress6.097s (-30.7% 🟢)6.415s (-30.8% 🟢)0.318s54.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.083s (-20.8% 🟢)6.959s (-14.9% 🟢)1.876s51.00x
▲ VercelNitro5.184s (+1.8%)7.046s (+3.4%)1.862s51.02x
▲ VercelNext.js (Turbopack)5.777s (-14.5% 🟢)7.101s (-16.9% 🟢)1.323s51.14x

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

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.442s (-46.1% 🟢)1.006s (~)0.564s601.00x
💻 LocalExpress0.484s (-50.8% 🟢)1.004s (-6.7% 🟢)0.520s601.10x
🐘 PostgresExpress0.486s (-42.1% 🟢)1.024s (~)0.538s591.10x
💻 LocalNitro0.525s (-46.5% 🟢)1.005s (-8.1% 🟢)0.480s601.19x
🐘 PostgresNext.js (Turbopack)0.682s1.006s0.325s601.54x
💻 LocalNext.js (Turbopack)0.705s1.005s0.300s601.59x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.886s (-74.3% 🟢)6.422s (-69.9% 🟢)1.536s101.00x
▲ VercelNitro5.443s (-75.3% 🟢)6.976s (-71.0% 🟢)1.533s91.11x
▲ VercelNext.js (Turbopack)5.491s (-62.1% 🟢)6.854s (-57.4% 🟢)1.362s91.12x

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

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.031s (-47.8% 🟢)1.586s (-29.8% 🟢)0.555s571.00x
🐘 PostgresNitro1.053s (-45.4% 🟢)1.603s (-23.7% 🟢)0.550s571.02x
💻 LocalExpress1.209s (-59.9% 🟢)2.006s (-44.1% 🟢)0.797s451.17x
💻 LocalNitro1.225s (-59.6% 🟢)2.006s (-46.6% 🟢)0.781s451.19x
🐘 PostgresNext.js (Turbopack)1.631s2.009s0.377s451.58x
💻 LocalNext.js (Turbopack)1.767s2.006s0.239s451.71x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.045s (-73.8% 🟢)14.636s (-71.7% 🟢)1.592s71.00x
▲ VercelExpress13.474s (-61.0% 🟢)15.249s (-58.6% 🟢)1.776s61.03x
▲ VercelNitro13.618s (-65.5% 🟢)15.326s (-62.9% 🟢)1.708s61.04x

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

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.009s (-51.0% 🟢)2.407s (-47.7% 🟢)0.398s501.00x
🐘 PostgresExpress2.175s (-45.5% 🟢)2.758s (-36.9% 🟢)0.583s441.08x
💻 LocalExpress2.767s (-70.0% 🟢)3.032s (-69.7% 🟢)0.265s401.38x
💻 LocalNitro2.796s (-69.9% 🟢)3.033s (-69.7% 🟢)0.237s401.39x
🐘 PostgresNext.js (Turbopack)3.182s4.009s0.827s301.58x
💻 LocalNext.js (Turbopack)3.712s4.008s0.296s301.85x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express27.669s (-78.7% 🟢)29.488s (-77.7% 🟢)1.819s51.00x
▲ VercelNitro29.741s (-69.3% 🟢)31.477s (-68.0% 🟢)1.736s41.07x
▲ VercelNext.js (Turbopack)31.048s (-71.0% 🟢)32.776s (-69.9% 🟢)1.727s41.12x

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

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.163s (-42.6% 🟢)1.005s (~)0.843s601.00x
🐘 PostgresExpress0.171s (-39.4% 🟢)1.006s (~)0.835s601.05x
🐘 PostgresNext.js (Turbopack)0.229s1.006s0.777s601.41x
💻 LocalNitro0.412s (-31.8% 🟢)1.004s (-1.7%)0.592s602.54x
💻 LocalExpress0.419s (-25.2% 🟢)1.004s (~)0.585s602.58x
💻 LocalNext.js (Turbopack)0.510s1.004s0.494s603.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.414s (+45.3% 🔺)4.251s (+26.9% 🔺)1.838s161.00x
▲ VercelExpress2.559s (+30.9% 🔺)4.101s (+12.7% 🔺)1.542s151.06x
▲ VercelNext.js (Turbopack)2.607s (+28.9% 🔺)3.926s (+3.5%)1.320s161.08x

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

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.282s (-43.3% 🟢)1.005s (~)0.724s901.00x
🐘 PostgresExpress0.306s (-39.9% 🟢)1.007s (~)0.701s901.09x
🐘 PostgresNext.js (Turbopack)0.449s1.007s0.558s901.59x
💻 LocalNitro2.140s (-15.7% 🟢)2.852s (-5.2% 🟢)0.712s327.60x
💻 LocalExpress2.162s (-14.0% 🟢)2.943s (-2.2%)0.781s317.68x
💻 LocalNext.js (Turbopack)2.219s2.944s0.726s317.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.743s (+55.7% 🔺)6.348s (+32.0% 🔺)1.604s151.00x
▲ VercelNitro5.316s (+64.8% 🔺)6.877s (+42.6% 🔺)1.561s141.12x
▲ VercelNext.js (Turbopack)5.355s (+51.5% 🔺)6.768s (+30.3% 🔺)1.413s141.13x

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

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.557s (-29.5% 🟢)1.005s (~)0.448s1201.00x
🐘 PostgresExpress0.626s (-23.6% 🟢)1.006s (-1.1%)0.380s1201.12x
🐘 PostgresNext.js (Turbopack)0.919s1.207s0.288s1001.65x
💻 LocalExpress10.512s (-6.1% 🟢)11.119s (-6.9% 🟢)0.607s1118.87x
💻 LocalNitro10.566s (-5.6% 🟢)11.119s (-4.7%)0.553s1118.97x
💻 LocalNext.js (Turbopack)10.761s11.481s0.720s1119.32x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro14.165s (+83.4% 🔺)15.767s (+67.7% 🔺)1.603s91.00x
▲ VercelNext.js (Turbopack)14.811s (+43.4% 🔺)16.301s (+32.7% 🔺)1.490s81.05x
▲ VercelExpress16.474s (+122.0% 🔺)18.379s (+98.8% 🔺)1.905s71.16x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.135s (+453.5% 🔺)2.002s (+100.3% 🔺)0.001s (-13.3% 🟢)2.009s (+98.7% 🔺)0.874s101.00x
💻 LocalExpress1.135s (+470.1% 🔺)2.006s (+99.7% 🔺)0.012s (+2.5%)2.020s (+98.5% 🔺)0.885s101.00x
🐘 PostgresExpress1.141s (+456.3% 🔺)2.001s (+100.4% 🔺)0.001s (-25.0% 🟢)2.011s (+98.9% 🔺)0.871s101.01x
💻 LocalNitro1.142s (+434.4% 🔺)2.005s (+99.6% 🔺)0.013s (+0.8%)2.020s (+98.3% 🔺)0.878s101.01x
💻 LocalNext.js (Turbopack)1.170s2.004s0.012s2.019s0.849s101.03x
🐘 PostgresNext.js (Turbopack)1.195s2.002s0.002s2.011s0.815s101.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.151s (-68.6% 🟢)2.881s (-66.7% 🟢)2.305s (+264.7% 🔺)5.547s (-43.3% 🟢)3.397s101.00x
▲ VercelNitro2.196s (-42.7% 🟢)2.985s (-43.4% 🟢)2.267s (+205.5% 🔺)5.704s (-12.0% 🟢)3.508s101.02x
▲ VercelExpress2.949s (+17.7% 🔺)4.011s (-1.9%)14.047s (+1362.0% 🔺)18.574s (+232.2% 🔺)15.625s101.37x

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

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.498s (+140.0% 🔺)2.007s (+99.3% 🔺)0.003s (-19.4% 🟢)2.022s (+97.8% 🔺)0.524s301.00x
🐘 PostgresExpress1.520s (+141.3% 🔺)2.006s (+99.3% 🔺)0.004s (+4.4%)2.025s (+98.0% 🔺)0.505s301.01x
💻 LocalNitro1.555s (+85.4% 🔺)2.013s (+98.9% 🔺)0.011s (+16.0% 🔺)2.026s (+81.5% 🔺)0.471s301.04x
💻 LocalNext.js (Turbopack)1.657s2.014s0.010s2.026s0.369s301.11x
🐘 PostgresNext.js (Turbopack)1.712s2.010s0.004s2.028s0.316s301.14x
💻 LocalExpress1.739s (+129.7% 🔺)2.012s (+95.6% 🔺)0.011s (+13.9% 🔺)2.198s (+111.4% 🔺)0.459s291.16x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.010s (-64.5% 🟢)6.776s (-62.9% 🟢)0.173s (-18.3% 🟢)7.342s (-61.2% 🟢)1.331s91.00x
▲ VercelNitro6.068s (-79.4% 🟢)7.063s (-77.1% 🟢)0.275s (+145.2% 🔺)7.733s (-75.7% 🟢)1.664s81.01x
▲ VercelExpress6.459s (-0.7%)7.852s (-2.0%)0.234s (-42.7% 🟢)8.609s (-2.6%)2.149s71.07x

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

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.610s (-37.1% 🟢)1.016s (-18.6% 🟢)0.000s (-58.6% 🟢)1.038s (-17.5% 🟢)0.428s581.00x
🐘 PostgresExpress0.695s (-27.6% 🟢)1.052s (-17.7% 🟢)0.000s (+101.8% 🔺)1.064s (-18.5% 🟢)0.369s571.14x
🐘 PostgresNext.js (Turbopack)0.768s1.053s0.000s1.059s0.292s571.26x
💻 LocalExpress1.370s (+11.8% 🔺)2.015s (~)0.000s (-50.0% 🟢)2.017s (~)0.647s302.25x
💻 LocalNext.js (Turbopack)1.402s2.013s0.000s2.016s0.615s302.30x
💻 LocalNitro1.431s (+17.0% 🔺)2.016s (~)0.000s (-66.7% 🟢)2.018s (~)0.587s302.35x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.669s (+20.3% 🔺)4.647s (+5.8% 🔺)0.000s (-100.0% 🟢)5.059s (+5.2% 🔺)1.389s121.00x
▲ VercelExpress3.790s (+1.3%)5.277s (+3.4%)0.000s (-100.0% 🟢)5.812s (+5.1% 🔺)2.022s111.03x
▲ VercelNext.js (Turbopack)3.849s (-62.2% 🟢)4.996s (-56.6% 🟢)0.000s (+Infinity% 🔺)5.474s (-54.6% 🟢)1.625s111.05x

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

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.254s (-30.0% 🟢)1.847s (-13.7% 🟢)0.000s (+154.5% 🔺)1.872s (-13.9% 🟢)0.617s331.00x
🐘 PostgresExpress1.325s (-25.2% 🟢)2.066s (-5.1% 🟢)0.000s (NaN%)2.076s (-5.6% 🟢)0.751s301.06x
🐘 PostgresNext.js (Turbopack)1.530s2.106s0.000s2.114s0.585s291.22x
💻 LocalNext.js (Turbopack)2.579s3.187s0.000s3.190s0.611s192.06x
💻 LocalExpress3.164s (-8.7% 🟢)4.029s (~)0.001s (-33.3% 🟢)4.032s (~)0.867s152.52x
💻 LocalNitro3.346s (-1.2%)3.968s (-1.6%)0.001s (+28.9% 🔺)3.971s (-1.6%)0.625s162.67x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.599s (~)6.937s (-0.6%)0.000s (-11.1% 🟢)7.371s (-2.2%)1.772s91.00x
▲ VercelExpress7.865s (+71.5% 🔺)9.206s (+52.9% 🔺)0.000s (+Infinity% 🔺)9.666s (+49.7% 🔺)1.801s71.40x
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress12/21
🐘 PostgresNitro19/21
▲ VercelExpress8/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres15/21
Next.js (Turbopack)🐘 Postgres14/21
Nitro🐘 Postgres18/21
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
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production122202191441
✅ 💻 Local Development161502191834
✅ 📦 Local Production161502191834
✅ 🐘 Local Postgres161502191834
✅ 🪟 Windows13100131
✅ 📋 Other7410176917
Total6939010527991

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro105026
✅ example105026
✅ express105026
✅ fastify105026
✅ hono105026
✅ nextjs-turbopack12902
✅ nextjs-webpack12902
✅ nitro105026
✅ nuxt105026
✅ sveltekit12407
✅ vite105026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13100
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable106025
✅ e2e-local-dev-tanstack-start-106025
✅ e2e-local-postgres-nest-stable106025
✅ e2e-local-postgres-tanstack-start-106025
✅ e2e-local-prod-nest-stable106025
✅ e2e-local-prod-tanstack-start-106025
✅ e2e-vercel-prod-tanstack-start105026

📋 View full workflow run

@karthikscale3karthikscale3 changed the title docs(cookbook): clarify tools are not individually durable in streamText patternFix cookbook pattern for AI SDKMay 22, 2026
@karthikscale3karthikscale3 changed the title Fix cookbook pattern for AI SDK[Docs] Fix cookbook pattern for AI SDKMay 22, 2026
@karthikscale3
karthikscale3force-pushed the karthik/cookbook-ai-sdk-tools-not-durable branch from 027316f to c661ac8CompareMay 22, 2026 23:56
@vercel

vercelBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

@karthikscale3
karthikscale3 deleted the karthik/cookbook-ai-sdk-tools-not-durable branch May 22, 2026 23:57
@karthikscale3
karthikscale3 restored the karthik/cookbook-ai-sdk-tools-not-durable branch May 22, 2026 23:59
Comment threaddocs/content/docs/v4/cookbook/integrations/ai-sdk.mdx Outdated

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM assuming this was tested, some wording nits

Comment threaddocs/content/docs/v4/cookbook/integrations/ai-sdk.mdx Outdated
karthikscale3and others added 4 commits May 25, 2026 09:59
The AI SDK cookbook entry presented `streamText` inside a `"use step"`
turn function with tools also marked `"use step"`. That implies tools
are individually durable, but the `"use step"` directive is a no-op
when called from another step — so tools run as plain inline functions
inside `runTurn`, and the durability boundary is the entire turn.
Changes:
- Remove the `"use step"` directive from tool implementations in the
workflow code sample and add an explanatory comment.
- Update the frontmatter summary and intro paragraph to drop the
inaccurate "tools remain durable steps" claim.
- Add a "Tools are not individually durable" entry to Pitfalls with
consequences and mitigations (idempotency or `DurableAgent`).
- Add a `runTurn` durability-boundary bullet to "How it works".
- Add a "Tool call durability" row to the `streamText` vs `DurableAgent`
comparison table.
- Fix two misleading Key APIs bullets that claimed tools wrap
`"use step"` functions and that `"use step"` makes tool executions
durable.
Applied identically to both v4 and v5 cookbook entries.
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Karthik Kalyan <105607645+karthikscale3@users.noreply.github.com>
The callout and comparison table incorrectly claimed DurableAgent lacks stopWhen, structured output, and onStepFinish — update them to reflect the actual implementation and clarify when raw streamText() is still appropriate.
Co-authored-by: Cursor <cursoragent@cursor.com>
Address review feedback: the inline comment should explain how tools run inside runTurn without referencing removed "use step" directives.
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

No backport to stable for ff167d0 (AI decision).

This commit only modifies docs/content/docs/v4/cookbook/integrations/ai-sdk.mdx and docs/content/docs/v5/cookbook/integrations/ai-sdk.mdx. Verified via git ls-tree origin/stable that the v4/v5 versioned docs directory structure (and the cookbook/integrations/ai-sdk.mdx files) does not exist on stable — stable has a flat docs/content/docs/ layout. There is nothing to backport.

To override, re-run the Backport to stable workflow manually via workflow_dispatch and paste this commit SHA into the ref input:

ff167d005d7b13163fe5819e132266afe3501fa4

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

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

[Docs] Fix cookbook pattern for AI SDK - #2099

Merged
karthikscale3 merged 4 commits into
mainfrom
karthik/cookbook-ai-sdk-tools-not-durable
May 25, 2026
Merged

[Docs] Fix cookbook pattern for AI SDK#2099
karthikscale3 merged 4 commits into
mainfrom
karthik/cookbook-ai-sdk-tools-not-durable

Conversation

@karthikscale3

@karthikscale3karthikscale3 commented May 22, 2026

Copy link
Copy Markdown
Contributor

Summary

The AI SDK cookbook entry (docs/content/docs/v{4,5}/cookbook/integrations/ai-sdk.mdx) shows streamText inside a "use step" turn function with the example tools (lookupOrder, processRefund) also marked "use step". That presentation implies tool calls are individually durable, but per Workflows & Steps the "use step" directive is a no-op when called from another step. So in this pattern tools run as plain inline functions inside runTurn, and the durability boundary is the entire turn — if anything in the turn throws, every tool call that already ran is replayed.

This PR fixes the cookbook to reflect that reality and gives readers an explicit migration path (idempotent tools or DurableAgent).

Changes (applied identically to v4 and v5)

  • Removed the "use step" directive from lookupOrder and processRefund in the workflow code sample, with an inline comment explaining why.
  • Updated the frontmatter summary and intro paragraph: dropped the inaccurate "tools remain durable steps" claim; explicitly call out the per-turn durability boundary.
  • Added a new Tools are not individually durable entry to Pitfalls covering:
    • The retry unit is runTurn, not the tool call.
    • A side-effectful tool (e.g. processRefund) can run multiple times if the turn retries.
    • Mitigations: idempotent tool implementations, or DurableAgent (each tool call becomes its own durable step).
  • Added a runTurn durability-boundary bullet to How it works.
  • Added a Tool call durability row to the streamText vs DurableAgent table.
  • Rewrote two misleading Key APIs bullets:
    • tool() no longer claims tools wrap "use step" functions / are replayed from the log.
    • "use step" is now described as applied to runTurn, not to "tool executions".
  • Corrected outdated DurableAgent guidance after verifying the implementation:
    • Callout no longer claims DurableAgent lacks stopWhen, structured output, or onStepFinish — it reimplements the same agent loop and already supports those options.
    • Rewrote When to use streamText directly to focus on the raw AI SDK API, per-turn durability boundaries, and custom multi-turn orchestration (hook loops, sliceUntilFinish).
    • Updated the streamText vs DurableAgent comparison table: both support stopWhen/prepareStep; DurableAgent supports experimental_output and step callbacks (onStepFinish, onFinish, etc.); noted onChunk as the main gap.

Test plan

  • Visual check of the rendered /cookbook/integrations/ai-sdk page on v4 and v5.
  • Confirm the new in-page anchor (#tools-are-not-individually-durable) resolves from the intro paragraph, How it works, and Key APIs cross-links.
  • Confirm the code sample still typechecks in the docs typecheck pipeline.

Made with Cursor

@karthikscale3
karthikscale3 requested a review from a team as a code ownerMay 22, 2026 23:54
@changeset-bot

changeset-botBot commented May 22, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3270975

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@github-actions

github-actionsBot commented May 22, 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
💻 Local🥇 Express0.031s (-30.5% 🟢)1.006s (~)0.975s101.00x
💻 LocalNitro0.033s (-23.7% 🟢)1.006s (~)0.973s101.07x
🐘 PostgresNitro0.042s (-55.7% 🟢)1.010s (-3.1%)0.968s101.37x
💻 LocalNext.js (Turbopack)0.048s1.006s0.958s101.55x
🐘 PostgresExpress0.053s (-8.1% 🟢)1.014s (~)0.960s101.73x
🐘 PostgresNext.js (Turbopack)0.056s1.011s0.955s101.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.279s (-31.9% 🟢)2.044s (-18.6% 🟢)1.764s101.00x
▲ VercelExpress0.296s (+25.6% 🔺)2.469s (+15.6% 🔺)2.173s101.06x
▲ VercelNext.js (Turbopack)0.304s (+21.0% 🔺)2.151s (-7.8% 🟢)1.847s101.09x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.075s (-4.4%)2.006s (~)0.931s101.00x
💻 LocalNitro1.076s (-4.9%)2.006s (~)0.930s101.00x
🐘 PostgresNitro1.079s (-5.4% 🟢)2.008s (~)0.929s101.00x
🐘 PostgresExpress1.083s (-5.5% 🟢)2.009s (~)0.926s101.01x
💻 LocalNext.js (Turbopack)1.112s2.006s0.895s101.03x
🐘 PostgresNext.js (Turbopack)1.120s2.009s0.890s101.04x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.585s (-22.1% 🟢)3.301s (-13.8% 🟢)1.716s101.00x
▲ VercelNitro1.677s (-56.9% 🟢)3.257s (-44.9% 🟢)1.579s101.06x
▲ VercelExpress1.731s (-7.7% 🟢)3.615s (-5.1% 🟢)1.884s101.09x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro10.423s (-4.1%)11.015s (~)0.592s31.00x
💻 LocalExpress10.423s (-4.6%)11.021s (~)0.598s31.00x
💻 LocalNitro10.425s (-4.8%)11.021s (~)0.596s31.00x
🐘 PostgresExpress10.445s (-4.7%)11.017s (~)0.572s31.00x
💻 LocalNext.js (Turbopack)10.652s11.020s0.367s31.02x
🐘 PostgresNext.js (Turbopack)10.694s11.020s0.326s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro13.232s (-44.2% 🟢)15.258s (-39.2% 🟢)2.026s21.00x
▲ VercelNext.js (Turbopack)13.769s (-20.5% 🟢)15.278s (-21.2% 🟢)1.509s21.04x
▲ VercelExpress16.197s (-4.6%)17.973s (-10.2% 🟢)1.777s21.22x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro13.457s (-7.8% 🟢)14.018s (-6.7% 🟢)0.561s51.00x
🐘 PostgresExpress13.492s (-7.5% 🟢)14.017s (-6.7% 🟢)0.525s51.00x
💻 LocalExpress13.498s (-9.8% 🟢)14.027s (-6.7% 🟢)0.529s51.00x
💻 LocalNitro13.506s (-10.3% 🟢)14.029s (-12.5% 🟢)0.523s51.00x
💻 LocalNext.js (Turbopack)14.038s15.029s0.991s41.04x
🐘 PostgresNext.js (Turbopack)14.121s15.019s0.898s41.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro21.119s (-67.2% 🟢)22.768s (-65.8% 🟢)1.649s31.00x
▲ VercelExpress21.128s (-58.0% 🟢)22.810s (-56.6% 🟢)1.683s31.00x
▲ VercelNext.js (Turbopack)21.868s (-58.4% 🟢)22.948s (-58.0% 🟢)1.080s31.04x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express11.935s (-28.1% 🟢)12.022s (-29.4% 🟢)0.087s81.00x
🐘 PostgresExpress11.955s (-14.7% 🟢)12.142s (-16.8% 🟢)0.187s81.00x
💻 LocalNitro11.982s (-28.6% 🟢)12.147s (-28.7% 🟢)0.165s81.00x
🐘 PostgresNitro11.987s (-14.2% 🟢)12.393s (-13.4% 🟢)0.406s81.00x
💻 LocalNext.js (Turbopack)12.945s13.023s0.078s71.08x
🐘 PostgresNext.js (Turbopack)13.222s14.015s0.794s71.11x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express32.014s (-73.6% 🟢)33.895s (-72.6% 🟢)1.881s31.00x
▲ VercelNext.js (Turbopack)32.210s (-91.8% 🟢)33.857s (-91.4% 🟢)1.647s31.01x
▲ VercelNitro32.225s (-92.4% 🟢)34.212s (-91.9% 🟢)1.987s31.01x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.141s (-10.5% 🟢)2.006s (~)0.865s151.00x
🐘 PostgresExpress1.150s (-8.7% 🟢)2.007s (~)0.857s151.01x
💻 LocalExpress1.176s (-21.0% 🟢)2.007s (~)0.831s151.03x
💻 LocalNitro1.185s (-27.4% 🟢)2.007s (-3.2%)0.822s151.04x
🐘 PostgresNext.js (Turbopack)1.198s2.007s0.809s151.05x
💻 LocalNext.js (Turbopack)1.279s2.006s0.728s151.12x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.551s (-10.8% 🟢)4.135s (-10.6% 🟢)1.584s81.00x
▲ VercelNext.js (Turbopack)2.592s (-23.7% 🟢)4.220s (-14.5% 🟢)1.628s81.02x
▲ VercelNitro2.674s (-5.1% 🟢)4.354s (+0.7%)1.680s71.05x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.191s (-49.3% 🟢)2.006s (-33.3% 🟢)0.815s151.00x
🐘 PostgresExpress1.212s (-48.7% 🟢)2.007s (-33.3% 🟢)0.796s151.02x
🐘 PostgresNext.js (Turbopack)1.339s2.006s0.667s151.12x
💻 LocalNitro1.771s (-43.7% 🟢)2.006s (-48.4% 🟢)0.236s151.49x
💻 LocalNext.js (Turbopack)1.799s2.073s0.274s151.51x
💻 LocalExpress1.891s (-35.9% 🟢)2.142s (-38.0% 🟢)0.250s151.59x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.385s (-16.5% 🟢)4.730s (-20.1% 🟢)1.345s71.00x
▲ VercelExpress3.711s (+2.5%)5.633s (+10.2% 🔺)1.922s61.10x
▲ VercelNext.js (Turbopack)4.474s (-37.0% 🟢)5.883s (-33.9% 🟢)1.408s61.32x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.301s (-62.6% 🟢)2.007s (-49.9% 🟢)0.707s151.00x
🐘 PostgresExpress1.323s (-62.0% 🟢)2.007s (-49.9% 🟢)0.684s151.02x
🐘 PostgresNext.js (Turbopack)1.595s2.007s0.412s151.23x
💻 LocalNext.js (Turbopack)4.947s5.344s0.397s63.80x
💻 LocalNitro5.412s (-35.2% 🟢)5.847s (-35.2% 🟢)0.435s64.16x
💻 LocalExpress5.621s (-32.6% 🟢)6.013s (-33.4% 🟢)0.391s54.32x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.258s (+24.0% 🔺)7.088s (+15.7% 🔺)1.831s51.00x
▲ VercelNext.js (Turbopack)6.447s (-27.7% 🟢)7.992s (-27.1% 🟢)1.544s41.23x
▲ VercelNitro6.804s (+93.0% 🔺)8.588s (+55.2% 🔺)1.784s41.29x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.131s (-10.0% 🟢)2.007s (~)0.876s151.00x
🐘 PostgresExpress1.158s (-7.9% 🟢)2.008s (~)0.850s151.02x
🐘 PostgresNext.js (Turbopack)1.198s2.006s0.808s151.06x
💻 LocalNext.js (Turbopack)1.303s2.006s0.703s151.15x
💻 LocalNitro1.410s (-24.4% 🟢)2.006s (-14.3% 🟢)0.595s151.25x
💻 LocalExpress1.460s (-22.9% 🟢)2.006s (-15.1% 🟢)0.546s151.29x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.421s (-17.4% 🟢)3.689s (-20.5% 🟢)1.268s91.00x
▲ VercelNitro2.507s (+2.0%)3.960s (-5.0% 🟢)1.452s81.04x
▲ VercelExpress2.626s (+1.7%)4.498s (+3.4%)1.872s71.08x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.182s (-49.5% 🟢)2.007s (-33.3% 🟢)0.825s151.00x
🐘 PostgresExpress1.212s (-48.2% 🟢)2.009s (-33.3% 🟢)0.797s151.03x
🐘 PostgresNext.js (Turbopack)1.353s2.008s0.654s151.14x
💻 LocalNext.js (Turbopack)2.024s2.674s0.650s121.71x
💻 LocalExpress2.077s (-33.7% 🟢)2.508s (-33.3% 🟢)0.431s121.76x
💻 LocalNitro2.081s (-32.1% 🟢)2.507s (-35.5% 🟢)0.427s121.76x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.363s (+5.3% 🔺)5.109s (+6.6% 🔺)1.746s61.00x
▲ VercelNitro3.543s (+9.6% 🔺)4.722s (-7.0% 🟢)1.179s71.05x
▲ VercelNext.js (Turbopack)3.827s (+21.8% 🔺)5.241s (+15.9% 🔺)1.414s61.14x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.288s (-63.0% 🟢)2.007s (-49.9% 🟢)0.719s151.00x
🐘 PostgresExpress1.318s (-62.3% 🟢)2.008s (-49.9% 🟢)0.690s151.02x
🐘 PostgresNext.js (Turbopack)1.603s2.010s0.408s151.24x
💻 LocalNext.js (Turbopack)5.253s6.013s0.760s54.08x
💻 LocalNitro5.567s (-39.1% 🟢)6.014s (-40.0% 🟢)0.447s54.32x
💻 LocalExpress6.097s (-30.7% 🟢)6.415s (-30.8% 🟢)0.318s54.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.083s (-20.8% 🟢)6.959s (-14.9% 🟢)1.876s51.00x
▲ VercelNitro5.184s (+1.8%)7.046s (+3.4%)1.862s51.02x
▲ VercelNext.js (Turbopack)5.777s (-14.5% 🟢)7.101s (-16.9% 🟢)1.323s51.14x

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

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.442s (-46.1% 🟢)1.006s (~)0.564s601.00x
💻 LocalExpress0.484s (-50.8% 🟢)1.004s (-6.7% 🟢)0.520s601.10x
🐘 PostgresExpress0.486s (-42.1% 🟢)1.024s (~)0.538s591.10x
💻 LocalNitro0.525s (-46.5% 🟢)1.005s (-8.1% 🟢)0.480s601.19x
🐘 PostgresNext.js (Turbopack)0.682s1.006s0.325s601.54x
💻 LocalNext.js (Turbopack)0.705s1.005s0.300s601.59x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.886s (-74.3% 🟢)6.422s (-69.9% 🟢)1.536s101.00x
▲ VercelNitro5.443s (-75.3% 🟢)6.976s (-71.0% 🟢)1.533s91.11x
▲ VercelNext.js (Turbopack)5.491s (-62.1% 🟢)6.854s (-57.4% 🟢)1.362s91.12x

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

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.031s (-47.8% 🟢)1.586s (-29.8% 🟢)0.555s571.00x
🐘 PostgresNitro1.053s (-45.4% 🟢)1.603s (-23.7% 🟢)0.550s571.02x
💻 LocalExpress1.209s (-59.9% 🟢)2.006s (-44.1% 🟢)0.797s451.17x
💻 LocalNitro1.225s (-59.6% 🟢)2.006s (-46.6% 🟢)0.781s451.19x
🐘 PostgresNext.js (Turbopack)1.631s2.009s0.377s451.58x
💻 LocalNext.js (Turbopack)1.767s2.006s0.239s451.71x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)13.045s (-73.8% 🟢)14.636s (-71.7% 🟢)1.592s71.00x
▲ VercelExpress13.474s (-61.0% 🟢)15.249s (-58.6% 🟢)1.776s61.03x
▲ VercelNitro13.618s (-65.5% 🟢)15.326s (-62.9% 🟢)1.708s61.04x

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

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.009s (-51.0% 🟢)2.407s (-47.7% 🟢)0.398s501.00x
🐘 PostgresExpress2.175s (-45.5% 🟢)2.758s (-36.9% 🟢)0.583s441.08x
💻 LocalExpress2.767s (-70.0% 🟢)3.032s (-69.7% 🟢)0.265s401.38x
💻 LocalNitro2.796s (-69.9% 🟢)3.033s (-69.7% 🟢)0.237s401.39x
🐘 PostgresNext.js (Turbopack)3.182s4.009s0.827s301.58x
💻 LocalNext.js (Turbopack)3.712s4.008s0.296s301.85x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express27.669s (-78.7% 🟢)29.488s (-77.7% 🟢)1.819s51.00x
▲ VercelNitro29.741s (-69.3% 🟢)31.477s (-68.0% 🟢)1.736s41.07x
▲ VercelNext.js (Turbopack)31.048s (-71.0% 🟢)32.776s (-69.9% 🟢)1.727s41.12x

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

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.163s (-42.6% 🟢)1.005s (~)0.843s601.00x
🐘 PostgresExpress0.171s (-39.4% 🟢)1.006s (~)0.835s601.05x
🐘 PostgresNext.js (Turbopack)0.229s1.006s0.777s601.41x
💻 LocalNitro0.412s (-31.8% 🟢)1.004s (-1.7%)0.592s602.54x
💻 LocalExpress0.419s (-25.2% 🟢)1.004s (~)0.585s602.58x
💻 LocalNext.js (Turbopack)0.510s1.004s0.494s603.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.414s (+45.3% 🔺)4.251s (+26.9% 🔺)1.838s161.00x
▲ VercelExpress2.559s (+30.9% 🔺)4.101s (+12.7% 🔺)1.542s151.06x
▲ VercelNext.js (Turbopack)2.607s (+28.9% 🔺)3.926s (+3.5%)1.320s161.08x

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

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.282s (-43.3% 🟢)1.005s (~)0.724s901.00x
🐘 PostgresExpress0.306s (-39.9% 🟢)1.007s (~)0.701s901.09x
🐘 PostgresNext.js (Turbopack)0.449s1.007s0.558s901.59x
💻 LocalNitro2.140s (-15.7% 🟢)2.852s (-5.2% 🟢)0.712s327.60x
💻 LocalExpress2.162s (-14.0% 🟢)2.943s (-2.2%)0.781s317.68x
💻 LocalNext.js (Turbopack)2.219s2.944s0.726s317.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.743s (+55.7% 🔺)6.348s (+32.0% 🔺)1.604s151.00x
▲ VercelNitro5.316s (+64.8% 🔺)6.877s (+42.6% 🔺)1.561s141.12x
▲ VercelNext.js (Turbopack)5.355s (+51.5% 🔺)6.768s (+30.3% 🔺)1.413s141.13x

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

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.557s (-29.5% 🟢)1.005s (~)0.448s1201.00x
🐘 PostgresExpress0.626s (-23.6% 🟢)1.006s (-1.1%)0.380s1201.12x
🐘 PostgresNext.js (Turbopack)0.919s1.207s0.288s1001.65x
💻 LocalExpress10.512s (-6.1% 🟢)11.119s (-6.9% 🟢)0.607s1118.87x
💻 LocalNitro10.566s (-5.6% 🟢)11.119s (-4.7%)0.553s1118.97x
💻 LocalNext.js (Turbopack)10.761s11.481s0.720s1119.32x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro14.165s (+83.4% 🔺)15.767s (+67.7% 🔺)1.603s91.00x
▲ VercelNext.js (Turbopack)14.811s (+43.4% 🔺)16.301s (+32.7% 🔺)1.490s81.05x
▲ VercelExpress16.474s (+122.0% 🔺)18.379s (+98.8% 🔺)1.905s71.16x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.135s (+453.5% 🔺)2.002s (+100.3% 🔺)0.001s (-13.3% 🟢)2.009s (+98.7% 🔺)0.874s101.00x
💻 LocalExpress1.135s (+470.1% 🔺)2.006s (+99.7% 🔺)0.012s (+2.5%)2.020s (+98.5% 🔺)0.885s101.00x
🐘 PostgresExpress1.141s (+456.3% 🔺)2.001s (+100.4% 🔺)0.001s (-25.0% 🟢)2.011s (+98.9% 🔺)0.871s101.01x
💻 LocalNitro1.142s (+434.4% 🔺)2.005s (+99.6% 🔺)0.013s (+0.8%)2.020s (+98.3% 🔺)0.878s101.01x
💻 LocalNext.js (Turbopack)1.170s2.004s0.012s2.019s0.849s101.03x
🐘 PostgresNext.js (Turbopack)1.195s2.002s0.002s2.011s0.815s101.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.151s (-68.6% 🟢)2.881s (-66.7% 🟢)2.305s (+264.7% 🔺)5.547s (-43.3% 🟢)3.397s101.00x
▲ VercelNitro2.196s (-42.7% 🟢)2.985s (-43.4% 🟢)2.267s (+205.5% 🔺)5.704s (-12.0% 🟢)3.508s101.02x
▲ VercelExpress2.949s (+17.7% 🔺)4.011s (-1.9%)14.047s (+1362.0% 🔺)18.574s (+232.2% 🔺)15.625s101.37x

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

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.498s (+140.0% 🔺)2.007s (+99.3% 🔺)0.003s (-19.4% 🟢)2.022s (+97.8% 🔺)0.524s301.00x
🐘 PostgresExpress1.520s (+141.3% 🔺)2.006s (+99.3% 🔺)0.004s (+4.4%)2.025s (+98.0% 🔺)0.505s301.01x
💻 LocalNitro1.555s (+85.4% 🔺)2.013s (+98.9% 🔺)0.011s (+16.0% 🔺)2.026s (+81.5% 🔺)0.471s301.04x
💻 LocalNext.js (Turbopack)1.657s2.014s0.010s2.026s0.369s301.11x
🐘 PostgresNext.js (Turbopack)1.712s2.010s0.004s2.028s0.316s301.14x
💻 LocalExpress1.739s (+129.7% 🔺)2.012s (+95.6% 🔺)0.011s (+13.9% 🔺)2.198s (+111.4% 🔺)0.459s291.16x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.010s (-64.5% 🟢)6.776s (-62.9% 🟢)0.173s (-18.3% 🟢)7.342s (-61.2% 🟢)1.331s91.00x
▲ VercelNitro6.068s (-79.4% 🟢)7.063s (-77.1% 🟢)0.275s (+145.2% 🔺)7.733s (-75.7% 🟢)1.664s81.01x
▲ VercelExpress6.459s (-0.7%)7.852s (-2.0%)0.234s (-42.7% 🟢)8.609s (-2.6%)2.149s71.07x

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

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.610s (-37.1% 🟢)1.016s (-18.6% 🟢)0.000s (-58.6% 🟢)1.038s (-17.5% 🟢)0.428s581.00x
🐘 PostgresExpress0.695s (-27.6% 🟢)1.052s (-17.7% 🟢)0.000s (+101.8% 🔺)1.064s (-18.5% 🟢)0.369s571.14x
🐘 PostgresNext.js (Turbopack)0.768s1.053s0.000s1.059s0.292s571.26x
💻 LocalExpress1.370s (+11.8% 🔺)2.015s (~)0.000s (-50.0% 🟢)2.017s (~)0.647s302.25x
💻 LocalNext.js (Turbopack)1.402s2.013s0.000s2.016s0.615s302.30x
💻 LocalNitro1.431s (+17.0% 🔺)2.016s (~)0.000s (-66.7% 🟢)2.018s (~)0.587s302.35x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.669s (+20.3% 🔺)4.647s (+5.8% 🔺)0.000s (-100.0% 🟢)5.059s (+5.2% 🔺)1.389s121.00x
▲ VercelExpress3.790s (+1.3%)5.277s (+3.4%)0.000s (-100.0% 🟢)5.812s (+5.1% 🔺)2.022s111.03x
▲ VercelNext.js (Turbopack)3.849s (-62.2% 🟢)4.996s (-56.6% 🟢)0.000s (+Infinity% 🔺)5.474s (-54.6% 🟢)1.625s111.05x

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

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.254s (-30.0% 🟢)1.847s (-13.7% 🟢)0.000s (+154.5% 🔺)1.872s (-13.9% 🟢)0.617s331.00x
🐘 PostgresExpress1.325s (-25.2% 🟢)2.066s (-5.1% 🟢)0.000s (NaN%)2.076s (-5.6% 🟢)0.751s301.06x
🐘 PostgresNext.js (Turbopack)1.530s2.106s0.000s2.114s0.585s291.22x
💻 LocalNext.js (Turbopack)2.579s3.187s0.000s3.190s0.611s192.06x
💻 LocalExpress3.164s (-8.7% 🟢)4.029s (~)0.001s (-33.3% 🟢)4.032s (~)0.867s152.52x
💻 LocalNitro3.346s (-1.2%)3.968s (-1.6%)0.001s (+28.9% 🔺)3.971s (-1.6%)0.625s162.67x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.599s (~)6.937s (-0.6%)0.000s (-11.1% 🟢)7.371s (-2.2%)1.772s91.00x
▲ VercelExpress7.865s (+71.5% 🔺)9.206s (+52.9% 🔺)0.000s (+Infinity% 🔺)9.666s (+49.7% 🔺)1.801s71.40x
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack) | Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress12/21
🐘 PostgresNitro19/21
▲ VercelExpress8/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres15/21
Next.js (Turbopack)🐘 Postgres14/21
Nitro🐘 Postgres18/21
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
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production122202191441
✅ 💻 Local Development161502191834
✅ 📦 Local Production161502191834
✅ 🐘 Local Postgres161502191834
✅ 🪟 Windows13100131
✅ 📋 Other7410176917
Total6939010527991

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro105026
✅ example105026
✅ express105026
✅ fastify105026
✅ hono105026
✅ nextjs-turbopack12902
✅ nextjs-webpack12902
✅ nitro105026
✅ nuxt105026
✅ sveltekit12407
✅ vite105026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13100
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable106025
✅ e2e-local-dev-tanstack-start-106025
✅ e2e-local-postgres-nest-stable106025
✅ e2e-local-postgres-tanstack-start-106025
✅ e2e-local-prod-nest-stable106025
✅ e2e-local-prod-tanstack-start-106025
✅ e2e-vercel-prod-tanstack-start105026

📋 View full workflow run

@karthikscale3karthikscale3 changed the title docs(cookbook): clarify tools are not individually durable in streamText patternFix cookbook pattern for AI SDKMay 22, 2026
@karthikscale3karthikscale3 changed the title Fix cookbook pattern for AI SDK[Docs] Fix cookbook pattern for AI SDKMay 22, 2026
@karthikscale3
karthikscale3force-pushed the karthik/cookbook-ai-sdk-tools-not-durable branch from 027316f to c661ac8CompareMay 22, 2026 23:56
@vercel

vercelBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

@karthikscale3
karthikscale3 deleted the karthik/cookbook-ai-sdk-tools-not-durable branch May 22, 2026 23:57
@karthikscale3
karthikscale3 restored the karthik/cookbook-ai-sdk-tools-not-durable branch May 22, 2026 23:59
Comment threaddocs/content/docs/v4/cookbook/integrations/ai-sdk.mdx Outdated

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM assuming this was tested, some wording nits

Comment threaddocs/content/docs/v4/cookbook/integrations/ai-sdk.mdx Outdated
karthikscale3and others added 4 commits May 25, 2026 09:59
The AI SDK cookbook entry presented `streamText` inside a `"use step"`
turn function with tools also marked `"use step"`. That implies tools
are individually durable, but the `"use step"` directive is a no-op
when called from another step — so tools run as plain inline functions
inside `runTurn`, and the durability boundary is the entire turn.
Changes:
- Remove the `"use step"` directive from tool implementations in the
workflow code sample and add an explanatory comment.
- Update the frontmatter summary and intro paragraph to drop the
inaccurate "tools remain durable steps" claim.
- Add a "Tools are not individually durable" entry to Pitfalls with
consequences and mitigations (idempotency or `DurableAgent`).
- Add a `runTurn` durability-boundary bullet to "How it works".
- Add a "Tool call durability" row to the `streamText` vs `DurableAgent`
comparison table.
- Fix two misleading Key APIs bullets that claimed tools wrap
`"use step"` functions and that `"use step"` makes tool executions
durable.
Applied identically to both v4 and v5 cookbook entries.
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Signed-off-by: Karthik Kalyan <105607645+karthikscale3@users.noreply.github.com>
The callout and comparison table incorrectly claimed DurableAgent lacks stopWhen, structured output, and onStepFinish — update them to reflect the actual implementation and clarify when raw streamText() is still appropriate.
Co-authored-by: Cursor <cursoragent@cursor.com>
Address review feedback: the inline comment should explain how tools run inside runTurn without referencing removed "use step" directives.
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

No backport to stable for ff167d0 (AI decision).

This commit only modifies docs/content/docs/v4/cookbook/integrations/ai-sdk.mdx and docs/content/docs/v5/cookbook/integrations/ai-sdk.mdx. Verified via git ls-tree origin/stable that the v4/v5 versioned docs directory structure (and the cookbook/integrations/ai-sdk.mdx files) does not exist on stable — stable has a flat docs/content/docs/ layout. There is nothing to backport.

To override, re-run the Backport to stable workflow manually via workflow_dispatch and paste this commit SHA into the ref input:

ff167d005d7b13163fe5819e132266afe3501fa4

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

@karthikscale3@VaguelySerious