Add provider wrappers for all official AI SDK providers - #986

Closed
pranaygp wants to merge 1 commit into
mainfrom
feat/add-ai-sdk-providers
Closed

Add provider wrappers for all official AI SDK providers#986
pranaygp wants to merge 1 commit into
mainfrom
feat/add-ai-sdk-providers

Conversation

@pranaygp

@pranaygppranaygp commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds step-boundary-compatible provider wrappers for 12 additional official AI SDK providers, matching the existing pattern used by openai, anthropic, google, xai, and gateway.

New providers:

  • Amazon Bedrock (@workflow/ai/amazon-bedrock)
  • Azure OpenAI (@workflow/ai/azure)
  • Cerebras (@workflow/ai/cerebras)
  • Cohere (@workflow/ai/cohere)
  • DeepInfra (@workflow/ai/deepinfra)
  • DeepSeek (@workflow/ai/deepseek)
  • Fireworks (@workflow/ai/fireworks)
  • Google Vertex AI (@workflow/ai/google-vertex)
  • Groq (@workflow/ai/groq)
  • Mistral (@workflow/ai/mistral)
  • Perplexity (@workflow/ai/perplexity)
  • TogetherAI (@workflow/ai/togetherai)

Each provider follows the same 'use step' wrapper pattern so that the model factory function survives step boundary serialization via the StepFunction serde mechanism. All provider SDK packages are added as optional dependencies.

Usage is identical to existing providers:

import{groq}from'@workflow/ai/groq';constagent=newDurableAgent({model: groq('llama-3.3-70b-versatile'),tools: { ... },});

Skipped providers:

  • @ai-sdk/huggingface — not a published package yet
  • @ai-sdk/openai-compatible — no default provider instance; requires custom configuration via createOpenAICompatible(). Users who need OpenAI-compatible providers can use the SDK package directly with a factory function.

Why some providers need as CompatibleLanguageModel casts

The 5 existing providers (openai, anthropic, google, xai, gateway) don't need casts because their SDK packages depend on @ai-sdk/provider@2.0.0 — the same copy that @workflow/ai resolves to. TypeScript sees identical types from the same package instance, so LanguageModelV2 satisfies CompatibleLanguageModel directly.

The 12 new providers depend on @ai-sdk/provider@3.0.8 (or @2.0.1 for amazon-bedrock/google-vertex), which pnpm resolves as a separate package instance. TypeScript treats types from different package copies as incompatible — even when they're structurally identical — causing TS2742 ("inferred type cannot be named") and TS2322 errors. The explicit return type annotation and as CompatibleLanguageModel cast is the only way to make these compile cleanly.

This is safe at runtime because both V2 and V3 models have the same structural doStream interface that @workflow/ai relies on.

Note: Upgrading to AI SDK v6 exclusively (dropping v5 support) was explored as a way to unify on @ai-sdk/provider@3.x across all packages. However, this requires migrating all consumer code (do-stream-step.ts, durable-agent.ts, etc.) from V2 to V3 types, and several provider SDKs still don't have v3 releases. That's a larger effort tracked separately.

Test plan

  • Verified build compiles with no new errors
  • Verified all 40 existing tests pass
  • Test with a user app that uses one of the new providers

🤖 Generated with Claude Code

…K providers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CopilotAI review requested due to automatic review settings February 9, 2026 22:11
@changeset-bot

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0a9f8c1

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

This PR includes changesets to release 1 package
NameType
@workflow/aiPatch

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

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

@vercel

vercelBot commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production489138528
❌ 💻 Local Development3774162480
✅ 📦 Local Production418062480
✅ 🐘 Local Postgres418062480
✅ 🪟 Windows450348
❌ 🌍 Community Worlds106419156
✅ 📋 Other123021144
Total1976832572316

❌ Failed Tests

▲ Vercel Production (1 failed)

nextjs-webpack (1 failed):

  • sleepingWorkflow
💻 Local Development (41 failed)

express-stable (41 failed):

  • addTenWorkflow
  • addTenWorkflow
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • webhook route with invalid token
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • stepDirectCallWorkflow - calling step functions directly outside workflow context
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check endpoint (HTTP) - workflow and step endpoints respond to __health query parameter
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
🌍 Community Worlds (41 failed)

turso (41 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4404
✅ example4404
✅ express4404
✅ fastify4404
✅ hono4404
✅ nextjs-turbopack4701
❌ nextjs-webpack4611
✅ nitro4404
✅ nuxt4404
✅ sveltekit4404
✅ vite4404
❌ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4107
❌ express-stable0417
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4503
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4503
✅ redis-dev300
✅ redis4503
✅ starter-dev300
✅ turso-dev300
❌ turso4413
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4107
✅ e2e-local-postgres-nest-stable4107
✅ e2e-local-prod-nest-stable4107

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: failure
  • Local Prod: success
  • Local Postgres: success
  • Windows: success

Check the workflow run for details.

@github-actions

github-actionsBot commented Feb 9, 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🥇 Nitro0.031s (-4.3%)1.005s (~)0.974s101.00x
💻 LocalExpress0.032s (-7.5% 🟢)1.004s (~)0.972s101.04x
💻 LocalNext.js (Turbopack)0.042s1.005s0.963s101.37x
🌐 RedisNext.js (Turbopack)0.045s1.005s0.960s101.44x
🌐 MongoDBNext.js (Turbopack)0.085s1.007s0.922s102.76x
🐘 PostgresExpress0.141s (-65.3% 🟢)1.009s (-1.2%)0.869s104.55x
🐘 PostgresNitro0.477s (+115.5% 🔺)1.009s (~)0.532s1015.44x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.769s (-15.8% 🟢)2.450s (+3.2%)1.681s101.00x
▲ VercelNitro0.861s (-4.8%)2.524s (+4.5%)1.662s101.12x
▲ VercelNext.js (Turbopack)0.864s (-11.5% 🟢)2.436s (-12.4% 🟢)1.572s101.12x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.098s2.005s0.908s101.00x
🌐 RedisNext.js (Turbopack)1.100s2.006s0.906s101.00x
💻 LocalNitro1.103s (~)2.005s (~)0.902s101.00x
💻 LocalExpress1.106s (~)2.005s (~)0.899s101.01x
🌐 MongoDBNext.js (Turbopack)1.300s2.008s0.708s101.18x
🐘 PostgresNitro2.355s (-4.2%)3.014s (~)0.658s102.15x
🐘 PostgresExpress2.365s (+4.8%)3.014s (~)0.649s102.15x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.603s (-2.3%)3.828s (+7.1% 🔺)1.224s101.00x
▲ VercelNitro2.750s (+5.5% 🔺)4.114s (+8.0% 🔺)1.363s101.06x
▲ VercelNext.js (Turbopack)2.780s (+1.8%)4.144s (+1.6%)1.364s101.07x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.689s11.021s0.332s31.00x
💻 LocalNext.js (Turbopack)10.692s11.021s0.330s31.00x
💻 LocalNitro10.813s (~)11.022s (~)0.209s31.01x
💻 LocalExpress10.834s (~)11.021s (~)0.187s31.01x
🌐 MongoDBNext.js (Turbopack)12.230s13.018s0.788s31.14x
🐘 PostgresNitro20.230s (-0.6%)21.055s (~)0.825s21.89x
🐘 PostgresExpress20.399s (+1.5%)21.059s (~)0.659s21.91x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro19.605s (~)20.998s (-0.9%)1.392s21.00x
▲ VercelNext.js (Turbopack)19.738s (+1.2%)21.071s (+3.1%)1.333s21.01x
▲ VercelExpress19.770s (-0.6%)21.286s (~)1.516s21.01x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.886s27.050s0.164s31.00x
💻 LocalNext.js (Turbopack)27.115s28.051s0.936s31.01x
💻 LocalNitro27.425s (-0.7%)28.051s (~)0.625s31.02x
💻 LocalExpress27.512s (~)28.050s (~)0.539s31.02x
🌐 MongoDBNext.js (Turbopack)30.506s31.037s0.531s21.13x
🐘 PostgresExpress50.209s (~)51.134s (~)0.925s21.87x
🐘 PostgresNitro50.511s (~)51.122s (~)0.612s21.88x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)48.883s (-3.5%)50.465s (-3.6%)1.583s21.00x
▲ VercelNitro49.279s (+0.8%)50.435s (~)1.156s21.01x
▲ VercelExpress49.688s (+2.3%)51.403s (+2.5%)1.715s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.316s55.099s0.783s21.00x
💻 LocalNext.js (Turbopack)56.408s57.101s0.692s21.04x
💻 LocalNitro56.986s (-0.7%)57.097s (-1.7%)0.111s21.05x
💻 LocalExpress57.184s (~)58.100s (+0.9%)0.916s21.05x
🌐 MongoDBNext.js (Turbopack)61.153s62.072s0.919s21.13x
🐘 PostgresNitro100.152s (~)100.213s (-1.0%)0.061s11.84x
🐘 PostgresExpress100.375s (~)101.241s (~)0.866s11.85x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)103.197s (+1.9%)104.035s (+1.2%)0.838s11.00x
▲ VercelNitro104.722s (~)106.206s (~)1.484s11.01x
▲ VercelExpress105.039s (~)106.542s (~)1.503s11.02x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.250s2.006s0.756s151.00x
💻 LocalNext.js (Turbopack)1.376s2.005s0.629s151.10x
💻 LocalExpress1.398s (-1.1%)2.005s (~)0.606s151.12x
💻 LocalNitro1.409s (+1.1%)2.005s (~)0.597s151.13x
🌐 MongoDBNext.js (Turbopack)2.147s3.008s0.862s101.72x
🐘 PostgresNitro2.221s (-3.6%)3.013s (~)0.792s101.78x
🐘 PostgresExpress2.408s (+3.2%)3.013s (~)0.606s101.93x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.786s (-14.7% 🟢)3.894s (-13.7% 🟢)1.108s81.00x
▲ VercelNext.js (Turbopack)3.031s (+1.4%)4.096s (-3.1%)1.064s81.09x
▲ VercelNitro3.088s (-19.2% 🟢)4.395s (-23.9% 🟢)1.307s71.11x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.470s3.008s0.538s101.00x
🌐 RedisNext.js (Turbopack)2.503s3.007s0.505s101.01x
💻 LocalNitro2.520s (-3.6%)3.006s (~)0.486s101.02x
💻 LocalExpress2.558s (+0.9%)3.008s (~)0.450s101.04x
🌐 MongoDBNext.js (Turbopack)4.761s5.178s0.417s61.93x
🐘 PostgresNitro8.385s (-1.5%)8.780s (~)0.395s43.39x
🐘 PostgresExpress8.742s (-2.0%)9.280s (~)0.538s43.54x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.163s (~)4.567s (+2.5%)1.404s71.00x
▲ VercelNitro3.251s (-4.2%)4.518s (+1.3%)1.267s71.03x
▲ VercelExpress3.338s (+5.5% 🔺)4.301s (-1.4%)0.963s71.06x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.036s4.867s0.831s71.00x
💻 LocalNitro7.026s (-5.5% 🟢)7.765s (-3.2%)0.739s41.74x
💻 LocalNext.js (Turbopack)7.137s7.413s0.275s51.77x
💻 LocalExpress7.462s (+6.0% 🔺)8.024s (+3.3%)0.562s41.85x
🌐 MongoDBNext.js (Turbopack)9.919s10.351s0.432s32.46x
🐘 PostgresExpress46.535s (-4.7%)47.125s (-4.1%)0.590s111.53x
🐘 PostgresNitro49.744s (-1.8%)50.104s (-2.0%)0.360s112.32x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.268s (+50.6% 🔺)6.266s (+19.3% 🔺)0.998s61.00x
▲ VercelNitro5.712s (+51.9% 🔺)7.349s (+25.8% 🔺)1.637s51.08x
▲ VercelNext.js (Turbopack)7.729s (+99.2% 🔺)9.071s (+69.0% 🔺)1.341s41.47x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.277s2.006s0.729s151.00x
💻 LocalNitro1.421s (-1.2%)2.005s (~)0.584s151.11x
💻 LocalNext.js (Turbopack)1.429s2.005s0.576s151.12x
💻 LocalExpress1.444s (+2.3%)2.005s (~)0.561s151.13x
🐘 PostgresExpress2.046s (-6.8% 🟢)2.681s (~)0.636s121.60x
🐘 PostgresNitro2.059s (+1.7%)2.511s (+8.3% 🔺)0.452s121.61x
🌐 MongoDBNext.js (Turbopack)2.174s3.007s0.834s101.70x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.610s (-13.1% 🟢)3.680s (-19.6% 🟢)1.071s91.00x
▲ VercelExpress2.640s (-9.1% 🟢)3.770s (-5.0% 🟢)1.130s81.01x
▲ VercelNitro2.659s (-5.5% 🟢)4.225s (+5.2% 🔺)1.565s81.02x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.513s3.008s0.495s101.00x
💻 LocalNext.js (Turbopack)2.565s3.008s0.443s101.02x
💻 LocalNitro2.604s (-4.3%)3.007s (~)0.403s101.04x
💻 LocalExpress2.687s (+0.7%)3.007s (~)0.321s101.07x
🌐 MongoDBNext.js (Turbopack)4.667s5.175s0.509s61.86x
🐘 PostgresExpress11.920s (-6.4% 🟢)12.377s (-7.5% 🟢)0.457s34.74x
🐘 PostgresNitro12.031s (+5.6% 🔺)12.701s (+8.6% 🔺)0.669s34.79x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.904s (-2.5%)3.937s (-5.3% 🟢)1.033s81.00x
▲ VercelExpress2.911s (+2.6%)3.897s (-3.5%)0.986s81.00x
▲ VercelNitro2.973s (+1.6%)4.349s (-5.0% 🟢)1.375s71.02x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.095s4.868s0.773s71.00x
💻 LocalNext.js (Turbopack)7.295s7.514s0.219s41.78x
💻 LocalNitro7.487s (-6.4% 🟢)8.019s (-8.6% 🟢)0.533s41.83x
💻 LocalExpress7.907s (+3.8%)8.277s (+3.3%)0.370s41.93x
🌐 MongoDBNext.js (Turbopack)10.049s10.348s0.299s32.45x
🐘 PostgresExpress51.210s (-2.3%)52.130s (-1.9%)0.920s112.51x
🐘 PostgresNitro54.770s (+7.7% 🔺)55.119s (+7.8% 🔺)0.349s113.38x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.650s (+6.2% 🔺)4.753s (-8.2% 🟢)1.103s71.00x
▲ VercelExpress3.908s (+1.9%)5.251s (+2.6%)1.343s61.07x
▲ VercelNitro4.233s (+15.7% 🔺)5.440s (+10.9% 🔺)1.207s61.16x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.138s1.001s0.010s1.015s0.877s101.00x
🌐 RedisNext.js (Turbopack)0.157s1.000s0.001s1.007s0.850s101.14x
💻 LocalNitro0.168s (-4.0%)1.002s (~)0.010s (-12.5% 🟢)1.015s (~)0.847s101.22x
💻 LocalExpress0.174s (-1.5%)1.002s (~)0.010s (+6.3% 🔺)1.015s (~)0.841s101.27x
🌐 MongoDBNext.js (Turbopack)0.515s0.931s0.001s1.009s0.493s103.74x
🐘 PostgresNitro2.295s (-4.4%)2.739s (+3.9%)0.001s (-25.0% 🟢)3.013s (~)0.718s1016.66x
🐘 PostgresExpress2.477s (+14.3% 🔺)2.564s (-10.9% 🟢)0.001s (~)3.014s (~)0.538s1017.97x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.495s (-15.1% 🟢)3.275s (-11.7% 🟢)0.247s (+49.2% 🔺)4.250s (-10.9% 🟢)1.755s101.00x
▲ VercelNitro2.529s (-4.9%)3.291s (+6.9% 🔺)0.407s (+204.8% 🔺)4.536s (+13.0% 🔺)2.007s101.01x
▲ VercelExpress3.073s (+22.3% 🔺)3.474s (+16.5% 🔺)0.181s (-33.6% 🟢)4.418s (+10.3% 🔺)1.345s101.23x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)9/12
🐘 PostgresExpress6/12
▲ VercelNext.js (Turbopack)7/12
Fastest World by Framework

Winner determined by most benchmark wins

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

Worlds:

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

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds @workflow/ai/* entrypoints for additional official AI SDK providers using the existing 'use step' wrapper approach so model factory functions can cross workflow step boundaries.

Changes:

  • Added 12 new provider wrapper modules under packages/ai/src/providers/*.
  • Exposed new provider entrypoints via packages/ai/package.jsonexports and added corresponding optional dependencies.
  • Updated lockfile and added a changeset for a patch release of @workflow/ai.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 12 comments.

Show a summary per file
FileDescription
pnpm-lock.yamlAdds resolved optional dependencies for the new AI SDK provider packages (and their transitive deps).
packages/ai/package.jsonAdds exports entries for new provider subpath entrypoints and lists new provider SDKs as optional dependencies.
packages/ai/src/providers/amazon-bedrock.tsAdds step-compatible wrapper for Bedrock provider factory.
packages/ai/src/providers/azure.tsAdds step-compatible wrapper for Azure provider factory.
packages/ai/src/providers/cerebras.tsAdds step-compatible wrapper for Cerebras provider factory.
packages/ai/src/providers/cohere.tsAdds step-compatible wrapper for Cohere provider factory.
packages/ai/src/providers/deepinfra.tsAdds step-compatible wrapper for DeepInfra provider factory.
packages/ai/src/providers/deepseek.tsAdds step-compatible wrapper for DeepSeek provider factory.
packages/ai/src/providers/fireworks.tsAdds step-compatible wrapper for Fireworks provider factory.
packages/ai/src/providers/google-vertex.tsAdds step-compatible wrapper for Google Vertex provider factory.
packages/ai/src/providers/groq.tsAdds step-compatible wrapper for Groq provider factory.
packages/ai/src/providers/mistral.tsAdds step-compatible wrapper for Mistral provider factory.
packages/ai/src/providers/perplexity.tsAdds step-compatible wrapper for Perplexity provider factory.
packages/ai/src/providers/togetherai.tsAdds step-compatible wrapper for TogetherAI provider factory.
.changeset/add-ai-sdk-providers.mdDeclares a patch release noting the new provider wrappers.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpackages/ai/src/providers/mistral.ts
Comment threadpackages/ai/src/providers/amazon-bedrock.ts
Comment threadpackages/ai/src/providers/azure.ts
Comment threadpackages/ai/src/providers/cohere.ts
Comment threadpackages/ai/src/providers/fireworks.ts
Comment threadpackages/ai/src/providers/togetherai.ts
Comment threadpackages/ai/src/providers/cerebras.ts
Comment threadpackages/ai/src/providers/deepinfra.ts
Comment threadpackages/ai/src/providers/deepseek.ts
Comment threadpackages/ai/src/providers/google-vertex.ts
@pranaygp

pranaygp commented Feb 11, 2026

Copy link
Copy Markdown
ContributorAuthor

Closing: blocked on AI SDK v6 upgrade

After investigating the type compatibility issues flagged by Copilot's review, I'm closing this PR. The as CompatibleLanguageModel casts required by all 12 new providers aren't a good pattern to ship.

Root cause

All 12 new provider SDKs resolve to a different copy of @ai-sdk/provider than what @workflow/ai uses:

Provider SDKs@ai-sdk/provider version
@workflow/ai (direct dep)2.0.0
amazon-bedrock, google-vertex2.0.1
azure, cerebras, cohere, deepinfra, deepseek, fireworks, groq, mistral, perplexity, togetherai3.0.8

pnpm installs these as separate package instances, and TypeScript treats types from different copies as incompatible — even when structurally identical. This causes TS2742 ("inferred type cannot be named") on every new provider when you try to match the clean pattern used by the existing 5 providers (openai, anthropic, google, xai, gateway), which all happen to resolve to @ai-sdk/provider@2.0.0.

The only workaround is explicit return type annotations + as CompatibleLanguageModel casts, which hides the provider's concrete model type from consumers.

Why the existing providers work

openai, anthropic, google, xai, and gateway SDKs all depend on @ai-sdk/provider@2.0.0 — the same copy that @workflow/ai resolves to. TypeScript can name the types directly, so LanguageModelV2 satisfies CompatibleLanguageModel without any cast.

Path forward

Upgrading to AI SDK v6 exclusively (dropping v5 support) would unify the workspace on @ai-sdk/provider@3.x, eliminating the dual-version problem. However, that upgrade requires:

  1. Migrating consumer code (do-stream-step.ts, durable-agent.ts, stream-text-iterator.ts, tools-to-model-tools.ts) from V2 to V3 types
  2. Handling provider SDKs that don't have v3 releases yet (cerebras, deepinfra, deepseek, fireworks, togetherai)
  3. Handling provider SDKs whose v3 still depends on @ai-sdk/provider@2.0.1 (amazon-bedrock, google-vertex)

Once v6 is landed, adding these provider wrappers becomes trivial — just copy the existing openai/anthropic pattern with no casts needed.

cc @gr2m@lgrammel@TooTallNate — tagging for visibility since this is blocked on @ai-sdk/provider version alignment across provider packages.

@lgrammel

Copy link
Copy Markdown
Contributor

@pranaygp@gr2m all ai sdk 6 providers should use the v3 provider spec. the dependencies happen automatically:

https://github.com/vercel/ai/blob/main/packages/amazon-bedrock/package.json#L54

so I do not understand how you can have providers with older @ai-sdk/provider versions. you probably just need to upgrade them to their latest version?

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.

3 participants

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

Add provider wrappers for all official AI SDK providers - #986

Closed
pranaygp wants to merge 1 commit into
mainfrom
feat/add-ai-sdk-providers
Closed

Add provider wrappers for all official AI SDK providers#986
pranaygp wants to merge 1 commit into
mainfrom
feat/add-ai-sdk-providers

Conversation

@pranaygp

@pranaygppranaygp commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds step-boundary-compatible provider wrappers for 12 additional official AI SDK providers, matching the existing pattern used by openai, anthropic, google, xai, and gateway.

New providers:

  • Amazon Bedrock (@workflow/ai/amazon-bedrock)
  • Azure OpenAI (@workflow/ai/azure)
  • Cerebras (@workflow/ai/cerebras)
  • Cohere (@workflow/ai/cohere)
  • DeepInfra (@workflow/ai/deepinfra)
  • DeepSeek (@workflow/ai/deepseek)
  • Fireworks (@workflow/ai/fireworks)
  • Google Vertex AI (@workflow/ai/google-vertex)
  • Groq (@workflow/ai/groq)
  • Mistral (@workflow/ai/mistral)
  • Perplexity (@workflow/ai/perplexity)
  • TogetherAI (@workflow/ai/togetherai)

Each provider follows the same 'use step' wrapper pattern so that the model factory function survives step boundary serialization via the StepFunction serde mechanism. All provider SDK packages are added as optional dependencies.

Usage is identical to existing providers:

import{groq}from'@workflow/ai/groq';constagent=newDurableAgent({model: groq('llama-3.3-70b-versatile'),tools: { ... },});

Skipped providers:

  • @ai-sdk/huggingface — not a published package yet
  • @ai-sdk/openai-compatible — no default provider instance; requires custom configuration via createOpenAICompatible(). Users who need OpenAI-compatible providers can use the SDK package directly with a factory function.

Why some providers need as CompatibleLanguageModel casts

The 5 existing providers (openai, anthropic, google, xai, gateway) don't need casts because their SDK packages depend on @ai-sdk/provider@2.0.0 — the same copy that @workflow/ai resolves to. TypeScript sees identical types from the same package instance, so LanguageModelV2 satisfies CompatibleLanguageModel directly.

The 12 new providers depend on @ai-sdk/provider@3.0.8 (or @2.0.1 for amazon-bedrock/google-vertex), which pnpm resolves as a separate package instance. TypeScript treats types from different package copies as incompatible — even when they're structurally identical — causing TS2742 ("inferred type cannot be named") and TS2322 errors. The explicit return type annotation and as CompatibleLanguageModel cast is the only way to make these compile cleanly.

This is safe at runtime because both V2 and V3 models have the same structural doStream interface that @workflow/ai relies on.

Note: Upgrading to AI SDK v6 exclusively (dropping v5 support) was explored as a way to unify on @ai-sdk/provider@3.x across all packages. However, this requires migrating all consumer code (do-stream-step.ts, durable-agent.ts, etc.) from V2 to V3 types, and several provider SDKs still don't have v3 releases. That's a larger effort tracked separately.

Test plan

  • Verified build compiles with no new errors
  • Verified all 40 existing tests pass
  • Test with a user app that uses one of the new providers

🤖 Generated with Claude Code

…K providers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CopilotAI review requested due to automatic review settings February 9, 2026 22:11
@changeset-bot

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0a9f8c1

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

This PR includes changesets to release 1 package
NameType
@workflow/aiPatch

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

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

@vercel

vercelBot commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production489138528
❌ 💻 Local Development3774162480
✅ 📦 Local Production418062480
✅ 🐘 Local Postgres418062480
✅ 🪟 Windows450348
❌ 🌍 Community Worlds106419156
✅ 📋 Other123021144
Total1976832572316

❌ Failed Tests

▲ Vercel Production (1 failed)

nextjs-webpack (1 failed):

  • sleepingWorkflow
💻 Local Development (41 failed)

express-stable (41 failed):

  • addTenWorkflow
  • addTenWorkflow
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • webhook route with invalid token
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • stepDirectCallWorkflow - calling step functions directly outside workflow context
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check endpoint (HTTP) - workflow and step endpoints respond to __health query parameter
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
🌍 Community Worlds (41 failed)

turso (41 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4404
✅ example4404
✅ express4404
✅ fastify4404
✅ hono4404
✅ nextjs-turbopack4701
❌ nextjs-webpack4611
✅ nitro4404
✅ nuxt4404
✅ sveltekit4404
✅ vite4404
❌ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4107
❌ express-stable0417
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4503
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4503
✅ redis-dev300
✅ redis4503
✅ starter-dev300
✅ turso-dev300
❌ turso4413
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4107
✅ e2e-local-postgres-nest-stable4107
✅ e2e-local-prod-nest-stable4107

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: failure
  • Local Prod: success
  • Local Postgres: success
  • Windows: success

Check the workflow run for details.

@github-actions

github-actionsBot commented Feb 9, 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🥇 Nitro0.031s (-4.3%)1.005s (~)0.974s101.00x
💻 LocalExpress0.032s (-7.5% 🟢)1.004s (~)0.972s101.04x
💻 LocalNext.js (Turbopack)0.042s1.005s0.963s101.37x
🌐 RedisNext.js (Turbopack)0.045s1.005s0.960s101.44x
🌐 MongoDBNext.js (Turbopack)0.085s1.007s0.922s102.76x
🐘 PostgresExpress0.141s (-65.3% 🟢)1.009s (-1.2%)0.869s104.55x
🐘 PostgresNitro0.477s (+115.5% 🔺)1.009s (~)0.532s1015.44x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.769s (-15.8% 🟢)2.450s (+3.2%)1.681s101.00x
▲ VercelNitro0.861s (-4.8%)2.524s (+4.5%)1.662s101.12x
▲ VercelNext.js (Turbopack)0.864s (-11.5% 🟢)2.436s (-12.4% 🟢)1.572s101.12x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.098s2.005s0.908s101.00x
🌐 RedisNext.js (Turbopack)1.100s2.006s0.906s101.00x
💻 LocalNitro1.103s (~)2.005s (~)0.902s101.00x
💻 LocalExpress1.106s (~)2.005s (~)0.899s101.01x
🌐 MongoDBNext.js (Turbopack)1.300s2.008s0.708s101.18x
🐘 PostgresNitro2.355s (-4.2%)3.014s (~)0.658s102.15x
🐘 PostgresExpress2.365s (+4.8%)3.014s (~)0.649s102.15x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.603s (-2.3%)3.828s (+7.1% 🔺)1.224s101.00x
▲ VercelNitro2.750s (+5.5% 🔺)4.114s (+8.0% 🔺)1.363s101.06x
▲ VercelNext.js (Turbopack)2.780s (+1.8%)4.144s (+1.6%)1.364s101.07x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.689s11.021s0.332s31.00x
💻 LocalNext.js (Turbopack)10.692s11.021s0.330s31.00x
💻 LocalNitro10.813s (~)11.022s (~)0.209s31.01x
💻 LocalExpress10.834s (~)11.021s (~)0.187s31.01x
🌐 MongoDBNext.js (Turbopack)12.230s13.018s0.788s31.14x
🐘 PostgresNitro20.230s (-0.6%)21.055s (~)0.825s21.89x
🐘 PostgresExpress20.399s (+1.5%)21.059s (~)0.659s21.91x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro19.605s (~)20.998s (-0.9%)1.392s21.00x
▲ VercelNext.js (Turbopack)19.738s (+1.2%)21.071s (+3.1%)1.333s21.01x
▲ VercelExpress19.770s (-0.6%)21.286s (~)1.516s21.01x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.886s27.050s0.164s31.00x
💻 LocalNext.js (Turbopack)27.115s28.051s0.936s31.01x
💻 LocalNitro27.425s (-0.7%)28.051s (~)0.625s31.02x
💻 LocalExpress27.512s (~)28.050s (~)0.539s31.02x
🌐 MongoDBNext.js (Turbopack)30.506s31.037s0.531s21.13x
🐘 PostgresExpress50.209s (~)51.134s (~)0.925s21.87x
🐘 PostgresNitro50.511s (~)51.122s (~)0.612s21.88x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)48.883s (-3.5%)50.465s (-3.6%)1.583s21.00x
▲ VercelNitro49.279s (+0.8%)50.435s (~)1.156s21.01x
▲ VercelExpress49.688s (+2.3%)51.403s (+2.5%)1.715s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.316s55.099s0.783s21.00x
💻 LocalNext.js (Turbopack)56.408s57.101s0.692s21.04x
💻 LocalNitro56.986s (-0.7%)57.097s (-1.7%)0.111s21.05x
💻 LocalExpress57.184s (~)58.100s (+0.9%)0.916s21.05x
🌐 MongoDBNext.js (Turbopack)61.153s62.072s0.919s21.13x
🐘 PostgresNitro100.152s (~)100.213s (-1.0%)0.061s11.84x
🐘 PostgresExpress100.375s (~)101.241s (~)0.866s11.85x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)103.197s (+1.9%)104.035s (+1.2%)0.838s11.00x
▲ VercelNitro104.722s (~)106.206s (~)1.484s11.01x
▲ VercelExpress105.039s (~)106.542s (~)1.503s11.02x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.250s2.006s0.756s151.00x
💻 LocalNext.js (Turbopack)1.376s2.005s0.629s151.10x
💻 LocalExpress1.398s (-1.1%)2.005s (~)0.606s151.12x
💻 LocalNitro1.409s (+1.1%)2.005s (~)0.597s151.13x
🌐 MongoDBNext.js (Turbopack)2.147s3.008s0.862s101.72x
🐘 PostgresNitro2.221s (-3.6%)3.013s (~)0.792s101.78x
🐘 PostgresExpress2.408s (+3.2%)3.013s (~)0.606s101.93x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.786s (-14.7% 🟢)3.894s (-13.7% 🟢)1.108s81.00x
▲ VercelNext.js (Turbopack)3.031s (+1.4%)4.096s (-3.1%)1.064s81.09x
▲ VercelNitro3.088s (-19.2% 🟢)4.395s (-23.9% 🟢)1.307s71.11x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.470s3.008s0.538s101.00x
🌐 RedisNext.js (Turbopack)2.503s3.007s0.505s101.01x
💻 LocalNitro2.520s (-3.6%)3.006s (~)0.486s101.02x
💻 LocalExpress2.558s (+0.9%)3.008s (~)0.450s101.04x
🌐 MongoDBNext.js (Turbopack)4.761s5.178s0.417s61.93x
🐘 PostgresNitro8.385s (-1.5%)8.780s (~)0.395s43.39x
🐘 PostgresExpress8.742s (-2.0%)9.280s (~)0.538s43.54x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.163s (~)4.567s (+2.5%)1.404s71.00x
▲ VercelNitro3.251s (-4.2%)4.518s (+1.3%)1.267s71.03x
▲ VercelExpress3.338s (+5.5% 🔺)4.301s (-1.4%)0.963s71.06x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.036s4.867s0.831s71.00x
💻 LocalNitro7.026s (-5.5% 🟢)7.765s (-3.2%)0.739s41.74x
💻 LocalNext.js (Turbopack)7.137s7.413s0.275s51.77x
💻 LocalExpress7.462s (+6.0% 🔺)8.024s (+3.3%)0.562s41.85x
🌐 MongoDBNext.js (Turbopack)9.919s10.351s0.432s32.46x
🐘 PostgresExpress46.535s (-4.7%)47.125s (-4.1%)0.590s111.53x
🐘 PostgresNitro49.744s (-1.8%)50.104s (-2.0%)0.360s112.32x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.268s (+50.6% 🔺)6.266s (+19.3% 🔺)0.998s61.00x
▲ VercelNitro5.712s (+51.9% 🔺)7.349s (+25.8% 🔺)1.637s51.08x
▲ VercelNext.js (Turbopack)7.729s (+99.2% 🔺)9.071s (+69.0% 🔺)1.341s41.47x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.277s2.006s0.729s151.00x
💻 LocalNitro1.421s (-1.2%)2.005s (~)0.584s151.11x
💻 LocalNext.js (Turbopack)1.429s2.005s0.576s151.12x
💻 LocalExpress1.444s (+2.3%)2.005s (~)0.561s151.13x
🐘 PostgresExpress2.046s (-6.8% 🟢)2.681s (~)0.636s121.60x
🐘 PostgresNitro2.059s (+1.7%)2.511s (+8.3% 🔺)0.452s121.61x
🌐 MongoDBNext.js (Turbopack)2.174s3.007s0.834s101.70x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.610s (-13.1% 🟢)3.680s (-19.6% 🟢)1.071s91.00x
▲ VercelExpress2.640s (-9.1% 🟢)3.770s (-5.0% 🟢)1.130s81.01x
▲ VercelNitro2.659s (-5.5% 🟢)4.225s (+5.2% 🔺)1.565s81.02x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.513s3.008s0.495s101.00x
💻 LocalNext.js (Turbopack)2.565s3.008s0.443s101.02x
💻 LocalNitro2.604s (-4.3%)3.007s (~)0.403s101.04x
💻 LocalExpress2.687s (+0.7%)3.007s (~)0.321s101.07x
🌐 MongoDBNext.js (Turbopack)4.667s5.175s0.509s61.86x
🐘 PostgresExpress11.920s (-6.4% 🟢)12.377s (-7.5% 🟢)0.457s34.74x
🐘 PostgresNitro12.031s (+5.6% 🔺)12.701s (+8.6% 🔺)0.669s34.79x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.904s (-2.5%)3.937s (-5.3% 🟢)1.033s81.00x
▲ VercelExpress2.911s (+2.6%)3.897s (-3.5%)0.986s81.00x
▲ VercelNitro2.973s (+1.6%)4.349s (-5.0% 🟢)1.375s71.02x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.095s4.868s0.773s71.00x
💻 LocalNext.js (Turbopack)7.295s7.514s0.219s41.78x
💻 LocalNitro7.487s (-6.4% 🟢)8.019s (-8.6% 🟢)0.533s41.83x
💻 LocalExpress7.907s (+3.8%)8.277s (+3.3%)0.370s41.93x
🌐 MongoDBNext.js (Turbopack)10.049s10.348s0.299s32.45x
🐘 PostgresExpress51.210s (-2.3%)52.130s (-1.9%)0.920s112.51x
🐘 PostgresNitro54.770s (+7.7% 🔺)55.119s (+7.8% 🔺)0.349s113.38x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.650s (+6.2% 🔺)4.753s (-8.2% 🟢)1.103s71.00x
▲ VercelExpress3.908s (+1.9%)5.251s (+2.6%)1.343s61.07x
▲ VercelNitro4.233s (+15.7% 🔺)5.440s (+10.9% 🔺)1.207s61.16x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.138s1.001s0.010s1.015s0.877s101.00x
🌐 RedisNext.js (Turbopack)0.157s1.000s0.001s1.007s0.850s101.14x
💻 LocalNitro0.168s (-4.0%)1.002s (~)0.010s (-12.5% 🟢)1.015s (~)0.847s101.22x
💻 LocalExpress0.174s (-1.5%)1.002s (~)0.010s (+6.3% 🔺)1.015s (~)0.841s101.27x
🌐 MongoDBNext.js (Turbopack)0.515s0.931s0.001s1.009s0.493s103.74x
🐘 PostgresNitro2.295s (-4.4%)2.739s (+3.9%)0.001s (-25.0% 🟢)3.013s (~)0.718s1016.66x
🐘 PostgresExpress2.477s (+14.3% 🔺)2.564s (-10.9% 🟢)0.001s (~)3.014s (~)0.538s1017.97x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.495s (-15.1% 🟢)3.275s (-11.7% 🟢)0.247s (+49.2% 🔺)4.250s (-10.9% 🟢)1.755s101.00x
▲ VercelNitro2.529s (-4.9%)3.291s (+6.9% 🔺)0.407s (+204.8% 🔺)4.536s (+13.0% 🔺)2.007s101.01x
▲ VercelExpress3.073s (+22.3% 🔺)3.474s (+16.5% 🔺)0.181s (-33.6% 🟢)4.418s (+10.3% 🔺)1.345s101.23x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)9/12
🐘 PostgresExpress6/12
▲ VercelNext.js (Turbopack)7/12
Fastest World by Framework

Winner determined by most benchmark wins

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

Worlds:

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

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds @workflow/ai/* entrypoints for additional official AI SDK providers using the existing 'use step' wrapper approach so model factory functions can cross workflow step boundaries.

Changes:

  • Added 12 new provider wrapper modules under packages/ai/src/providers/*.
  • Exposed new provider entrypoints via packages/ai/package.jsonexports and added corresponding optional dependencies.
  • Updated lockfile and added a changeset for a patch release of @workflow/ai.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 12 comments.

Show a summary per file
FileDescription
pnpm-lock.yamlAdds resolved optional dependencies for the new AI SDK provider packages (and their transitive deps).
packages/ai/package.jsonAdds exports entries for new provider subpath entrypoints and lists new provider SDKs as optional dependencies.
packages/ai/src/providers/amazon-bedrock.tsAdds step-compatible wrapper for Bedrock provider factory.
packages/ai/src/providers/azure.tsAdds step-compatible wrapper for Azure provider factory.
packages/ai/src/providers/cerebras.tsAdds step-compatible wrapper for Cerebras provider factory.
packages/ai/src/providers/cohere.tsAdds step-compatible wrapper for Cohere provider factory.
packages/ai/src/providers/deepinfra.tsAdds step-compatible wrapper for DeepInfra provider factory.
packages/ai/src/providers/deepseek.tsAdds step-compatible wrapper for DeepSeek provider factory.
packages/ai/src/providers/fireworks.tsAdds step-compatible wrapper for Fireworks provider factory.
packages/ai/src/providers/google-vertex.tsAdds step-compatible wrapper for Google Vertex provider factory.
packages/ai/src/providers/groq.tsAdds step-compatible wrapper for Groq provider factory.
packages/ai/src/providers/mistral.tsAdds step-compatible wrapper for Mistral provider factory.
packages/ai/src/providers/perplexity.tsAdds step-compatible wrapper for Perplexity provider factory.
packages/ai/src/providers/togetherai.tsAdds step-compatible wrapper for TogetherAI provider factory.
.changeset/add-ai-sdk-providers.mdDeclares a patch release noting the new provider wrappers.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpackages/ai/src/providers/mistral.ts
Comment threadpackages/ai/src/providers/amazon-bedrock.ts
Comment threadpackages/ai/src/providers/azure.ts
Comment threadpackages/ai/src/providers/cohere.ts
Comment threadpackages/ai/src/providers/fireworks.ts
Comment threadpackages/ai/src/providers/togetherai.ts
Comment threadpackages/ai/src/providers/cerebras.ts
Comment threadpackages/ai/src/providers/deepinfra.ts
Comment threadpackages/ai/src/providers/deepseek.ts
Comment threadpackages/ai/src/providers/google-vertex.ts
@pranaygp

pranaygp commented Feb 11, 2026

Copy link
Copy Markdown
ContributorAuthor

Closing: blocked on AI SDK v6 upgrade

After investigating the type compatibility issues flagged by Copilot's review, I'm closing this PR. The as CompatibleLanguageModel casts required by all 12 new providers aren't a good pattern to ship.

Root cause

All 12 new provider SDKs resolve to a different copy of @ai-sdk/provider than what @workflow/ai uses:

Provider SDKs@ai-sdk/provider version
@workflow/ai (direct dep)2.0.0
amazon-bedrock, google-vertex2.0.1
azure, cerebras, cohere, deepinfra, deepseek, fireworks, groq, mistral, perplexity, togetherai3.0.8

pnpm installs these as separate package instances, and TypeScript treats types from different copies as incompatible — even when structurally identical. This causes TS2742 ("inferred type cannot be named") on every new provider when you try to match the clean pattern used by the existing 5 providers (openai, anthropic, google, xai, gateway), which all happen to resolve to @ai-sdk/provider@2.0.0.

The only workaround is explicit return type annotations + as CompatibleLanguageModel casts, which hides the provider's concrete model type from consumers.

Why the existing providers work

openai, anthropic, google, xai, and gateway SDKs all depend on @ai-sdk/provider@2.0.0 — the same copy that @workflow/ai resolves to. TypeScript can name the types directly, so LanguageModelV2 satisfies CompatibleLanguageModel without any cast.

Path forward

Upgrading to AI SDK v6 exclusively (dropping v5 support) would unify the workspace on @ai-sdk/provider@3.x, eliminating the dual-version problem. However, that upgrade requires:

  1. Migrating consumer code (do-stream-step.ts, durable-agent.ts, stream-text-iterator.ts, tools-to-model-tools.ts) from V2 to V3 types
  2. Handling provider SDKs that don't have v3 releases yet (cerebras, deepinfra, deepseek, fireworks, togetherai)
  3. Handling provider SDKs whose v3 still depends on @ai-sdk/provider@2.0.1 (amazon-bedrock, google-vertex)

Once v6 is landed, adding these provider wrappers becomes trivial — just copy the existing openai/anthropic pattern with no casts needed.

cc @gr2m@lgrammel@TooTallNate — tagging for visibility since this is blocked on @ai-sdk/provider version alignment across provider packages.

@lgrammel

Copy link
Copy Markdown
Contributor

@pranaygp@gr2m all ai sdk 6 providers should use the v3 provider spec. the dependencies happen automatically:

https://github.com/vercel/ai/blob/main/packages/amazon-bedrock/package.json#L54

so I do not understand how you can have providers with older @ai-sdk/provider versions. you probably just need to upgrade them to their latest version?

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.

3 participants

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

Add provider wrappers for all official AI SDK providers - #986

Closed
pranaygp wants to merge 1 commit into
mainfrom
feat/add-ai-sdk-providers
Closed

Add provider wrappers for all official AI SDK providers#986
pranaygp wants to merge 1 commit into
mainfrom
feat/add-ai-sdk-providers

Conversation

@pranaygp

@pranaygppranaygp commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds step-boundary-compatible provider wrappers for 12 additional official AI SDK providers, matching the existing pattern used by openai, anthropic, google, xai, and gateway.

New providers:

  • Amazon Bedrock (@workflow/ai/amazon-bedrock)
  • Azure OpenAI (@workflow/ai/azure)
  • Cerebras (@workflow/ai/cerebras)
  • Cohere (@workflow/ai/cohere)
  • DeepInfra (@workflow/ai/deepinfra)
  • DeepSeek (@workflow/ai/deepseek)
  • Fireworks (@workflow/ai/fireworks)
  • Google Vertex AI (@workflow/ai/google-vertex)
  • Groq (@workflow/ai/groq)
  • Mistral (@workflow/ai/mistral)
  • Perplexity (@workflow/ai/perplexity)
  • TogetherAI (@workflow/ai/togetherai)

Each provider follows the same 'use step' wrapper pattern so that the model factory function survives step boundary serialization via the StepFunction serde mechanism. All provider SDK packages are added as optional dependencies.

Usage is identical to existing providers:

import{groq}from'@workflow/ai/groq';constagent=newDurableAgent({model: groq('llama-3.3-70b-versatile'),tools: { ... },});

Skipped providers:

  • @ai-sdk/huggingface — not a published package yet
  • @ai-sdk/openai-compatible — no default provider instance; requires custom configuration via createOpenAICompatible(). Users who need OpenAI-compatible providers can use the SDK package directly with a factory function.

Why some providers need as CompatibleLanguageModel casts

The 5 existing providers (openai, anthropic, google, xai, gateway) don't need casts because their SDK packages depend on @ai-sdk/provider@2.0.0 — the same copy that @workflow/ai resolves to. TypeScript sees identical types from the same package instance, so LanguageModelV2 satisfies CompatibleLanguageModel directly.

The 12 new providers depend on @ai-sdk/provider@3.0.8 (or @2.0.1 for amazon-bedrock/google-vertex), which pnpm resolves as a separate package instance. TypeScript treats types from different package copies as incompatible — even when they're structurally identical — causing TS2742 ("inferred type cannot be named") and TS2322 errors. The explicit return type annotation and as CompatibleLanguageModel cast is the only way to make these compile cleanly.

This is safe at runtime because both V2 and V3 models have the same structural doStream interface that @workflow/ai relies on.

Note: Upgrading to AI SDK v6 exclusively (dropping v5 support) was explored as a way to unify on @ai-sdk/provider@3.x across all packages. However, this requires migrating all consumer code (do-stream-step.ts, durable-agent.ts, etc.) from V2 to V3 types, and several provider SDKs still don't have v3 releases. That's a larger effort tracked separately.

Test plan

  • Verified build compiles with no new errors
  • Verified all 40 existing tests pass
  • Test with a user app that uses one of the new providers

🤖 Generated with Claude Code

…K providers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CopilotAI review requested due to automatic review settings February 9, 2026 22:11
@changeset-bot

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0a9f8c1

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

This PR includes changesets to release 1 package
NameType
@workflow/aiPatch

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

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

@vercel

vercelBot commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production489138528
❌ 💻 Local Development3774162480
✅ 📦 Local Production418062480
✅ 🐘 Local Postgres418062480
✅ 🪟 Windows450348
❌ 🌍 Community Worlds106419156
✅ 📋 Other123021144
Total1976832572316

❌ Failed Tests

▲ Vercel Production (1 failed)

nextjs-webpack (1 failed):

  • sleepingWorkflow
💻 Local Development (41 failed)

express-stable (41 failed):

  • addTenWorkflow
  • addTenWorkflow
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • webhook route with invalid token
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • stepDirectCallWorkflow - calling step functions directly outside workflow context
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check endpoint (HTTP) - workflow and step endpoints respond to __health query parameter
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
🌍 Community Worlds (41 failed)

turso (41 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4404
✅ example4404
✅ express4404
✅ fastify4404
✅ hono4404
✅ nextjs-turbopack4701
❌ nextjs-webpack4611
✅ nitro4404
✅ nuxt4404
✅ sveltekit4404
✅ vite4404
❌ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4107
❌ express-stable0417
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4503
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4503
✅ redis-dev300
✅ redis4503
✅ starter-dev300
✅ turso-dev300
❌ turso4413
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4107
✅ e2e-local-postgres-nest-stable4107
✅ e2e-local-prod-nest-stable4107

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: failure
  • Local Prod: success
  • Local Postgres: success
  • Windows: success

Check the workflow run for details.

@github-actions

github-actionsBot commented Feb 9, 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🥇 Nitro0.031s (-4.3%)1.005s (~)0.974s101.00x
💻 LocalExpress0.032s (-7.5% 🟢)1.004s (~)0.972s101.04x
💻 LocalNext.js (Turbopack)0.042s1.005s0.963s101.37x
🌐 RedisNext.js (Turbopack)0.045s1.005s0.960s101.44x
🌐 MongoDBNext.js (Turbopack)0.085s1.007s0.922s102.76x
🐘 PostgresExpress0.141s (-65.3% 🟢)1.009s (-1.2%)0.869s104.55x
🐘 PostgresNitro0.477s (+115.5% 🔺)1.009s (~)0.532s1015.44x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.769s (-15.8% 🟢)2.450s (+3.2%)1.681s101.00x
▲ VercelNitro0.861s (-4.8%)2.524s (+4.5%)1.662s101.12x
▲ VercelNext.js (Turbopack)0.864s (-11.5% 🟢)2.436s (-12.4% 🟢)1.572s101.12x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.098s2.005s0.908s101.00x
🌐 RedisNext.js (Turbopack)1.100s2.006s0.906s101.00x
💻 LocalNitro1.103s (~)2.005s (~)0.902s101.00x
💻 LocalExpress1.106s (~)2.005s (~)0.899s101.01x
🌐 MongoDBNext.js (Turbopack)1.300s2.008s0.708s101.18x
🐘 PostgresNitro2.355s (-4.2%)3.014s (~)0.658s102.15x
🐘 PostgresExpress2.365s (+4.8%)3.014s (~)0.649s102.15x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.603s (-2.3%)3.828s (+7.1% 🔺)1.224s101.00x
▲ VercelNitro2.750s (+5.5% 🔺)4.114s (+8.0% 🔺)1.363s101.06x
▲ VercelNext.js (Turbopack)2.780s (+1.8%)4.144s (+1.6%)1.364s101.07x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.689s11.021s0.332s31.00x
💻 LocalNext.js (Turbopack)10.692s11.021s0.330s31.00x
💻 LocalNitro10.813s (~)11.022s (~)0.209s31.01x
💻 LocalExpress10.834s (~)11.021s (~)0.187s31.01x
🌐 MongoDBNext.js (Turbopack)12.230s13.018s0.788s31.14x
🐘 PostgresNitro20.230s (-0.6%)21.055s (~)0.825s21.89x
🐘 PostgresExpress20.399s (+1.5%)21.059s (~)0.659s21.91x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro19.605s (~)20.998s (-0.9%)1.392s21.00x
▲ VercelNext.js (Turbopack)19.738s (+1.2%)21.071s (+3.1%)1.333s21.01x
▲ VercelExpress19.770s (-0.6%)21.286s (~)1.516s21.01x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.886s27.050s0.164s31.00x
💻 LocalNext.js (Turbopack)27.115s28.051s0.936s31.01x
💻 LocalNitro27.425s (-0.7%)28.051s (~)0.625s31.02x
💻 LocalExpress27.512s (~)28.050s (~)0.539s31.02x
🌐 MongoDBNext.js (Turbopack)30.506s31.037s0.531s21.13x
🐘 PostgresExpress50.209s (~)51.134s (~)0.925s21.87x
🐘 PostgresNitro50.511s (~)51.122s (~)0.612s21.88x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)48.883s (-3.5%)50.465s (-3.6%)1.583s21.00x
▲ VercelNitro49.279s (+0.8%)50.435s (~)1.156s21.01x
▲ VercelExpress49.688s (+2.3%)51.403s (+2.5%)1.715s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.316s55.099s0.783s21.00x
💻 LocalNext.js (Turbopack)56.408s57.101s0.692s21.04x
💻 LocalNitro56.986s (-0.7%)57.097s (-1.7%)0.111s21.05x
💻 LocalExpress57.184s (~)58.100s (+0.9%)0.916s21.05x
🌐 MongoDBNext.js (Turbopack)61.153s62.072s0.919s21.13x
🐘 PostgresNitro100.152s (~)100.213s (-1.0%)0.061s11.84x
🐘 PostgresExpress100.375s (~)101.241s (~)0.866s11.85x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)103.197s (+1.9%)104.035s (+1.2%)0.838s11.00x
▲ VercelNitro104.722s (~)106.206s (~)1.484s11.01x
▲ VercelExpress105.039s (~)106.542s (~)1.503s11.02x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.250s2.006s0.756s151.00x
💻 LocalNext.js (Turbopack)1.376s2.005s0.629s151.10x
💻 LocalExpress1.398s (-1.1%)2.005s (~)0.606s151.12x
💻 LocalNitro1.409s (+1.1%)2.005s (~)0.597s151.13x
🌐 MongoDBNext.js (Turbopack)2.147s3.008s0.862s101.72x
🐘 PostgresNitro2.221s (-3.6%)3.013s (~)0.792s101.78x
🐘 PostgresExpress2.408s (+3.2%)3.013s (~)0.606s101.93x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.786s (-14.7% 🟢)3.894s (-13.7% 🟢)1.108s81.00x
▲ VercelNext.js (Turbopack)3.031s (+1.4%)4.096s (-3.1%)1.064s81.09x
▲ VercelNitro3.088s (-19.2% 🟢)4.395s (-23.9% 🟢)1.307s71.11x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.470s3.008s0.538s101.00x
🌐 RedisNext.js (Turbopack)2.503s3.007s0.505s101.01x
💻 LocalNitro2.520s (-3.6%)3.006s (~)0.486s101.02x
💻 LocalExpress2.558s (+0.9%)3.008s (~)0.450s101.04x
🌐 MongoDBNext.js (Turbopack)4.761s5.178s0.417s61.93x
🐘 PostgresNitro8.385s (-1.5%)8.780s (~)0.395s43.39x
🐘 PostgresExpress8.742s (-2.0%)9.280s (~)0.538s43.54x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.163s (~)4.567s (+2.5%)1.404s71.00x
▲ VercelNitro3.251s (-4.2%)4.518s (+1.3%)1.267s71.03x
▲ VercelExpress3.338s (+5.5% 🔺)4.301s (-1.4%)0.963s71.06x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.036s4.867s0.831s71.00x
💻 LocalNitro7.026s (-5.5% 🟢)7.765s (-3.2%)0.739s41.74x
💻 LocalNext.js (Turbopack)7.137s7.413s0.275s51.77x
💻 LocalExpress7.462s (+6.0% 🔺)8.024s (+3.3%)0.562s41.85x
🌐 MongoDBNext.js (Turbopack)9.919s10.351s0.432s32.46x
🐘 PostgresExpress46.535s (-4.7%)47.125s (-4.1%)0.590s111.53x
🐘 PostgresNitro49.744s (-1.8%)50.104s (-2.0%)0.360s112.32x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.268s (+50.6% 🔺)6.266s (+19.3% 🔺)0.998s61.00x
▲ VercelNitro5.712s (+51.9% 🔺)7.349s (+25.8% 🔺)1.637s51.08x
▲ VercelNext.js (Turbopack)7.729s (+99.2% 🔺)9.071s (+69.0% 🔺)1.341s41.47x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.277s2.006s0.729s151.00x
💻 LocalNitro1.421s (-1.2%)2.005s (~)0.584s151.11x
💻 LocalNext.js (Turbopack)1.429s2.005s0.576s151.12x
💻 LocalExpress1.444s (+2.3%)2.005s (~)0.561s151.13x
🐘 PostgresExpress2.046s (-6.8% 🟢)2.681s (~)0.636s121.60x
🐘 PostgresNitro2.059s (+1.7%)2.511s (+8.3% 🔺)0.452s121.61x
🌐 MongoDBNext.js (Turbopack)2.174s3.007s0.834s101.70x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.610s (-13.1% 🟢)3.680s (-19.6% 🟢)1.071s91.00x
▲ VercelExpress2.640s (-9.1% 🟢)3.770s (-5.0% 🟢)1.130s81.01x
▲ VercelNitro2.659s (-5.5% 🟢)4.225s (+5.2% 🔺)1.565s81.02x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.513s3.008s0.495s101.00x
💻 LocalNext.js (Turbopack)2.565s3.008s0.443s101.02x
💻 LocalNitro2.604s (-4.3%)3.007s (~)0.403s101.04x
💻 LocalExpress2.687s (+0.7%)3.007s (~)0.321s101.07x
🌐 MongoDBNext.js (Turbopack)4.667s5.175s0.509s61.86x
🐘 PostgresExpress11.920s (-6.4% 🟢)12.377s (-7.5% 🟢)0.457s34.74x
🐘 PostgresNitro12.031s (+5.6% 🔺)12.701s (+8.6% 🔺)0.669s34.79x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.904s (-2.5%)3.937s (-5.3% 🟢)1.033s81.00x
▲ VercelExpress2.911s (+2.6%)3.897s (-3.5%)0.986s81.00x
▲ VercelNitro2.973s (+1.6%)4.349s (-5.0% 🟢)1.375s71.02x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.095s4.868s0.773s71.00x
💻 LocalNext.js (Turbopack)7.295s7.514s0.219s41.78x
💻 LocalNitro7.487s (-6.4% 🟢)8.019s (-8.6% 🟢)0.533s41.83x
💻 LocalExpress7.907s (+3.8%)8.277s (+3.3%)0.370s41.93x
🌐 MongoDBNext.js (Turbopack)10.049s10.348s0.299s32.45x
🐘 PostgresExpress51.210s (-2.3%)52.130s (-1.9%)0.920s112.51x
🐘 PostgresNitro54.770s (+7.7% 🔺)55.119s (+7.8% 🔺)0.349s113.38x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.650s (+6.2% 🔺)4.753s (-8.2% 🟢)1.103s71.00x
▲ VercelExpress3.908s (+1.9%)5.251s (+2.6%)1.343s61.07x
▲ VercelNitro4.233s (+15.7% 🔺)5.440s (+10.9% 🔺)1.207s61.16x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.138s1.001s0.010s1.015s0.877s101.00x
🌐 RedisNext.js (Turbopack)0.157s1.000s0.001s1.007s0.850s101.14x
💻 LocalNitro0.168s (-4.0%)1.002s (~)0.010s (-12.5% 🟢)1.015s (~)0.847s101.22x
💻 LocalExpress0.174s (-1.5%)1.002s (~)0.010s (+6.3% 🔺)1.015s (~)0.841s101.27x
🌐 MongoDBNext.js (Turbopack)0.515s0.931s0.001s1.009s0.493s103.74x
🐘 PostgresNitro2.295s (-4.4%)2.739s (+3.9%)0.001s (-25.0% 🟢)3.013s (~)0.718s1016.66x
🐘 PostgresExpress2.477s (+14.3% 🔺)2.564s (-10.9% 🟢)0.001s (~)3.014s (~)0.538s1017.97x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.495s (-15.1% 🟢)3.275s (-11.7% 🟢)0.247s (+49.2% 🔺)4.250s (-10.9% 🟢)1.755s101.00x
▲ VercelNitro2.529s (-4.9%)3.291s (+6.9% 🔺)0.407s (+204.8% 🔺)4.536s (+13.0% 🔺)2.007s101.01x
▲ VercelExpress3.073s (+22.3% 🔺)3.474s (+16.5% 🔺)0.181s (-33.6% 🟢)4.418s (+10.3% 🔺)1.345s101.23x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)9/12
🐘 PostgresExpress6/12
▲ VercelNext.js (Turbopack)7/12
Fastest World by Framework

Winner determined by most benchmark wins

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

Worlds:

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

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds @workflow/ai/* entrypoints for additional official AI SDK providers using the existing 'use step' wrapper approach so model factory functions can cross workflow step boundaries.

Changes:

  • Added 12 new provider wrapper modules under packages/ai/src/providers/*.
  • Exposed new provider entrypoints via packages/ai/package.jsonexports and added corresponding optional dependencies.
  • Updated lockfile and added a changeset for a patch release of @workflow/ai.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 12 comments.

Show a summary per file
FileDescription
pnpm-lock.yamlAdds resolved optional dependencies for the new AI SDK provider packages (and their transitive deps).
packages/ai/package.jsonAdds exports entries for new provider subpath entrypoints and lists new provider SDKs as optional dependencies.
packages/ai/src/providers/amazon-bedrock.tsAdds step-compatible wrapper for Bedrock provider factory.
packages/ai/src/providers/azure.tsAdds step-compatible wrapper for Azure provider factory.
packages/ai/src/providers/cerebras.tsAdds step-compatible wrapper for Cerebras provider factory.
packages/ai/src/providers/cohere.tsAdds step-compatible wrapper for Cohere provider factory.
packages/ai/src/providers/deepinfra.tsAdds step-compatible wrapper for DeepInfra provider factory.
packages/ai/src/providers/deepseek.tsAdds step-compatible wrapper for DeepSeek provider factory.
packages/ai/src/providers/fireworks.tsAdds step-compatible wrapper for Fireworks provider factory.
packages/ai/src/providers/google-vertex.tsAdds step-compatible wrapper for Google Vertex provider factory.
packages/ai/src/providers/groq.tsAdds step-compatible wrapper for Groq provider factory.
packages/ai/src/providers/mistral.tsAdds step-compatible wrapper for Mistral provider factory.
packages/ai/src/providers/perplexity.tsAdds step-compatible wrapper for Perplexity provider factory.
packages/ai/src/providers/togetherai.tsAdds step-compatible wrapper for TogetherAI provider factory.
.changeset/add-ai-sdk-providers.mdDeclares a patch release noting the new provider wrappers.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpackages/ai/src/providers/mistral.ts
Comment threadpackages/ai/src/providers/amazon-bedrock.ts
Comment threadpackages/ai/src/providers/azure.ts
Comment threadpackages/ai/src/providers/cohere.ts
Comment threadpackages/ai/src/providers/fireworks.ts
Comment threadpackages/ai/src/providers/togetherai.ts
Comment threadpackages/ai/src/providers/cerebras.ts
Comment threadpackages/ai/src/providers/deepinfra.ts
Comment threadpackages/ai/src/providers/deepseek.ts
Comment threadpackages/ai/src/providers/google-vertex.ts
@pranaygp

pranaygp commented Feb 11, 2026

Copy link
Copy Markdown
ContributorAuthor

Closing: blocked on AI SDK v6 upgrade

After investigating the type compatibility issues flagged by Copilot's review, I'm closing this PR. The as CompatibleLanguageModel casts required by all 12 new providers aren't a good pattern to ship.

Root cause

All 12 new provider SDKs resolve to a different copy of @ai-sdk/provider than what @workflow/ai uses:

Provider SDKs@ai-sdk/provider version
@workflow/ai (direct dep)2.0.0
amazon-bedrock, google-vertex2.0.1
azure, cerebras, cohere, deepinfra, deepseek, fireworks, groq, mistral, perplexity, togetherai3.0.8

pnpm installs these as separate package instances, and TypeScript treats types from different copies as incompatible — even when structurally identical. This causes TS2742 ("inferred type cannot be named") on every new provider when you try to match the clean pattern used by the existing 5 providers (openai, anthropic, google, xai, gateway), which all happen to resolve to @ai-sdk/provider@2.0.0.

The only workaround is explicit return type annotations + as CompatibleLanguageModel casts, which hides the provider's concrete model type from consumers.

Why the existing providers work

openai, anthropic, google, xai, and gateway SDKs all depend on @ai-sdk/provider@2.0.0 — the same copy that @workflow/ai resolves to. TypeScript can name the types directly, so LanguageModelV2 satisfies CompatibleLanguageModel without any cast.

Path forward

Upgrading to AI SDK v6 exclusively (dropping v5 support) would unify the workspace on @ai-sdk/provider@3.x, eliminating the dual-version problem. However, that upgrade requires:

  1. Migrating consumer code (do-stream-step.ts, durable-agent.ts, stream-text-iterator.ts, tools-to-model-tools.ts) from V2 to V3 types
  2. Handling provider SDKs that don't have v3 releases yet (cerebras, deepinfra, deepseek, fireworks, togetherai)
  3. Handling provider SDKs whose v3 still depends on @ai-sdk/provider@2.0.1 (amazon-bedrock, google-vertex)

Once v6 is landed, adding these provider wrappers becomes trivial — just copy the existing openai/anthropic pattern with no casts needed.

cc @gr2m@lgrammel@TooTallNate — tagging for visibility since this is blocked on @ai-sdk/provider version alignment across provider packages.

@lgrammel

Copy link
Copy Markdown
Contributor

@pranaygp@gr2m all ai sdk 6 providers should use the v3 provider spec. the dependencies happen automatically:

https://github.com/vercel/ai/blob/main/packages/amazon-bedrock/package.json#L54

so I do not understand how you can have providers with older @ai-sdk/provider versions. you probably just need to upgrade them to their latest version?

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.

3 participants

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

Add provider wrappers for all official AI SDK providers - #986

Closed
pranaygp wants to merge 1 commit into
mainfrom
feat/add-ai-sdk-providers
Closed

Add provider wrappers for all official AI SDK providers#986
pranaygp wants to merge 1 commit into
mainfrom
feat/add-ai-sdk-providers

Conversation

@pranaygp

@pranaygppranaygp commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds step-boundary-compatible provider wrappers for 12 additional official AI SDK providers, matching the existing pattern used by openai, anthropic, google, xai, and gateway.

New providers:

  • Amazon Bedrock (@workflow/ai/amazon-bedrock)
  • Azure OpenAI (@workflow/ai/azure)
  • Cerebras (@workflow/ai/cerebras)
  • Cohere (@workflow/ai/cohere)
  • DeepInfra (@workflow/ai/deepinfra)
  • DeepSeek (@workflow/ai/deepseek)
  • Fireworks (@workflow/ai/fireworks)
  • Google Vertex AI (@workflow/ai/google-vertex)
  • Groq (@workflow/ai/groq)
  • Mistral (@workflow/ai/mistral)
  • Perplexity (@workflow/ai/perplexity)
  • TogetherAI (@workflow/ai/togetherai)

Each provider follows the same 'use step' wrapper pattern so that the model factory function survives step boundary serialization via the StepFunction serde mechanism. All provider SDK packages are added as optional dependencies.

Usage is identical to existing providers:

import{groq}from'@workflow/ai/groq';constagent=newDurableAgent({model: groq('llama-3.3-70b-versatile'),tools: { ... },});

Skipped providers:

  • @ai-sdk/huggingface — not a published package yet
  • @ai-sdk/openai-compatible — no default provider instance; requires custom configuration via createOpenAICompatible(). Users who need OpenAI-compatible providers can use the SDK package directly with a factory function.

Why some providers need as CompatibleLanguageModel casts

The 5 existing providers (openai, anthropic, google, xai, gateway) don't need casts because their SDK packages depend on @ai-sdk/provider@2.0.0 — the same copy that @workflow/ai resolves to. TypeScript sees identical types from the same package instance, so LanguageModelV2 satisfies CompatibleLanguageModel directly.

The 12 new providers depend on @ai-sdk/provider@3.0.8 (or @2.0.1 for amazon-bedrock/google-vertex), which pnpm resolves as a separate package instance. TypeScript treats types from different package copies as incompatible — even when they're structurally identical — causing TS2742 ("inferred type cannot be named") and TS2322 errors. The explicit return type annotation and as CompatibleLanguageModel cast is the only way to make these compile cleanly.

This is safe at runtime because both V2 and V3 models have the same structural doStream interface that @workflow/ai relies on.

Note: Upgrading to AI SDK v6 exclusively (dropping v5 support) was explored as a way to unify on @ai-sdk/provider@3.x across all packages. However, this requires migrating all consumer code (do-stream-step.ts, durable-agent.ts, etc.) from V2 to V3 types, and several provider SDKs still don't have v3 releases. That's a larger effort tracked separately.

Test plan

  • Verified build compiles with no new errors
  • Verified all 40 existing tests pass
  • Test with a user app that uses one of the new providers

🤖 Generated with Claude Code

…K providers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CopilotAI review requested due to automatic review settings February 9, 2026 22:11
@changeset-bot

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0a9f8c1

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

This PR includes changesets to release 1 package
NameType
@workflow/aiPatch

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

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

@vercel

vercelBot commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production489138528
❌ 💻 Local Development3774162480
✅ 📦 Local Production418062480
✅ 🐘 Local Postgres418062480
✅ 🪟 Windows450348
❌ 🌍 Community Worlds106419156
✅ 📋 Other123021144
Total1976832572316

❌ Failed Tests

▲ Vercel Production (1 failed)

nextjs-webpack (1 failed):

  • sleepingWorkflow
💻 Local Development (41 failed)

express-stable (41 failed):

  • addTenWorkflow
  • addTenWorkflow
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • webhook route with invalid token
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • stepDirectCallWorkflow - calling step functions directly outside workflow context
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check endpoint (HTTP) - workflow and step endpoints respond to __health query parameter
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
🌍 Community Worlds (41 failed)

turso (41 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4404
✅ example4404
✅ express4404
✅ fastify4404
✅ hono4404
✅ nextjs-turbopack4701
❌ nextjs-webpack4611
✅ nitro4404
✅ nuxt4404
✅ sveltekit4404
✅ vite4404
❌ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4107
❌ express-stable0417
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4503
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4503
✅ redis-dev300
✅ redis4503
✅ starter-dev300
✅ turso-dev300
❌ turso4413
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4107
✅ e2e-local-postgres-nest-stable4107
✅ e2e-local-prod-nest-stable4107

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: failure
  • Local Prod: success
  • Local Postgres: success
  • Windows: success

Check the workflow run for details.

@github-actions

github-actionsBot commented Feb 9, 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🥇 Nitro0.031s (-4.3%)1.005s (~)0.974s101.00x
💻 LocalExpress0.032s (-7.5% 🟢)1.004s (~)0.972s101.04x
💻 LocalNext.js (Turbopack)0.042s1.005s0.963s101.37x
🌐 RedisNext.js (Turbopack)0.045s1.005s0.960s101.44x
🌐 MongoDBNext.js (Turbopack)0.085s1.007s0.922s102.76x
🐘 PostgresExpress0.141s (-65.3% 🟢)1.009s (-1.2%)0.869s104.55x
🐘 PostgresNitro0.477s (+115.5% 🔺)1.009s (~)0.532s1015.44x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.769s (-15.8% 🟢)2.450s (+3.2%)1.681s101.00x
▲ VercelNitro0.861s (-4.8%)2.524s (+4.5%)1.662s101.12x
▲ VercelNext.js (Turbopack)0.864s (-11.5% 🟢)2.436s (-12.4% 🟢)1.572s101.12x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.098s2.005s0.908s101.00x
🌐 RedisNext.js (Turbopack)1.100s2.006s0.906s101.00x
💻 LocalNitro1.103s (~)2.005s (~)0.902s101.00x
💻 LocalExpress1.106s (~)2.005s (~)0.899s101.01x
🌐 MongoDBNext.js (Turbopack)1.300s2.008s0.708s101.18x
🐘 PostgresNitro2.355s (-4.2%)3.014s (~)0.658s102.15x
🐘 PostgresExpress2.365s (+4.8%)3.014s (~)0.649s102.15x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.603s (-2.3%)3.828s (+7.1% 🔺)1.224s101.00x
▲ VercelNitro2.750s (+5.5% 🔺)4.114s (+8.0% 🔺)1.363s101.06x
▲ VercelNext.js (Turbopack)2.780s (+1.8%)4.144s (+1.6%)1.364s101.07x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.689s11.021s0.332s31.00x
💻 LocalNext.js (Turbopack)10.692s11.021s0.330s31.00x
💻 LocalNitro10.813s (~)11.022s (~)0.209s31.01x
💻 LocalExpress10.834s (~)11.021s (~)0.187s31.01x
🌐 MongoDBNext.js (Turbopack)12.230s13.018s0.788s31.14x
🐘 PostgresNitro20.230s (-0.6%)21.055s (~)0.825s21.89x
🐘 PostgresExpress20.399s (+1.5%)21.059s (~)0.659s21.91x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro19.605s (~)20.998s (-0.9%)1.392s21.00x
▲ VercelNext.js (Turbopack)19.738s (+1.2%)21.071s (+3.1%)1.333s21.01x
▲ VercelExpress19.770s (-0.6%)21.286s (~)1.516s21.01x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.886s27.050s0.164s31.00x
💻 LocalNext.js (Turbopack)27.115s28.051s0.936s31.01x
💻 LocalNitro27.425s (-0.7%)28.051s (~)0.625s31.02x
💻 LocalExpress27.512s (~)28.050s (~)0.539s31.02x
🌐 MongoDBNext.js (Turbopack)30.506s31.037s0.531s21.13x
🐘 PostgresExpress50.209s (~)51.134s (~)0.925s21.87x
🐘 PostgresNitro50.511s (~)51.122s (~)0.612s21.88x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)48.883s (-3.5%)50.465s (-3.6%)1.583s21.00x
▲ VercelNitro49.279s (+0.8%)50.435s (~)1.156s21.01x
▲ VercelExpress49.688s (+2.3%)51.403s (+2.5%)1.715s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.316s55.099s0.783s21.00x
💻 LocalNext.js (Turbopack)56.408s57.101s0.692s21.04x
💻 LocalNitro56.986s (-0.7%)57.097s (-1.7%)0.111s21.05x
💻 LocalExpress57.184s (~)58.100s (+0.9%)0.916s21.05x
🌐 MongoDBNext.js (Turbopack)61.153s62.072s0.919s21.13x
🐘 PostgresNitro100.152s (~)100.213s (-1.0%)0.061s11.84x
🐘 PostgresExpress100.375s (~)101.241s (~)0.866s11.85x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)103.197s (+1.9%)104.035s (+1.2%)0.838s11.00x
▲ VercelNitro104.722s (~)106.206s (~)1.484s11.01x
▲ VercelExpress105.039s (~)106.542s (~)1.503s11.02x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.250s2.006s0.756s151.00x
💻 LocalNext.js (Turbopack)1.376s2.005s0.629s151.10x
💻 LocalExpress1.398s (-1.1%)2.005s (~)0.606s151.12x
💻 LocalNitro1.409s (+1.1%)2.005s (~)0.597s151.13x
🌐 MongoDBNext.js (Turbopack)2.147s3.008s0.862s101.72x
🐘 PostgresNitro2.221s (-3.6%)3.013s (~)0.792s101.78x
🐘 PostgresExpress2.408s (+3.2%)3.013s (~)0.606s101.93x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.786s (-14.7% 🟢)3.894s (-13.7% 🟢)1.108s81.00x
▲ VercelNext.js (Turbopack)3.031s (+1.4%)4.096s (-3.1%)1.064s81.09x
▲ VercelNitro3.088s (-19.2% 🟢)4.395s (-23.9% 🟢)1.307s71.11x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.470s3.008s0.538s101.00x
🌐 RedisNext.js (Turbopack)2.503s3.007s0.505s101.01x
💻 LocalNitro2.520s (-3.6%)3.006s (~)0.486s101.02x
💻 LocalExpress2.558s (+0.9%)3.008s (~)0.450s101.04x
🌐 MongoDBNext.js (Turbopack)4.761s5.178s0.417s61.93x
🐘 PostgresNitro8.385s (-1.5%)8.780s (~)0.395s43.39x
🐘 PostgresExpress8.742s (-2.0%)9.280s (~)0.538s43.54x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.163s (~)4.567s (+2.5%)1.404s71.00x
▲ VercelNitro3.251s (-4.2%)4.518s (+1.3%)1.267s71.03x
▲ VercelExpress3.338s (+5.5% 🔺)4.301s (-1.4%)0.963s71.06x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.036s4.867s0.831s71.00x
💻 LocalNitro7.026s (-5.5% 🟢)7.765s (-3.2%)0.739s41.74x
💻 LocalNext.js (Turbopack)7.137s7.413s0.275s51.77x
💻 LocalExpress7.462s (+6.0% 🔺)8.024s (+3.3%)0.562s41.85x
🌐 MongoDBNext.js (Turbopack)9.919s10.351s0.432s32.46x
🐘 PostgresExpress46.535s (-4.7%)47.125s (-4.1%)0.590s111.53x
🐘 PostgresNitro49.744s (-1.8%)50.104s (-2.0%)0.360s112.32x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.268s (+50.6% 🔺)6.266s (+19.3% 🔺)0.998s61.00x
▲ VercelNitro5.712s (+51.9% 🔺)7.349s (+25.8% 🔺)1.637s51.08x
▲ VercelNext.js (Turbopack)7.729s (+99.2% 🔺)9.071s (+69.0% 🔺)1.341s41.47x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.277s2.006s0.729s151.00x
💻 LocalNitro1.421s (-1.2%)2.005s (~)0.584s151.11x
💻 LocalNext.js (Turbopack)1.429s2.005s0.576s151.12x
💻 LocalExpress1.444s (+2.3%)2.005s (~)0.561s151.13x
🐘 PostgresExpress2.046s (-6.8% 🟢)2.681s (~)0.636s121.60x
🐘 PostgresNitro2.059s (+1.7%)2.511s (+8.3% 🔺)0.452s121.61x
🌐 MongoDBNext.js (Turbopack)2.174s3.007s0.834s101.70x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.610s (-13.1% 🟢)3.680s (-19.6% 🟢)1.071s91.00x
▲ VercelExpress2.640s (-9.1% 🟢)3.770s (-5.0% 🟢)1.130s81.01x
▲ VercelNitro2.659s (-5.5% 🟢)4.225s (+5.2% 🔺)1.565s81.02x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.513s3.008s0.495s101.00x
💻 LocalNext.js (Turbopack)2.565s3.008s0.443s101.02x
💻 LocalNitro2.604s (-4.3%)3.007s (~)0.403s101.04x
💻 LocalExpress2.687s (+0.7%)3.007s (~)0.321s101.07x
🌐 MongoDBNext.js (Turbopack)4.667s5.175s0.509s61.86x
🐘 PostgresExpress11.920s (-6.4% 🟢)12.377s (-7.5% 🟢)0.457s34.74x
🐘 PostgresNitro12.031s (+5.6% 🔺)12.701s (+8.6% 🔺)0.669s34.79x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.904s (-2.5%)3.937s (-5.3% 🟢)1.033s81.00x
▲ VercelExpress2.911s (+2.6%)3.897s (-3.5%)0.986s81.00x
▲ VercelNitro2.973s (+1.6%)4.349s (-5.0% 🟢)1.375s71.02x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.095s4.868s0.773s71.00x
💻 LocalNext.js (Turbopack)7.295s7.514s0.219s41.78x
💻 LocalNitro7.487s (-6.4% 🟢)8.019s (-8.6% 🟢)0.533s41.83x
💻 LocalExpress7.907s (+3.8%)8.277s (+3.3%)0.370s41.93x
🌐 MongoDBNext.js (Turbopack)10.049s10.348s0.299s32.45x
🐘 PostgresExpress51.210s (-2.3%)52.130s (-1.9%)0.920s112.51x
🐘 PostgresNitro54.770s (+7.7% 🔺)55.119s (+7.8% 🔺)0.349s113.38x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.650s (+6.2% 🔺)4.753s (-8.2% 🟢)1.103s71.00x
▲ VercelExpress3.908s (+1.9%)5.251s (+2.6%)1.343s61.07x
▲ VercelNitro4.233s (+15.7% 🔺)5.440s (+10.9% 🔺)1.207s61.16x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.138s1.001s0.010s1.015s0.877s101.00x
🌐 RedisNext.js (Turbopack)0.157s1.000s0.001s1.007s0.850s101.14x
💻 LocalNitro0.168s (-4.0%)1.002s (~)0.010s (-12.5% 🟢)1.015s (~)0.847s101.22x
💻 LocalExpress0.174s (-1.5%)1.002s (~)0.010s (+6.3% 🔺)1.015s (~)0.841s101.27x
🌐 MongoDBNext.js (Turbopack)0.515s0.931s0.001s1.009s0.493s103.74x
🐘 PostgresNitro2.295s (-4.4%)2.739s (+3.9%)0.001s (-25.0% 🟢)3.013s (~)0.718s1016.66x
🐘 PostgresExpress2.477s (+14.3% 🔺)2.564s (-10.9% 🟢)0.001s (~)3.014s (~)0.538s1017.97x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.495s (-15.1% 🟢)3.275s (-11.7% 🟢)0.247s (+49.2% 🔺)4.250s (-10.9% 🟢)1.755s101.00x
▲ VercelNitro2.529s (-4.9%)3.291s (+6.9% 🔺)0.407s (+204.8% 🔺)4.536s (+13.0% 🔺)2.007s101.01x
▲ VercelExpress3.073s (+22.3% 🔺)3.474s (+16.5% 🔺)0.181s (-33.6% 🟢)4.418s (+10.3% 🔺)1.345s101.23x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)9/12
🐘 PostgresExpress6/12
▲ VercelNext.js (Turbopack)7/12
Fastest World by Framework

Winner determined by most benchmark wins

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

Worlds:

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

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds @workflow/ai/* entrypoints for additional official AI SDK providers using the existing 'use step' wrapper approach so model factory functions can cross workflow step boundaries.

Changes:

  • Added 12 new provider wrapper modules under packages/ai/src/providers/*.
  • Exposed new provider entrypoints via packages/ai/package.jsonexports and added corresponding optional dependencies.
  • Updated lockfile and added a changeset for a patch release of @workflow/ai.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 12 comments.

Show a summary per file
FileDescription
pnpm-lock.yamlAdds resolved optional dependencies for the new AI SDK provider packages (and their transitive deps).
packages/ai/package.jsonAdds exports entries for new provider subpath entrypoints and lists new provider SDKs as optional dependencies.
packages/ai/src/providers/amazon-bedrock.tsAdds step-compatible wrapper for Bedrock provider factory.
packages/ai/src/providers/azure.tsAdds step-compatible wrapper for Azure provider factory.
packages/ai/src/providers/cerebras.tsAdds step-compatible wrapper for Cerebras provider factory.
packages/ai/src/providers/cohere.tsAdds step-compatible wrapper for Cohere provider factory.
packages/ai/src/providers/deepinfra.tsAdds step-compatible wrapper for DeepInfra provider factory.
packages/ai/src/providers/deepseek.tsAdds step-compatible wrapper for DeepSeek provider factory.
packages/ai/src/providers/fireworks.tsAdds step-compatible wrapper for Fireworks provider factory.
packages/ai/src/providers/google-vertex.tsAdds step-compatible wrapper for Google Vertex provider factory.
packages/ai/src/providers/groq.tsAdds step-compatible wrapper for Groq provider factory.
packages/ai/src/providers/mistral.tsAdds step-compatible wrapper for Mistral provider factory.
packages/ai/src/providers/perplexity.tsAdds step-compatible wrapper for Perplexity provider factory.
packages/ai/src/providers/togetherai.tsAdds step-compatible wrapper for TogetherAI provider factory.
.changeset/add-ai-sdk-providers.mdDeclares a patch release noting the new provider wrappers.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpackages/ai/src/providers/mistral.ts
Comment threadpackages/ai/src/providers/amazon-bedrock.ts
Comment threadpackages/ai/src/providers/azure.ts
Comment threadpackages/ai/src/providers/cohere.ts
Comment threadpackages/ai/src/providers/fireworks.ts
Comment threadpackages/ai/src/providers/togetherai.ts
Comment threadpackages/ai/src/providers/cerebras.ts
Comment threadpackages/ai/src/providers/deepinfra.ts
Comment threadpackages/ai/src/providers/deepseek.ts
Comment threadpackages/ai/src/providers/google-vertex.ts
@pranaygp

pranaygp commented Feb 11, 2026

Copy link
Copy Markdown
ContributorAuthor

Closing: blocked on AI SDK v6 upgrade

After investigating the type compatibility issues flagged by Copilot's review, I'm closing this PR. The as CompatibleLanguageModel casts required by all 12 new providers aren't a good pattern to ship.

Root cause

All 12 new provider SDKs resolve to a different copy of @ai-sdk/provider than what @workflow/ai uses:

Provider SDKs@ai-sdk/provider version
@workflow/ai (direct dep)2.0.0
amazon-bedrock, google-vertex2.0.1
azure, cerebras, cohere, deepinfra, deepseek, fireworks, groq, mistral, perplexity, togetherai3.0.8

pnpm installs these as separate package instances, and TypeScript treats types from different copies as incompatible — even when structurally identical. This causes TS2742 ("inferred type cannot be named") on every new provider when you try to match the clean pattern used by the existing 5 providers (openai, anthropic, google, xai, gateway), which all happen to resolve to @ai-sdk/provider@2.0.0.

The only workaround is explicit return type annotations + as CompatibleLanguageModel casts, which hides the provider's concrete model type from consumers.

Why the existing providers work

openai, anthropic, google, xai, and gateway SDKs all depend on @ai-sdk/provider@2.0.0 — the same copy that @workflow/ai resolves to. TypeScript can name the types directly, so LanguageModelV2 satisfies CompatibleLanguageModel without any cast.

Path forward

Upgrading to AI SDK v6 exclusively (dropping v5 support) would unify the workspace on @ai-sdk/provider@3.x, eliminating the dual-version problem. However, that upgrade requires:

  1. Migrating consumer code (do-stream-step.ts, durable-agent.ts, stream-text-iterator.ts, tools-to-model-tools.ts) from V2 to V3 types
  2. Handling provider SDKs that don't have v3 releases yet (cerebras, deepinfra, deepseek, fireworks, togetherai)
  3. Handling provider SDKs whose v3 still depends on @ai-sdk/provider@2.0.1 (amazon-bedrock, google-vertex)

Once v6 is landed, adding these provider wrappers becomes trivial — just copy the existing openai/anthropic pattern with no casts needed.

cc @gr2m@lgrammel@TooTallNate — tagging for visibility since this is blocked on @ai-sdk/provider version alignment across provider packages.

@lgrammel

Copy link
Copy Markdown
Contributor

@pranaygp@gr2m all ai sdk 6 providers should use the v3 provider spec. the dependencies happen automatically:

https://github.com/vercel/ai/blob/main/packages/amazon-bedrock/package.json#L54

so I do not understand how you can have providers with older @ai-sdk/provider versions. you probably just need to upgrade them to their latest version?

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.

3 participants

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

Add provider wrappers for all official AI SDK providers - #986

Closed
pranaygp wants to merge 1 commit into
mainfrom
feat/add-ai-sdk-providers
Closed

Add provider wrappers for all official AI SDK providers#986
pranaygp wants to merge 1 commit into
mainfrom
feat/add-ai-sdk-providers

Conversation

@pranaygp

@pranaygppranaygp commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds step-boundary-compatible provider wrappers for 12 additional official AI SDK providers, matching the existing pattern used by openai, anthropic, google, xai, and gateway.

New providers:

  • Amazon Bedrock (@workflow/ai/amazon-bedrock)
  • Azure OpenAI (@workflow/ai/azure)
  • Cerebras (@workflow/ai/cerebras)
  • Cohere (@workflow/ai/cohere)
  • DeepInfra (@workflow/ai/deepinfra)
  • DeepSeek (@workflow/ai/deepseek)
  • Fireworks (@workflow/ai/fireworks)
  • Google Vertex AI (@workflow/ai/google-vertex)
  • Groq (@workflow/ai/groq)
  • Mistral (@workflow/ai/mistral)
  • Perplexity (@workflow/ai/perplexity)
  • TogetherAI (@workflow/ai/togetherai)

Each provider follows the same 'use step' wrapper pattern so that the model factory function survives step boundary serialization via the StepFunction serde mechanism. All provider SDK packages are added as optional dependencies.

Usage is identical to existing providers:

import{groq}from'@workflow/ai/groq';constagent=newDurableAgent({model: groq('llama-3.3-70b-versatile'),tools: { ... },});

Skipped providers:

  • @ai-sdk/huggingface — not a published package yet
  • @ai-sdk/openai-compatible — no default provider instance; requires custom configuration via createOpenAICompatible(). Users who need OpenAI-compatible providers can use the SDK package directly with a factory function.

Why some providers need as CompatibleLanguageModel casts

The 5 existing providers (openai, anthropic, google, xai, gateway) don't need casts because their SDK packages depend on @ai-sdk/provider@2.0.0 — the same copy that @workflow/ai resolves to. TypeScript sees identical types from the same package instance, so LanguageModelV2 satisfies CompatibleLanguageModel directly.

The 12 new providers depend on @ai-sdk/provider@3.0.8 (or @2.0.1 for amazon-bedrock/google-vertex), which pnpm resolves as a separate package instance. TypeScript treats types from different package copies as incompatible — even when they're structurally identical — causing TS2742 ("inferred type cannot be named") and TS2322 errors. The explicit return type annotation and as CompatibleLanguageModel cast is the only way to make these compile cleanly.

This is safe at runtime because both V2 and V3 models have the same structural doStream interface that @workflow/ai relies on.

Note: Upgrading to AI SDK v6 exclusively (dropping v5 support) was explored as a way to unify on @ai-sdk/provider@3.x across all packages. However, this requires migrating all consumer code (do-stream-step.ts, durable-agent.ts, etc.) from V2 to V3 types, and several provider SDKs still don't have v3 releases. That's a larger effort tracked separately.

Test plan

  • Verified build compiles with no new errors
  • Verified all 40 existing tests pass
  • Test with a user app that uses one of the new providers

🤖 Generated with Claude Code

…K providers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CopilotAI review requested due to automatic review settings February 9, 2026 22:11
@changeset-bot

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0a9f8c1

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

This PR includes changesets to release 1 package
NameType
@workflow/aiPatch

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

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

@vercel

vercelBot commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production489138528
❌ 💻 Local Development3774162480
✅ 📦 Local Production418062480
✅ 🐘 Local Postgres418062480
✅ 🪟 Windows450348
❌ 🌍 Community Worlds106419156
✅ 📋 Other123021144
Total1976832572316

❌ Failed Tests

▲ Vercel Production (1 failed)

nextjs-webpack (1 failed):

  • sleepingWorkflow
💻 Local Development (41 failed)

express-stable (41 failed):

  • addTenWorkflow
  • addTenWorkflow
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • webhook route with invalid token
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • stepDirectCallWorkflow - calling step functions directly outside workflow context
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check endpoint (HTTP) - workflow and step endpoints respond to __health query parameter
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
🌍 Community Worlds (41 failed)

turso (41 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4404
✅ example4404
✅ express4404
✅ fastify4404
✅ hono4404
✅ nextjs-turbopack4701
❌ nextjs-webpack4611
✅ nitro4404
✅ nuxt4404
✅ sveltekit4404
✅ vite4404
❌ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4107
❌ express-stable0417
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4503
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4503
✅ redis-dev300
✅ redis4503
✅ starter-dev300
✅ turso-dev300
❌ turso4413
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4107
✅ e2e-local-postgres-nest-stable4107
✅ e2e-local-prod-nest-stable4107

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: failure
  • Local Prod: success
  • Local Postgres: success
  • Windows: success

Check the workflow run for details.

@github-actions

github-actionsBot commented Feb 9, 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🥇 Nitro0.031s (-4.3%)1.005s (~)0.974s101.00x
💻 LocalExpress0.032s (-7.5% 🟢)1.004s (~)0.972s101.04x
💻 LocalNext.js (Turbopack)0.042s1.005s0.963s101.37x
🌐 RedisNext.js (Turbopack)0.045s1.005s0.960s101.44x
🌐 MongoDBNext.js (Turbopack)0.085s1.007s0.922s102.76x
🐘 PostgresExpress0.141s (-65.3% 🟢)1.009s (-1.2%)0.869s104.55x
🐘 PostgresNitro0.477s (+115.5% 🔺)1.009s (~)0.532s1015.44x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.769s (-15.8% 🟢)2.450s (+3.2%)1.681s101.00x
▲ VercelNitro0.861s (-4.8%)2.524s (+4.5%)1.662s101.12x
▲ VercelNext.js (Turbopack)0.864s (-11.5% 🟢)2.436s (-12.4% 🟢)1.572s101.12x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.098s2.005s0.908s101.00x
🌐 RedisNext.js (Turbopack)1.100s2.006s0.906s101.00x
💻 LocalNitro1.103s (~)2.005s (~)0.902s101.00x
💻 LocalExpress1.106s (~)2.005s (~)0.899s101.01x
🌐 MongoDBNext.js (Turbopack)1.300s2.008s0.708s101.18x
🐘 PostgresNitro2.355s (-4.2%)3.014s (~)0.658s102.15x
🐘 PostgresExpress2.365s (+4.8%)3.014s (~)0.649s102.15x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.603s (-2.3%)3.828s (+7.1% 🔺)1.224s101.00x
▲ VercelNitro2.750s (+5.5% 🔺)4.114s (+8.0% 🔺)1.363s101.06x
▲ VercelNext.js (Turbopack)2.780s (+1.8%)4.144s (+1.6%)1.364s101.07x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.689s11.021s0.332s31.00x
💻 LocalNext.js (Turbopack)10.692s11.021s0.330s31.00x
💻 LocalNitro10.813s (~)11.022s (~)0.209s31.01x
💻 LocalExpress10.834s (~)11.021s (~)0.187s31.01x
🌐 MongoDBNext.js (Turbopack)12.230s13.018s0.788s31.14x
🐘 PostgresNitro20.230s (-0.6%)21.055s (~)0.825s21.89x
🐘 PostgresExpress20.399s (+1.5%)21.059s (~)0.659s21.91x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro19.605s (~)20.998s (-0.9%)1.392s21.00x
▲ VercelNext.js (Turbopack)19.738s (+1.2%)21.071s (+3.1%)1.333s21.01x
▲ VercelExpress19.770s (-0.6%)21.286s (~)1.516s21.01x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.886s27.050s0.164s31.00x
💻 LocalNext.js (Turbopack)27.115s28.051s0.936s31.01x
💻 LocalNitro27.425s (-0.7%)28.051s (~)0.625s31.02x
💻 LocalExpress27.512s (~)28.050s (~)0.539s31.02x
🌐 MongoDBNext.js (Turbopack)30.506s31.037s0.531s21.13x
🐘 PostgresExpress50.209s (~)51.134s (~)0.925s21.87x
🐘 PostgresNitro50.511s (~)51.122s (~)0.612s21.88x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)48.883s (-3.5%)50.465s (-3.6%)1.583s21.00x
▲ VercelNitro49.279s (+0.8%)50.435s (~)1.156s21.01x
▲ VercelExpress49.688s (+2.3%)51.403s (+2.5%)1.715s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.316s55.099s0.783s21.00x
💻 LocalNext.js (Turbopack)56.408s57.101s0.692s21.04x
💻 LocalNitro56.986s (-0.7%)57.097s (-1.7%)0.111s21.05x
💻 LocalExpress57.184s (~)58.100s (+0.9%)0.916s21.05x
🌐 MongoDBNext.js (Turbopack)61.153s62.072s0.919s21.13x
🐘 PostgresNitro100.152s (~)100.213s (-1.0%)0.061s11.84x
🐘 PostgresExpress100.375s (~)101.241s (~)0.866s11.85x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)103.197s (+1.9%)104.035s (+1.2%)0.838s11.00x
▲ VercelNitro104.722s (~)106.206s (~)1.484s11.01x
▲ VercelExpress105.039s (~)106.542s (~)1.503s11.02x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.250s2.006s0.756s151.00x
💻 LocalNext.js (Turbopack)1.376s2.005s0.629s151.10x
💻 LocalExpress1.398s (-1.1%)2.005s (~)0.606s151.12x
💻 LocalNitro1.409s (+1.1%)2.005s (~)0.597s151.13x
🌐 MongoDBNext.js (Turbopack)2.147s3.008s0.862s101.72x
🐘 PostgresNitro2.221s (-3.6%)3.013s (~)0.792s101.78x
🐘 PostgresExpress2.408s (+3.2%)3.013s (~)0.606s101.93x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.786s (-14.7% 🟢)3.894s (-13.7% 🟢)1.108s81.00x
▲ VercelNext.js (Turbopack)3.031s (+1.4%)4.096s (-3.1%)1.064s81.09x
▲ VercelNitro3.088s (-19.2% 🟢)4.395s (-23.9% 🟢)1.307s71.11x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.470s3.008s0.538s101.00x
🌐 RedisNext.js (Turbopack)2.503s3.007s0.505s101.01x
💻 LocalNitro2.520s (-3.6%)3.006s (~)0.486s101.02x
💻 LocalExpress2.558s (+0.9%)3.008s (~)0.450s101.04x
🌐 MongoDBNext.js (Turbopack)4.761s5.178s0.417s61.93x
🐘 PostgresNitro8.385s (-1.5%)8.780s (~)0.395s43.39x
🐘 PostgresExpress8.742s (-2.0%)9.280s (~)0.538s43.54x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.163s (~)4.567s (+2.5%)1.404s71.00x
▲ VercelNitro3.251s (-4.2%)4.518s (+1.3%)1.267s71.03x
▲ VercelExpress3.338s (+5.5% 🔺)4.301s (-1.4%)0.963s71.06x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.036s4.867s0.831s71.00x
💻 LocalNitro7.026s (-5.5% 🟢)7.765s (-3.2%)0.739s41.74x
💻 LocalNext.js (Turbopack)7.137s7.413s0.275s51.77x
💻 LocalExpress7.462s (+6.0% 🔺)8.024s (+3.3%)0.562s41.85x
🌐 MongoDBNext.js (Turbopack)9.919s10.351s0.432s32.46x
🐘 PostgresExpress46.535s (-4.7%)47.125s (-4.1%)0.590s111.53x
🐘 PostgresNitro49.744s (-1.8%)50.104s (-2.0%)0.360s112.32x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.268s (+50.6% 🔺)6.266s (+19.3% 🔺)0.998s61.00x
▲ VercelNitro5.712s (+51.9% 🔺)7.349s (+25.8% 🔺)1.637s51.08x
▲ VercelNext.js (Turbopack)7.729s (+99.2% 🔺)9.071s (+69.0% 🔺)1.341s41.47x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.277s2.006s0.729s151.00x
💻 LocalNitro1.421s (-1.2%)2.005s (~)0.584s151.11x
💻 LocalNext.js (Turbopack)1.429s2.005s0.576s151.12x
💻 LocalExpress1.444s (+2.3%)2.005s (~)0.561s151.13x
🐘 PostgresExpress2.046s (-6.8% 🟢)2.681s (~)0.636s121.60x
🐘 PostgresNitro2.059s (+1.7%)2.511s (+8.3% 🔺)0.452s121.61x
🌐 MongoDBNext.js (Turbopack)2.174s3.007s0.834s101.70x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.610s (-13.1% 🟢)3.680s (-19.6% 🟢)1.071s91.00x
▲ VercelExpress2.640s (-9.1% 🟢)3.770s (-5.0% 🟢)1.130s81.01x
▲ VercelNitro2.659s (-5.5% 🟢)4.225s (+5.2% 🔺)1.565s81.02x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.513s3.008s0.495s101.00x
💻 LocalNext.js (Turbopack)2.565s3.008s0.443s101.02x
💻 LocalNitro2.604s (-4.3%)3.007s (~)0.403s101.04x
💻 LocalExpress2.687s (+0.7%)3.007s (~)0.321s101.07x
🌐 MongoDBNext.js (Turbopack)4.667s5.175s0.509s61.86x
🐘 PostgresExpress11.920s (-6.4% 🟢)12.377s (-7.5% 🟢)0.457s34.74x
🐘 PostgresNitro12.031s (+5.6% 🔺)12.701s (+8.6% 🔺)0.669s34.79x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.904s (-2.5%)3.937s (-5.3% 🟢)1.033s81.00x
▲ VercelExpress2.911s (+2.6%)3.897s (-3.5%)0.986s81.00x
▲ VercelNitro2.973s (+1.6%)4.349s (-5.0% 🟢)1.375s71.02x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.095s4.868s0.773s71.00x
💻 LocalNext.js (Turbopack)7.295s7.514s0.219s41.78x
💻 LocalNitro7.487s (-6.4% 🟢)8.019s (-8.6% 🟢)0.533s41.83x
💻 LocalExpress7.907s (+3.8%)8.277s (+3.3%)0.370s41.93x
🌐 MongoDBNext.js (Turbopack)10.049s10.348s0.299s32.45x
🐘 PostgresExpress51.210s (-2.3%)52.130s (-1.9%)0.920s112.51x
🐘 PostgresNitro54.770s (+7.7% 🔺)55.119s (+7.8% 🔺)0.349s113.38x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.650s (+6.2% 🔺)4.753s (-8.2% 🟢)1.103s71.00x
▲ VercelExpress3.908s (+1.9%)5.251s (+2.6%)1.343s61.07x
▲ VercelNitro4.233s (+15.7% 🔺)5.440s (+10.9% 🔺)1.207s61.16x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.138s1.001s0.010s1.015s0.877s101.00x
🌐 RedisNext.js (Turbopack)0.157s1.000s0.001s1.007s0.850s101.14x
💻 LocalNitro0.168s (-4.0%)1.002s (~)0.010s (-12.5% 🟢)1.015s (~)0.847s101.22x
💻 LocalExpress0.174s (-1.5%)1.002s (~)0.010s (+6.3% 🔺)1.015s (~)0.841s101.27x
🌐 MongoDBNext.js (Turbopack)0.515s0.931s0.001s1.009s0.493s103.74x
🐘 PostgresNitro2.295s (-4.4%)2.739s (+3.9%)0.001s (-25.0% 🟢)3.013s (~)0.718s1016.66x
🐘 PostgresExpress2.477s (+14.3% 🔺)2.564s (-10.9% 🟢)0.001s (~)3.014s (~)0.538s1017.97x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.495s (-15.1% 🟢)3.275s (-11.7% 🟢)0.247s (+49.2% 🔺)4.250s (-10.9% 🟢)1.755s101.00x
▲ VercelNitro2.529s (-4.9%)3.291s (+6.9% 🔺)0.407s (+204.8% 🔺)4.536s (+13.0% 🔺)2.007s101.01x
▲ VercelExpress3.073s (+22.3% 🔺)3.474s (+16.5% 🔺)0.181s (-33.6% 🟢)4.418s (+10.3% 🔺)1.345s101.23x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)9/12
🐘 PostgresExpress6/12
▲ VercelNext.js (Turbopack)7/12
Fastest World by Framework

Winner determined by most benchmark wins

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

Worlds:

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

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds @workflow/ai/* entrypoints for additional official AI SDK providers using the existing 'use step' wrapper approach so model factory functions can cross workflow step boundaries.

Changes:

  • Added 12 new provider wrapper modules under packages/ai/src/providers/*.
  • Exposed new provider entrypoints via packages/ai/package.jsonexports and added corresponding optional dependencies.
  • Updated lockfile and added a changeset for a patch release of @workflow/ai.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 12 comments.

Show a summary per file
FileDescription
pnpm-lock.yamlAdds resolved optional dependencies for the new AI SDK provider packages (and their transitive deps).
packages/ai/package.jsonAdds exports entries for new provider subpath entrypoints and lists new provider SDKs as optional dependencies.
packages/ai/src/providers/amazon-bedrock.tsAdds step-compatible wrapper for Bedrock provider factory.
packages/ai/src/providers/azure.tsAdds step-compatible wrapper for Azure provider factory.
packages/ai/src/providers/cerebras.tsAdds step-compatible wrapper for Cerebras provider factory.
packages/ai/src/providers/cohere.tsAdds step-compatible wrapper for Cohere provider factory.
packages/ai/src/providers/deepinfra.tsAdds step-compatible wrapper for DeepInfra provider factory.
packages/ai/src/providers/deepseek.tsAdds step-compatible wrapper for DeepSeek provider factory.
packages/ai/src/providers/fireworks.tsAdds step-compatible wrapper for Fireworks provider factory.
packages/ai/src/providers/google-vertex.tsAdds step-compatible wrapper for Google Vertex provider factory.
packages/ai/src/providers/groq.tsAdds step-compatible wrapper for Groq provider factory.
packages/ai/src/providers/mistral.tsAdds step-compatible wrapper for Mistral provider factory.
packages/ai/src/providers/perplexity.tsAdds step-compatible wrapper for Perplexity provider factory.
packages/ai/src/providers/togetherai.tsAdds step-compatible wrapper for TogetherAI provider factory.
.changeset/add-ai-sdk-providers.mdDeclares a patch release noting the new provider wrappers.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpackages/ai/src/providers/mistral.ts
Comment threadpackages/ai/src/providers/amazon-bedrock.ts
Comment threadpackages/ai/src/providers/azure.ts
Comment threadpackages/ai/src/providers/cohere.ts
Comment threadpackages/ai/src/providers/fireworks.ts
Comment threadpackages/ai/src/providers/togetherai.ts
Comment threadpackages/ai/src/providers/cerebras.ts
Comment threadpackages/ai/src/providers/deepinfra.ts
Comment threadpackages/ai/src/providers/deepseek.ts
Comment threadpackages/ai/src/providers/google-vertex.ts
@pranaygp

pranaygp commented Feb 11, 2026

Copy link
Copy Markdown
ContributorAuthor

Closing: blocked on AI SDK v6 upgrade

After investigating the type compatibility issues flagged by Copilot's review, I'm closing this PR. The as CompatibleLanguageModel casts required by all 12 new providers aren't a good pattern to ship.

Root cause

All 12 new provider SDKs resolve to a different copy of @ai-sdk/provider than what @workflow/ai uses:

Provider SDKs@ai-sdk/provider version
@workflow/ai (direct dep)2.0.0
amazon-bedrock, google-vertex2.0.1
azure, cerebras, cohere, deepinfra, deepseek, fireworks, groq, mistral, perplexity, togetherai3.0.8

pnpm installs these as separate package instances, and TypeScript treats types from different copies as incompatible — even when structurally identical. This causes TS2742 ("inferred type cannot be named") on every new provider when you try to match the clean pattern used by the existing 5 providers (openai, anthropic, google, xai, gateway), which all happen to resolve to @ai-sdk/provider@2.0.0.

The only workaround is explicit return type annotations + as CompatibleLanguageModel casts, which hides the provider's concrete model type from consumers.

Why the existing providers work

openai, anthropic, google, xai, and gateway SDKs all depend on @ai-sdk/provider@2.0.0 — the same copy that @workflow/ai resolves to. TypeScript can name the types directly, so LanguageModelV2 satisfies CompatibleLanguageModel without any cast.

Path forward

Upgrading to AI SDK v6 exclusively (dropping v5 support) would unify the workspace on @ai-sdk/provider@3.x, eliminating the dual-version problem. However, that upgrade requires:

  1. Migrating consumer code (do-stream-step.ts, durable-agent.ts, stream-text-iterator.ts, tools-to-model-tools.ts) from V2 to V3 types
  2. Handling provider SDKs that don't have v3 releases yet (cerebras, deepinfra, deepseek, fireworks, togetherai)
  3. Handling provider SDKs whose v3 still depends on @ai-sdk/provider@2.0.1 (amazon-bedrock, google-vertex)

Once v6 is landed, adding these provider wrappers becomes trivial — just copy the existing openai/anthropic pattern with no casts needed.

cc @gr2m@lgrammel@TooTallNate — tagging for visibility since this is blocked on @ai-sdk/provider version alignment across provider packages.

@lgrammel

Copy link
Copy Markdown
Contributor

@pranaygp@gr2m all ai sdk 6 providers should use the v3 provider spec. the dependencies happen automatically:

https://github.com/vercel/ai/blob/main/packages/amazon-bedrock/package.json#L54

so I do not understand how you can have providers with older @ai-sdk/provider versions. you probably just need to upgrade them to their latest version?

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.

3 participants

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

Add provider wrappers for all official AI SDK providers - #986

Closed
pranaygp wants to merge 1 commit into
mainfrom
feat/add-ai-sdk-providers
Closed

Add provider wrappers for all official AI SDK providers#986
pranaygp wants to merge 1 commit into
mainfrom
feat/add-ai-sdk-providers

Conversation

@pranaygp

@pranaygppranaygp commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds step-boundary-compatible provider wrappers for 12 additional official AI SDK providers, matching the existing pattern used by openai, anthropic, google, xai, and gateway.

New providers:

  • Amazon Bedrock (@workflow/ai/amazon-bedrock)
  • Azure OpenAI (@workflow/ai/azure)
  • Cerebras (@workflow/ai/cerebras)
  • Cohere (@workflow/ai/cohere)
  • DeepInfra (@workflow/ai/deepinfra)
  • DeepSeek (@workflow/ai/deepseek)
  • Fireworks (@workflow/ai/fireworks)
  • Google Vertex AI (@workflow/ai/google-vertex)
  • Groq (@workflow/ai/groq)
  • Mistral (@workflow/ai/mistral)
  • Perplexity (@workflow/ai/perplexity)
  • TogetherAI (@workflow/ai/togetherai)

Each provider follows the same 'use step' wrapper pattern so that the model factory function survives step boundary serialization via the StepFunction serde mechanism. All provider SDK packages are added as optional dependencies.

Usage is identical to existing providers:

import{groq}from'@workflow/ai/groq';constagent=newDurableAgent({model: groq('llama-3.3-70b-versatile'),tools: { ... },});

Skipped providers:

  • @ai-sdk/huggingface — not a published package yet
  • @ai-sdk/openai-compatible — no default provider instance; requires custom configuration via createOpenAICompatible(). Users who need OpenAI-compatible providers can use the SDK package directly with a factory function.

Why some providers need as CompatibleLanguageModel casts

The 5 existing providers (openai, anthropic, google, xai, gateway) don't need casts because their SDK packages depend on @ai-sdk/provider@2.0.0 — the same copy that @workflow/ai resolves to. TypeScript sees identical types from the same package instance, so LanguageModelV2 satisfies CompatibleLanguageModel directly.

The 12 new providers depend on @ai-sdk/provider@3.0.8 (or @2.0.1 for amazon-bedrock/google-vertex), which pnpm resolves as a separate package instance. TypeScript treats types from different package copies as incompatible — even when they're structurally identical — causing TS2742 ("inferred type cannot be named") and TS2322 errors. The explicit return type annotation and as CompatibleLanguageModel cast is the only way to make these compile cleanly.

This is safe at runtime because both V2 and V3 models have the same structural doStream interface that @workflow/ai relies on.

Note: Upgrading to AI SDK v6 exclusively (dropping v5 support) was explored as a way to unify on @ai-sdk/provider@3.x across all packages. However, this requires migrating all consumer code (do-stream-step.ts, durable-agent.ts, etc.) from V2 to V3 types, and several provider SDKs still don't have v3 releases. That's a larger effort tracked separately.

Test plan

  • Verified build compiles with no new errors
  • Verified all 40 existing tests pass
  • Test with a user app that uses one of the new providers

🤖 Generated with Claude Code

…K providers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CopilotAI review requested due to automatic review settings February 9, 2026 22:11
@changeset-bot

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0a9f8c1

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

This PR includes changesets to release 1 package
NameType
@workflow/aiPatch

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

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

@vercel

vercelBot commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production489138528
❌ 💻 Local Development3774162480
✅ 📦 Local Production418062480
✅ 🐘 Local Postgres418062480
✅ 🪟 Windows450348
❌ 🌍 Community Worlds106419156
✅ 📋 Other123021144
Total1976832572316

❌ Failed Tests

▲ Vercel Production (1 failed)

nextjs-webpack (1 failed):

  • sleepingWorkflow
💻 Local Development (41 failed)

express-stable (41 failed):

  • addTenWorkflow
  • addTenWorkflow
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • webhook route with invalid token
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • stepDirectCallWorkflow - calling step functions directly outside workflow context
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check endpoint (HTTP) - workflow and step endpoints respond to __health query parameter
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
🌍 Community Worlds (41 failed)

turso (41 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4404
✅ example4404
✅ express4404
✅ fastify4404
✅ hono4404
✅ nextjs-turbopack4701
❌ nextjs-webpack4611
✅ nitro4404
✅ nuxt4404
✅ sveltekit4404
✅ vite4404
❌ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4107
❌ express-stable0417
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4503
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4503
✅ redis-dev300
✅ redis4503
✅ starter-dev300
✅ turso-dev300
❌ turso4413
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4107
✅ e2e-local-postgres-nest-stable4107
✅ e2e-local-prod-nest-stable4107

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: failure
  • Local Prod: success
  • Local Postgres: success
  • Windows: success

Check the workflow run for details.

@github-actions

github-actionsBot commented Feb 9, 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🥇 Nitro0.031s (-4.3%)1.005s (~)0.974s101.00x
💻 LocalExpress0.032s (-7.5% 🟢)1.004s (~)0.972s101.04x
💻 LocalNext.js (Turbopack)0.042s1.005s0.963s101.37x
🌐 RedisNext.js (Turbopack)0.045s1.005s0.960s101.44x
🌐 MongoDBNext.js (Turbopack)0.085s1.007s0.922s102.76x
🐘 PostgresExpress0.141s (-65.3% 🟢)1.009s (-1.2%)0.869s104.55x
🐘 PostgresNitro0.477s (+115.5% 🔺)1.009s (~)0.532s1015.44x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.769s (-15.8% 🟢)2.450s (+3.2%)1.681s101.00x
▲ VercelNitro0.861s (-4.8%)2.524s (+4.5%)1.662s101.12x
▲ VercelNext.js (Turbopack)0.864s (-11.5% 🟢)2.436s (-12.4% 🟢)1.572s101.12x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.098s2.005s0.908s101.00x
🌐 RedisNext.js (Turbopack)1.100s2.006s0.906s101.00x
💻 LocalNitro1.103s (~)2.005s (~)0.902s101.00x
💻 LocalExpress1.106s (~)2.005s (~)0.899s101.01x
🌐 MongoDBNext.js (Turbopack)1.300s2.008s0.708s101.18x
🐘 PostgresNitro2.355s (-4.2%)3.014s (~)0.658s102.15x
🐘 PostgresExpress2.365s (+4.8%)3.014s (~)0.649s102.15x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.603s (-2.3%)3.828s (+7.1% 🔺)1.224s101.00x
▲ VercelNitro2.750s (+5.5% 🔺)4.114s (+8.0% 🔺)1.363s101.06x
▲ VercelNext.js (Turbopack)2.780s (+1.8%)4.144s (+1.6%)1.364s101.07x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.689s11.021s0.332s31.00x
💻 LocalNext.js (Turbopack)10.692s11.021s0.330s31.00x
💻 LocalNitro10.813s (~)11.022s (~)0.209s31.01x
💻 LocalExpress10.834s (~)11.021s (~)0.187s31.01x
🌐 MongoDBNext.js (Turbopack)12.230s13.018s0.788s31.14x
🐘 PostgresNitro20.230s (-0.6%)21.055s (~)0.825s21.89x
🐘 PostgresExpress20.399s (+1.5%)21.059s (~)0.659s21.91x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro19.605s (~)20.998s (-0.9%)1.392s21.00x
▲ VercelNext.js (Turbopack)19.738s (+1.2%)21.071s (+3.1%)1.333s21.01x
▲ VercelExpress19.770s (-0.6%)21.286s (~)1.516s21.01x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.886s27.050s0.164s31.00x
💻 LocalNext.js (Turbopack)27.115s28.051s0.936s31.01x
💻 LocalNitro27.425s (-0.7%)28.051s (~)0.625s31.02x
💻 LocalExpress27.512s (~)28.050s (~)0.539s31.02x
🌐 MongoDBNext.js (Turbopack)30.506s31.037s0.531s21.13x
🐘 PostgresExpress50.209s (~)51.134s (~)0.925s21.87x
🐘 PostgresNitro50.511s (~)51.122s (~)0.612s21.88x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)48.883s (-3.5%)50.465s (-3.6%)1.583s21.00x
▲ VercelNitro49.279s (+0.8%)50.435s (~)1.156s21.01x
▲ VercelExpress49.688s (+2.3%)51.403s (+2.5%)1.715s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.316s55.099s0.783s21.00x
💻 LocalNext.js (Turbopack)56.408s57.101s0.692s21.04x
💻 LocalNitro56.986s (-0.7%)57.097s (-1.7%)0.111s21.05x
💻 LocalExpress57.184s (~)58.100s (+0.9%)0.916s21.05x
🌐 MongoDBNext.js (Turbopack)61.153s62.072s0.919s21.13x
🐘 PostgresNitro100.152s (~)100.213s (-1.0%)0.061s11.84x
🐘 PostgresExpress100.375s (~)101.241s (~)0.866s11.85x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)103.197s (+1.9%)104.035s (+1.2%)0.838s11.00x
▲ VercelNitro104.722s (~)106.206s (~)1.484s11.01x
▲ VercelExpress105.039s (~)106.542s (~)1.503s11.02x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.250s2.006s0.756s151.00x
💻 LocalNext.js (Turbopack)1.376s2.005s0.629s151.10x
💻 LocalExpress1.398s (-1.1%)2.005s (~)0.606s151.12x
💻 LocalNitro1.409s (+1.1%)2.005s (~)0.597s151.13x
🌐 MongoDBNext.js (Turbopack)2.147s3.008s0.862s101.72x
🐘 PostgresNitro2.221s (-3.6%)3.013s (~)0.792s101.78x
🐘 PostgresExpress2.408s (+3.2%)3.013s (~)0.606s101.93x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.786s (-14.7% 🟢)3.894s (-13.7% 🟢)1.108s81.00x
▲ VercelNext.js (Turbopack)3.031s (+1.4%)4.096s (-3.1%)1.064s81.09x
▲ VercelNitro3.088s (-19.2% 🟢)4.395s (-23.9% 🟢)1.307s71.11x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.470s3.008s0.538s101.00x
🌐 RedisNext.js (Turbopack)2.503s3.007s0.505s101.01x
💻 LocalNitro2.520s (-3.6%)3.006s (~)0.486s101.02x
💻 LocalExpress2.558s (+0.9%)3.008s (~)0.450s101.04x
🌐 MongoDBNext.js (Turbopack)4.761s5.178s0.417s61.93x
🐘 PostgresNitro8.385s (-1.5%)8.780s (~)0.395s43.39x
🐘 PostgresExpress8.742s (-2.0%)9.280s (~)0.538s43.54x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.163s (~)4.567s (+2.5%)1.404s71.00x
▲ VercelNitro3.251s (-4.2%)4.518s (+1.3%)1.267s71.03x
▲ VercelExpress3.338s (+5.5% 🔺)4.301s (-1.4%)0.963s71.06x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.036s4.867s0.831s71.00x
💻 LocalNitro7.026s (-5.5% 🟢)7.765s (-3.2%)0.739s41.74x
💻 LocalNext.js (Turbopack)7.137s7.413s0.275s51.77x
💻 LocalExpress7.462s (+6.0% 🔺)8.024s (+3.3%)0.562s41.85x
🌐 MongoDBNext.js (Turbopack)9.919s10.351s0.432s32.46x
🐘 PostgresExpress46.535s (-4.7%)47.125s (-4.1%)0.590s111.53x
🐘 PostgresNitro49.744s (-1.8%)50.104s (-2.0%)0.360s112.32x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.268s (+50.6% 🔺)6.266s (+19.3% 🔺)0.998s61.00x
▲ VercelNitro5.712s (+51.9% 🔺)7.349s (+25.8% 🔺)1.637s51.08x
▲ VercelNext.js (Turbopack)7.729s (+99.2% 🔺)9.071s (+69.0% 🔺)1.341s41.47x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.277s2.006s0.729s151.00x
💻 LocalNitro1.421s (-1.2%)2.005s (~)0.584s151.11x
💻 LocalNext.js (Turbopack)1.429s2.005s0.576s151.12x
💻 LocalExpress1.444s (+2.3%)2.005s (~)0.561s151.13x
🐘 PostgresExpress2.046s (-6.8% 🟢)2.681s (~)0.636s121.60x
🐘 PostgresNitro2.059s (+1.7%)2.511s (+8.3% 🔺)0.452s121.61x
🌐 MongoDBNext.js (Turbopack)2.174s3.007s0.834s101.70x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.610s (-13.1% 🟢)3.680s (-19.6% 🟢)1.071s91.00x
▲ VercelExpress2.640s (-9.1% 🟢)3.770s (-5.0% 🟢)1.130s81.01x
▲ VercelNitro2.659s (-5.5% 🟢)4.225s (+5.2% 🔺)1.565s81.02x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.513s3.008s0.495s101.00x
💻 LocalNext.js (Turbopack)2.565s3.008s0.443s101.02x
💻 LocalNitro2.604s (-4.3%)3.007s (~)0.403s101.04x
💻 LocalExpress2.687s (+0.7%)3.007s (~)0.321s101.07x
🌐 MongoDBNext.js (Turbopack)4.667s5.175s0.509s61.86x
🐘 PostgresExpress11.920s (-6.4% 🟢)12.377s (-7.5% 🟢)0.457s34.74x
🐘 PostgresNitro12.031s (+5.6% 🔺)12.701s (+8.6% 🔺)0.669s34.79x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.904s (-2.5%)3.937s (-5.3% 🟢)1.033s81.00x
▲ VercelExpress2.911s (+2.6%)3.897s (-3.5%)0.986s81.00x
▲ VercelNitro2.973s (+1.6%)4.349s (-5.0% 🟢)1.375s71.02x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.095s4.868s0.773s71.00x
💻 LocalNext.js (Turbopack)7.295s7.514s0.219s41.78x
💻 LocalNitro7.487s (-6.4% 🟢)8.019s (-8.6% 🟢)0.533s41.83x
💻 LocalExpress7.907s (+3.8%)8.277s (+3.3%)0.370s41.93x
🌐 MongoDBNext.js (Turbopack)10.049s10.348s0.299s32.45x
🐘 PostgresExpress51.210s (-2.3%)52.130s (-1.9%)0.920s112.51x
🐘 PostgresNitro54.770s (+7.7% 🔺)55.119s (+7.8% 🔺)0.349s113.38x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.650s (+6.2% 🔺)4.753s (-8.2% 🟢)1.103s71.00x
▲ VercelExpress3.908s (+1.9%)5.251s (+2.6%)1.343s61.07x
▲ VercelNitro4.233s (+15.7% 🔺)5.440s (+10.9% 🔺)1.207s61.16x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.138s1.001s0.010s1.015s0.877s101.00x
🌐 RedisNext.js (Turbopack)0.157s1.000s0.001s1.007s0.850s101.14x
💻 LocalNitro0.168s (-4.0%)1.002s (~)0.010s (-12.5% 🟢)1.015s (~)0.847s101.22x
💻 LocalExpress0.174s (-1.5%)1.002s (~)0.010s (+6.3% 🔺)1.015s (~)0.841s101.27x
🌐 MongoDBNext.js (Turbopack)0.515s0.931s0.001s1.009s0.493s103.74x
🐘 PostgresNitro2.295s (-4.4%)2.739s (+3.9%)0.001s (-25.0% 🟢)3.013s (~)0.718s1016.66x
🐘 PostgresExpress2.477s (+14.3% 🔺)2.564s (-10.9% 🟢)0.001s (~)3.014s (~)0.538s1017.97x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.495s (-15.1% 🟢)3.275s (-11.7% 🟢)0.247s (+49.2% 🔺)4.250s (-10.9% 🟢)1.755s101.00x
▲ VercelNitro2.529s (-4.9%)3.291s (+6.9% 🔺)0.407s (+204.8% 🔺)4.536s (+13.0% 🔺)2.007s101.01x
▲ VercelExpress3.073s (+22.3% 🔺)3.474s (+16.5% 🔺)0.181s (-33.6% 🟢)4.418s (+10.3% 🔺)1.345s101.23x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)9/12
🐘 PostgresExpress6/12
▲ VercelNext.js (Turbopack)7/12
Fastest World by Framework

Winner determined by most benchmark wins

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

Worlds:

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

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds @workflow/ai/* entrypoints for additional official AI SDK providers using the existing 'use step' wrapper approach so model factory functions can cross workflow step boundaries.

Changes:

  • Added 12 new provider wrapper modules under packages/ai/src/providers/*.
  • Exposed new provider entrypoints via packages/ai/package.jsonexports and added corresponding optional dependencies.
  • Updated lockfile and added a changeset for a patch release of @workflow/ai.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 12 comments.

Show a summary per file
FileDescription
pnpm-lock.yamlAdds resolved optional dependencies for the new AI SDK provider packages (and their transitive deps).
packages/ai/package.jsonAdds exports entries for new provider subpath entrypoints and lists new provider SDKs as optional dependencies.
packages/ai/src/providers/amazon-bedrock.tsAdds step-compatible wrapper for Bedrock provider factory.
packages/ai/src/providers/azure.tsAdds step-compatible wrapper for Azure provider factory.
packages/ai/src/providers/cerebras.tsAdds step-compatible wrapper for Cerebras provider factory.
packages/ai/src/providers/cohere.tsAdds step-compatible wrapper for Cohere provider factory.
packages/ai/src/providers/deepinfra.tsAdds step-compatible wrapper for DeepInfra provider factory.
packages/ai/src/providers/deepseek.tsAdds step-compatible wrapper for DeepSeek provider factory.
packages/ai/src/providers/fireworks.tsAdds step-compatible wrapper for Fireworks provider factory.
packages/ai/src/providers/google-vertex.tsAdds step-compatible wrapper for Google Vertex provider factory.
packages/ai/src/providers/groq.tsAdds step-compatible wrapper for Groq provider factory.
packages/ai/src/providers/mistral.tsAdds step-compatible wrapper for Mistral provider factory.
packages/ai/src/providers/perplexity.tsAdds step-compatible wrapper for Perplexity provider factory.
packages/ai/src/providers/togetherai.tsAdds step-compatible wrapper for TogetherAI provider factory.
.changeset/add-ai-sdk-providers.mdDeclares a patch release noting the new provider wrappers.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpackages/ai/src/providers/mistral.ts
Comment threadpackages/ai/src/providers/amazon-bedrock.ts
Comment threadpackages/ai/src/providers/azure.ts
Comment threadpackages/ai/src/providers/cohere.ts
Comment threadpackages/ai/src/providers/fireworks.ts
Comment threadpackages/ai/src/providers/togetherai.ts
Comment threadpackages/ai/src/providers/cerebras.ts
Comment threadpackages/ai/src/providers/deepinfra.ts
Comment threadpackages/ai/src/providers/deepseek.ts
Comment threadpackages/ai/src/providers/google-vertex.ts
@pranaygp

pranaygp commented Feb 11, 2026

Copy link
Copy Markdown
ContributorAuthor

Closing: blocked on AI SDK v6 upgrade

After investigating the type compatibility issues flagged by Copilot's review, I'm closing this PR. The as CompatibleLanguageModel casts required by all 12 new providers aren't a good pattern to ship.

Root cause

All 12 new provider SDKs resolve to a different copy of @ai-sdk/provider than what @workflow/ai uses:

Provider SDKs@ai-sdk/provider version
@workflow/ai (direct dep)2.0.0
amazon-bedrock, google-vertex2.0.1
azure, cerebras, cohere, deepinfra, deepseek, fireworks, groq, mistral, perplexity, togetherai3.0.8

pnpm installs these as separate package instances, and TypeScript treats types from different copies as incompatible — even when structurally identical. This causes TS2742 ("inferred type cannot be named") on every new provider when you try to match the clean pattern used by the existing 5 providers (openai, anthropic, google, xai, gateway), which all happen to resolve to @ai-sdk/provider@2.0.0.

The only workaround is explicit return type annotations + as CompatibleLanguageModel casts, which hides the provider's concrete model type from consumers.

Why the existing providers work

openai, anthropic, google, xai, and gateway SDKs all depend on @ai-sdk/provider@2.0.0 — the same copy that @workflow/ai resolves to. TypeScript can name the types directly, so LanguageModelV2 satisfies CompatibleLanguageModel without any cast.

Path forward

Upgrading to AI SDK v6 exclusively (dropping v5 support) would unify the workspace on @ai-sdk/provider@3.x, eliminating the dual-version problem. However, that upgrade requires:

  1. Migrating consumer code (do-stream-step.ts, durable-agent.ts, stream-text-iterator.ts, tools-to-model-tools.ts) from V2 to V3 types
  2. Handling provider SDKs that don't have v3 releases yet (cerebras, deepinfra, deepseek, fireworks, togetherai)
  3. Handling provider SDKs whose v3 still depends on @ai-sdk/provider@2.0.1 (amazon-bedrock, google-vertex)

Once v6 is landed, adding these provider wrappers becomes trivial — just copy the existing openai/anthropic pattern with no casts needed.

cc @gr2m@lgrammel@TooTallNate — tagging for visibility since this is blocked on @ai-sdk/provider version alignment across provider packages.

@lgrammel

Copy link
Copy Markdown
Contributor

@pranaygp@gr2m all ai sdk 6 providers should use the v3 provider spec. the dependencies happen automatically:

https://github.com/vercel/ai/blob/main/packages/amazon-bedrock/package.json#L54

so I do not understand how you can have providers with older @ai-sdk/provider versions. you probably just need to upgrade them to their latest version?

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.

3 participants

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

Add provider wrappers for all official AI SDK providers - #986

Closed
pranaygp wants to merge 1 commit into
mainfrom
feat/add-ai-sdk-providers
Closed

Add provider wrappers for all official AI SDK providers#986
pranaygp wants to merge 1 commit into
mainfrom
feat/add-ai-sdk-providers

Conversation

@pranaygp

@pranaygppranaygp commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds step-boundary-compatible provider wrappers for 12 additional official AI SDK providers, matching the existing pattern used by openai, anthropic, google, xai, and gateway.

New providers:

  • Amazon Bedrock (@workflow/ai/amazon-bedrock)
  • Azure OpenAI (@workflow/ai/azure)
  • Cerebras (@workflow/ai/cerebras)
  • Cohere (@workflow/ai/cohere)
  • DeepInfra (@workflow/ai/deepinfra)
  • DeepSeek (@workflow/ai/deepseek)
  • Fireworks (@workflow/ai/fireworks)
  • Google Vertex AI (@workflow/ai/google-vertex)
  • Groq (@workflow/ai/groq)
  • Mistral (@workflow/ai/mistral)
  • Perplexity (@workflow/ai/perplexity)
  • TogetherAI (@workflow/ai/togetherai)

Each provider follows the same 'use step' wrapper pattern so that the model factory function survives step boundary serialization via the StepFunction serde mechanism. All provider SDK packages are added as optional dependencies.

Usage is identical to existing providers:

import{groq}from'@workflow/ai/groq';constagent=newDurableAgent({model: groq('llama-3.3-70b-versatile'),tools: { ... },});

Skipped providers:

  • @ai-sdk/huggingface — not a published package yet
  • @ai-sdk/openai-compatible — no default provider instance; requires custom configuration via createOpenAICompatible(). Users who need OpenAI-compatible providers can use the SDK package directly with a factory function.

Why some providers need as CompatibleLanguageModel casts

The 5 existing providers (openai, anthropic, google, xai, gateway) don't need casts because their SDK packages depend on @ai-sdk/provider@2.0.0 — the same copy that @workflow/ai resolves to. TypeScript sees identical types from the same package instance, so LanguageModelV2 satisfies CompatibleLanguageModel directly.

The 12 new providers depend on @ai-sdk/provider@3.0.8 (or @2.0.1 for amazon-bedrock/google-vertex), which pnpm resolves as a separate package instance. TypeScript treats types from different package copies as incompatible — even when they're structurally identical — causing TS2742 ("inferred type cannot be named") and TS2322 errors. The explicit return type annotation and as CompatibleLanguageModel cast is the only way to make these compile cleanly.

This is safe at runtime because both V2 and V3 models have the same structural doStream interface that @workflow/ai relies on.

Note: Upgrading to AI SDK v6 exclusively (dropping v5 support) was explored as a way to unify on @ai-sdk/provider@3.x across all packages. However, this requires migrating all consumer code (do-stream-step.ts, durable-agent.ts, etc.) from V2 to V3 types, and several provider SDKs still don't have v3 releases. That's a larger effort tracked separately.

Test plan

  • Verified build compiles with no new errors
  • Verified all 40 existing tests pass
  • Test with a user app that uses one of the new providers

🤖 Generated with Claude Code

…K providers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CopilotAI review requested due to automatic review settings February 9, 2026 22:11
@changeset-bot

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0a9f8c1

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

This PR includes changesets to release 1 package
NameType
@workflow/aiPatch

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

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

@vercel

vercelBot commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production489138528
❌ 💻 Local Development3774162480
✅ 📦 Local Production418062480
✅ 🐘 Local Postgres418062480
✅ 🪟 Windows450348
❌ 🌍 Community Worlds106419156
✅ 📋 Other123021144
Total1976832572316

❌ Failed Tests

▲ Vercel Production (1 failed)

nextjs-webpack (1 failed):

  • sleepingWorkflow
💻 Local Development (41 failed)

express-stable (41 failed):

  • addTenWorkflow
  • addTenWorkflow
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • webhook route with invalid token
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • stepDirectCallWorkflow - calling step functions directly outside workflow context
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check endpoint (HTTP) - workflow and step endpoints respond to __health query parameter
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
🌍 Community Worlds (41 failed)

turso (41 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4404
✅ example4404
✅ express4404
✅ fastify4404
✅ hono4404
✅ nextjs-turbopack4701
❌ nextjs-webpack4611
✅ nitro4404
✅ nuxt4404
✅ sveltekit4404
✅ vite4404
❌ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4107
❌ express-stable0417
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4503
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4503
✅ redis-dev300
✅ redis4503
✅ starter-dev300
✅ turso-dev300
❌ turso4413
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4107
✅ e2e-local-postgres-nest-stable4107
✅ e2e-local-prod-nest-stable4107

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: failure
  • Local Prod: success
  • Local Postgres: success
  • Windows: success

Check the workflow run for details.

@github-actions

github-actionsBot commented Feb 9, 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🥇 Nitro0.031s (-4.3%)1.005s (~)0.974s101.00x
💻 LocalExpress0.032s (-7.5% 🟢)1.004s (~)0.972s101.04x
💻 LocalNext.js (Turbopack)0.042s1.005s0.963s101.37x
🌐 RedisNext.js (Turbopack)0.045s1.005s0.960s101.44x
🌐 MongoDBNext.js (Turbopack)0.085s1.007s0.922s102.76x
🐘 PostgresExpress0.141s (-65.3% 🟢)1.009s (-1.2%)0.869s104.55x
🐘 PostgresNitro0.477s (+115.5% 🔺)1.009s (~)0.532s1015.44x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.769s (-15.8% 🟢)2.450s (+3.2%)1.681s101.00x
▲ VercelNitro0.861s (-4.8%)2.524s (+4.5%)1.662s101.12x
▲ VercelNext.js (Turbopack)0.864s (-11.5% 🟢)2.436s (-12.4% 🟢)1.572s101.12x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.098s2.005s0.908s101.00x
🌐 RedisNext.js (Turbopack)1.100s2.006s0.906s101.00x
💻 LocalNitro1.103s (~)2.005s (~)0.902s101.00x
💻 LocalExpress1.106s (~)2.005s (~)0.899s101.01x
🌐 MongoDBNext.js (Turbopack)1.300s2.008s0.708s101.18x
🐘 PostgresNitro2.355s (-4.2%)3.014s (~)0.658s102.15x
🐘 PostgresExpress2.365s (+4.8%)3.014s (~)0.649s102.15x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.603s (-2.3%)3.828s (+7.1% 🔺)1.224s101.00x
▲ VercelNitro2.750s (+5.5% 🔺)4.114s (+8.0% 🔺)1.363s101.06x
▲ VercelNext.js (Turbopack)2.780s (+1.8%)4.144s (+1.6%)1.364s101.07x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.689s11.021s0.332s31.00x
💻 LocalNext.js (Turbopack)10.692s11.021s0.330s31.00x
💻 LocalNitro10.813s (~)11.022s (~)0.209s31.01x
💻 LocalExpress10.834s (~)11.021s (~)0.187s31.01x
🌐 MongoDBNext.js (Turbopack)12.230s13.018s0.788s31.14x
🐘 PostgresNitro20.230s (-0.6%)21.055s (~)0.825s21.89x
🐘 PostgresExpress20.399s (+1.5%)21.059s (~)0.659s21.91x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro19.605s (~)20.998s (-0.9%)1.392s21.00x
▲ VercelNext.js (Turbopack)19.738s (+1.2%)21.071s (+3.1%)1.333s21.01x
▲ VercelExpress19.770s (-0.6%)21.286s (~)1.516s21.01x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.886s27.050s0.164s31.00x
💻 LocalNext.js (Turbopack)27.115s28.051s0.936s31.01x
💻 LocalNitro27.425s (-0.7%)28.051s (~)0.625s31.02x
💻 LocalExpress27.512s (~)28.050s (~)0.539s31.02x
🌐 MongoDBNext.js (Turbopack)30.506s31.037s0.531s21.13x
🐘 PostgresExpress50.209s (~)51.134s (~)0.925s21.87x
🐘 PostgresNitro50.511s (~)51.122s (~)0.612s21.88x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)48.883s (-3.5%)50.465s (-3.6%)1.583s21.00x
▲ VercelNitro49.279s (+0.8%)50.435s (~)1.156s21.01x
▲ VercelExpress49.688s (+2.3%)51.403s (+2.5%)1.715s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.316s55.099s0.783s21.00x
💻 LocalNext.js (Turbopack)56.408s57.101s0.692s21.04x
💻 LocalNitro56.986s (-0.7%)57.097s (-1.7%)0.111s21.05x
💻 LocalExpress57.184s (~)58.100s (+0.9%)0.916s21.05x
🌐 MongoDBNext.js (Turbopack)61.153s62.072s0.919s21.13x
🐘 PostgresNitro100.152s (~)100.213s (-1.0%)0.061s11.84x
🐘 PostgresExpress100.375s (~)101.241s (~)0.866s11.85x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)103.197s (+1.9%)104.035s (+1.2%)0.838s11.00x
▲ VercelNitro104.722s (~)106.206s (~)1.484s11.01x
▲ VercelExpress105.039s (~)106.542s (~)1.503s11.02x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.250s2.006s0.756s151.00x
💻 LocalNext.js (Turbopack)1.376s2.005s0.629s151.10x
💻 LocalExpress1.398s (-1.1%)2.005s (~)0.606s151.12x
💻 LocalNitro1.409s (+1.1%)2.005s (~)0.597s151.13x
🌐 MongoDBNext.js (Turbopack)2.147s3.008s0.862s101.72x
🐘 PostgresNitro2.221s (-3.6%)3.013s (~)0.792s101.78x
🐘 PostgresExpress2.408s (+3.2%)3.013s (~)0.606s101.93x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.786s (-14.7% 🟢)3.894s (-13.7% 🟢)1.108s81.00x
▲ VercelNext.js (Turbopack)3.031s (+1.4%)4.096s (-3.1%)1.064s81.09x
▲ VercelNitro3.088s (-19.2% 🟢)4.395s (-23.9% 🟢)1.307s71.11x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.470s3.008s0.538s101.00x
🌐 RedisNext.js (Turbopack)2.503s3.007s0.505s101.01x
💻 LocalNitro2.520s (-3.6%)3.006s (~)0.486s101.02x
💻 LocalExpress2.558s (+0.9%)3.008s (~)0.450s101.04x
🌐 MongoDBNext.js (Turbopack)4.761s5.178s0.417s61.93x
🐘 PostgresNitro8.385s (-1.5%)8.780s (~)0.395s43.39x
🐘 PostgresExpress8.742s (-2.0%)9.280s (~)0.538s43.54x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.163s (~)4.567s (+2.5%)1.404s71.00x
▲ VercelNitro3.251s (-4.2%)4.518s (+1.3%)1.267s71.03x
▲ VercelExpress3.338s (+5.5% 🔺)4.301s (-1.4%)0.963s71.06x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.036s4.867s0.831s71.00x
💻 LocalNitro7.026s (-5.5% 🟢)7.765s (-3.2%)0.739s41.74x
💻 LocalNext.js (Turbopack)7.137s7.413s0.275s51.77x
💻 LocalExpress7.462s (+6.0% 🔺)8.024s (+3.3%)0.562s41.85x
🌐 MongoDBNext.js (Turbopack)9.919s10.351s0.432s32.46x
🐘 PostgresExpress46.535s (-4.7%)47.125s (-4.1%)0.590s111.53x
🐘 PostgresNitro49.744s (-1.8%)50.104s (-2.0%)0.360s112.32x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.268s (+50.6% 🔺)6.266s (+19.3% 🔺)0.998s61.00x
▲ VercelNitro5.712s (+51.9% 🔺)7.349s (+25.8% 🔺)1.637s51.08x
▲ VercelNext.js (Turbopack)7.729s (+99.2% 🔺)9.071s (+69.0% 🔺)1.341s41.47x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.277s2.006s0.729s151.00x
💻 LocalNitro1.421s (-1.2%)2.005s (~)0.584s151.11x
💻 LocalNext.js (Turbopack)1.429s2.005s0.576s151.12x
💻 LocalExpress1.444s (+2.3%)2.005s (~)0.561s151.13x
🐘 PostgresExpress2.046s (-6.8% 🟢)2.681s (~)0.636s121.60x
🐘 PostgresNitro2.059s (+1.7%)2.511s (+8.3% 🔺)0.452s121.61x
🌐 MongoDBNext.js (Turbopack)2.174s3.007s0.834s101.70x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.610s (-13.1% 🟢)3.680s (-19.6% 🟢)1.071s91.00x
▲ VercelExpress2.640s (-9.1% 🟢)3.770s (-5.0% 🟢)1.130s81.01x
▲ VercelNitro2.659s (-5.5% 🟢)4.225s (+5.2% 🔺)1.565s81.02x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.513s3.008s0.495s101.00x
💻 LocalNext.js (Turbopack)2.565s3.008s0.443s101.02x
💻 LocalNitro2.604s (-4.3%)3.007s (~)0.403s101.04x
💻 LocalExpress2.687s (+0.7%)3.007s (~)0.321s101.07x
🌐 MongoDBNext.js (Turbopack)4.667s5.175s0.509s61.86x
🐘 PostgresExpress11.920s (-6.4% 🟢)12.377s (-7.5% 🟢)0.457s34.74x
🐘 PostgresNitro12.031s (+5.6% 🔺)12.701s (+8.6% 🔺)0.669s34.79x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.904s (-2.5%)3.937s (-5.3% 🟢)1.033s81.00x
▲ VercelExpress2.911s (+2.6%)3.897s (-3.5%)0.986s81.00x
▲ VercelNitro2.973s (+1.6%)4.349s (-5.0% 🟢)1.375s71.02x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.095s4.868s0.773s71.00x
💻 LocalNext.js (Turbopack)7.295s7.514s0.219s41.78x
💻 LocalNitro7.487s (-6.4% 🟢)8.019s (-8.6% 🟢)0.533s41.83x
💻 LocalExpress7.907s (+3.8%)8.277s (+3.3%)0.370s41.93x
🌐 MongoDBNext.js (Turbopack)10.049s10.348s0.299s32.45x
🐘 PostgresExpress51.210s (-2.3%)52.130s (-1.9%)0.920s112.51x
🐘 PostgresNitro54.770s (+7.7% 🔺)55.119s (+7.8% 🔺)0.349s113.38x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.650s (+6.2% 🔺)4.753s (-8.2% 🟢)1.103s71.00x
▲ VercelExpress3.908s (+1.9%)5.251s (+2.6%)1.343s61.07x
▲ VercelNitro4.233s (+15.7% 🔺)5.440s (+10.9% 🔺)1.207s61.16x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.138s1.001s0.010s1.015s0.877s101.00x
🌐 RedisNext.js (Turbopack)0.157s1.000s0.001s1.007s0.850s101.14x
💻 LocalNitro0.168s (-4.0%)1.002s (~)0.010s (-12.5% 🟢)1.015s (~)0.847s101.22x
💻 LocalExpress0.174s (-1.5%)1.002s (~)0.010s (+6.3% 🔺)1.015s (~)0.841s101.27x
🌐 MongoDBNext.js (Turbopack)0.515s0.931s0.001s1.009s0.493s103.74x
🐘 PostgresNitro2.295s (-4.4%)2.739s (+3.9%)0.001s (-25.0% 🟢)3.013s (~)0.718s1016.66x
🐘 PostgresExpress2.477s (+14.3% 🔺)2.564s (-10.9% 🟢)0.001s (~)3.014s (~)0.538s1017.97x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.495s (-15.1% 🟢)3.275s (-11.7% 🟢)0.247s (+49.2% 🔺)4.250s (-10.9% 🟢)1.755s101.00x
▲ VercelNitro2.529s (-4.9%)3.291s (+6.9% 🔺)0.407s (+204.8% 🔺)4.536s (+13.0% 🔺)2.007s101.01x
▲ VercelExpress3.073s (+22.3% 🔺)3.474s (+16.5% 🔺)0.181s (-33.6% 🟢)4.418s (+10.3% 🔺)1.345s101.23x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)9/12
🐘 PostgresExpress6/12
▲ VercelNext.js (Turbopack)7/12
Fastest World by Framework

Winner determined by most benchmark wins

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

Worlds:

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

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds @workflow/ai/* entrypoints for additional official AI SDK providers using the existing 'use step' wrapper approach so model factory functions can cross workflow step boundaries.

Changes:

  • Added 12 new provider wrapper modules under packages/ai/src/providers/*.
  • Exposed new provider entrypoints via packages/ai/package.jsonexports and added corresponding optional dependencies.
  • Updated lockfile and added a changeset for a patch release of @workflow/ai.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 12 comments.

Show a summary per file
FileDescription
pnpm-lock.yamlAdds resolved optional dependencies for the new AI SDK provider packages (and their transitive deps).
packages/ai/package.jsonAdds exports entries for new provider subpath entrypoints and lists new provider SDKs as optional dependencies.
packages/ai/src/providers/amazon-bedrock.tsAdds step-compatible wrapper for Bedrock provider factory.
packages/ai/src/providers/azure.tsAdds step-compatible wrapper for Azure provider factory.
packages/ai/src/providers/cerebras.tsAdds step-compatible wrapper for Cerebras provider factory.
packages/ai/src/providers/cohere.tsAdds step-compatible wrapper for Cohere provider factory.
packages/ai/src/providers/deepinfra.tsAdds step-compatible wrapper for DeepInfra provider factory.
packages/ai/src/providers/deepseek.tsAdds step-compatible wrapper for DeepSeek provider factory.
packages/ai/src/providers/fireworks.tsAdds step-compatible wrapper for Fireworks provider factory.
packages/ai/src/providers/google-vertex.tsAdds step-compatible wrapper for Google Vertex provider factory.
packages/ai/src/providers/groq.tsAdds step-compatible wrapper for Groq provider factory.
packages/ai/src/providers/mistral.tsAdds step-compatible wrapper for Mistral provider factory.
packages/ai/src/providers/perplexity.tsAdds step-compatible wrapper for Perplexity provider factory.
packages/ai/src/providers/togetherai.tsAdds step-compatible wrapper for TogetherAI provider factory.
.changeset/add-ai-sdk-providers.mdDeclares a patch release noting the new provider wrappers.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpackages/ai/src/providers/mistral.ts
Comment threadpackages/ai/src/providers/amazon-bedrock.ts
Comment threadpackages/ai/src/providers/azure.ts
Comment threadpackages/ai/src/providers/cohere.ts
Comment threadpackages/ai/src/providers/fireworks.ts
Comment threadpackages/ai/src/providers/togetherai.ts
Comment threadpackages/ai/src/providers/cerebras.ts
Comment threadpackages/ai/src/providers/deepinfra.ts
Comment threadpackages/ai/src/providers/deepseek.ts
Comment threadpackages/ai/src/providers/google-vertex.ts
@pranaygp

pranaygp commented Feb 11, 2026

Copy link
Copy Markdown
ContributorAuthor

Closing: blocked on AI SDK v6 upgrade

After investigating the type compatibility issues flagged by Copilot's review, I'm closing this PR. The as CompatibleLanguageModel casts required by all 12 new providers aren't a good pattern to ship.

Root cause

All 12 new provider SDKs resolve to a different copy of @ai-sdk/provider than what @workflow/ai uses:

Provider SDKs@ai-sdk/provider version
@workflow/ai (direct dep)2.0.0
amazon-bedrock, google-vertex2.0.1
azure, cerebras, cohere, deepinfra, deepseek, fireworks, groq, mistral, perplexity, togetherai3.0.8

pnpm installs these as separate package instances, and TypeScript treats types from different copies as incompatible — even when structurally identical. This causes TS2742 ("inferred type cannot be named") on every new provider when you try to match the clean pattern used by the existing 5 providers (openai, anthropic, google, xai, gateway), which all happen to resolve to @ai-sdk/provider@2.0.0.

The only workaround is explicit return type annotations + as CompatibleLanguageModel casts, which hides the provider's concrete model type from consumers.

Why the existing providers work

openai, anthropic, google, xai, and gateway SDKs all depend on @ai-sdk/provider@2.0.0 — the same copy that @workflow/ai resolves to. TypeScript can name the types directly, so LanguageModelV2 satisfies CompatibleLanguageModel without any cast.

Path forward

Upgrading to AI SDK v6 exclusively (dropping v5 support) would unify the workspace on @ai-sdk/provider@3.x, eliminating the dual-version problem. However, that upgrade requires:

  1. Migrating consumer code (do-stream-step.ts, durable-agent.ts, stream-text-iterator.ts, tools-to-model-tools.ts) from V2 to V3 types
  2. Handling provider SDKs that don't have v3 releases yet (cerebras, deepinfra, deepseek, fireworks, togetherai)
  3. Handling provider SDKs whose v3 still depends on @ai-sdk/provider@2.0.1 (amazon-bedrock, google-vertex)

Once v6 is landed, adding these provider wrappers becomes trivial — just copy the existing openai/anthropic pattern with no casts needed.

cc @gr2m@lgrammel@TooTallNate — tagging for visibility since this is blocked on @ai-sdk/provider version alignment across provider packages.

@lgrammel

Copy link
Copy Markdown
Contributor

@pranaygp@gr2m all ai sdk 6 providers should use the v3 provider spec. the dependencies happen automatically:

https://github.com/vercel/ai/blob/main/packages/amazon-bedrock/package.json#L54

so I do not understand how you can have providers with older @ai-sdk/provider versions. you probably just need to upgrade them to their latest version?

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.

3 participants

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

Add provider wrappers for all official AI SDK providers - #986

Closed
pranaygp wants to merge 1 commit into
mainfrom
feat/add-ai-sdk-providers
Closed

Add provider wrappers for all official AI SDK providers#986
pranaygp wants to merge 1 commit into
mainfrom
feat/add-ai-sdk-providers

Conversation

@pranaygp

@pranaygppranaygp commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds step-boundary-compatible provider wrappers for 12 additional official AI SDK providers, matching the existing pattern used by openai, anthropic, google, xai, and gateway.

New providers:

  • Amazon Bedrock (@workflow/ai/amazon-bedrock)
  • Azure OpenAI (@workflow/ai/azure)
  • Cerebras (@workflow/ai/cerebras)
  • Cohere (@workflow/ai/cohere)
  • DeepInfra (@workflow/ai/deepinfra)
  • DeepSeek (@workflow/ai/deepseek)
  • Fireworks (@workflow/ai/fireworks)
  • Google Vertex AI (@workflow/ai/google-vertex)
  • Groq (@workflow/ai/groq)
  • Mistral (@workflow/ai/mistral)
  • Perplexity (@workflow/ai/perplexity)
  • TogetherAI (@workflow/ai/togetherai)

Each provider follows the same 'use step' wrapper pattern so that the model factory function survives step boundary serialization via the StepFunction serde mechanism. All provider SDK packages are added as optional dependencies.

Usage is identical to existing providers:

import{groq}from'@workflow/ai/groq';constagent=newDurableAgent({model: groq('llama-3.3-70b-versatile'),tools: { ... },});

Skipped providers:

  • @ai-sdk/huggingface — not a published package yet
  • @ai-sdk/openai-compatible — no default provider instance; requires custom configuration via createOpenAICompatible(). Users who need OpenAI-compatible providers can use the SDK package directly with a factory function.

Why some providers need as CompatibleLanguageModel casts

The 5 existing providers (openai, anthropic, google, xai, gateway) don't need casts because their SDK packages depend on @ai-sdk/provider@2.0.0 — the same copy that @workflow/ai resolves to. TypeScript sees identical types from the same package instance, so LanguageModelV2 satisfies CompatibleLanguageModel directly.

The 12 new providers depend on @ai-sdk/provider@3.0.8 (or @2.0.1 for amazon-bedrock/google-vertex), which pnpm resolves as a separate package instance. TypeScript treats types from different package copies as incompatible — even when they're structurally identical — causing TS2742 ("inferred type cannot be named") and TS2322 errors. The explicit return type annotation and as CompatibleLanguageModel cast is the only way to make these compile cleanly.

This is safe at runtime because both V2 and V3 models have the same structural doStream interface that @workflow/ai relies on.

Note: Upgrading to AI SDK v6 exclusively (dropping v5 support) was explored as a way to unify on @ai-sdk/provider@3.x across all packages. However, this requires migrating all consumer code (do-stream-step.ts, durable-agent.ts, etc.) from V2 to V3 types, and several provider SDKs still don't have v3 releases. That's a larger effort tracked separately.

Test plan

  • Verified build compiles with no new errors
  • Verified all 40 existing tests pass
  • Test with a user app that uses one of the new providers

🤖 Generated with Claude Code

…K providers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CopilotAI review requested due to automatic review settings February 9, 2026 22:11
@changeset-bot

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0a9f8c1

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

This PR includes changesets to release 1 package
NameType
@workflow/aiPatch

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

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

@vercel

vercelBot commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
❌ ▲ Vercel Production489138528
❌ 💻 Local Development3774162480
✅ 📦 Local Production418062480
✅ 🐘 Local Postgres418062480
✅ 🪟 Windows450348
❌ 🌍 Community Worlds106419156
✅ 📋 Other123021144
Total1976832572316

❌ Failed Tests

▲ Vercel Production (1 failed)

nextjs-webpack (1 failed):

  • sleepingWorkflow
💻 Local Development (41 failed)

express-stable (41 failed):

  • addTenWorkflow
  • addTenWorkflow
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • webhook route with invalid token
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • stepDirectCallWorkflow - calling step functions directly outside workflow context
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check endpoint (HTTP) - workflow and step endpoints respond to __health query parameter
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
🌍 Community Worlds (41 failed)

turso (41 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

❌ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4404
✅ example4404
✅ express4404
✅ fastify4404
✅ hono4404
✅ nextjs-turbopack4701
❌ nextjs-webpack4611
✅ nitro4404
✅ nuxt4404
✅ sveltekit4404
✅ vite4404
❌ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4107
❌ express-stable0417
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4107
✅ express-stable4107
✅ fastify-stable4107
✅ hono-stable4107
✅ nextjs-turbopack-stable4503
✅ nextjs-webpack-stable4503
✅ nitro-stable4107
✅ nuxt-stable4107
✅ sveltekit-stable4107
✅ vite-stable4107
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4503
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4503
✅ redis-dev300
✅ redis4503
✅ starter-dev300
✅ turso-dev300
❌ turso4413
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4107
✅ e2e-local-postgres-nest-stable4107
✅ e2e-local-prod-nest-stable4107

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: failure
  • Local Prod: success
  • Local Postgres: success
  • Windows: success

Check the workflow run for details.

@github-actions

github-actionsBot commented Feb 9, 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🥇 Nitro0.031s (-4.3%)1.005s (~)0.974s101.00x
💻 LocalExpress0.032s (-7.5% 🟢)1.004s (~)0.972s101.04x
💻 LocalNext.js (Turbopack)0.042s1.005s0.963s101.37x
🌐 RedisNext.js (Turbopack)0.045s1.005s0.960s101.44x
🌐 MongoDBNext.js (Turbopack)0.085s1.007s0.922s102.76x
🐘 PostgresExpress0.141s (-65.3% 🟢)1.009s (-1.2%)0.869s104.55x
🐘 PostgresNitro0.477s (+115.5% 🔺)1.009s (~)0.532s1015.44x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.769s (-15.8% 🟢)2.450s (+3.2%)1.681s101.00x
▲ VercelNitro0.861s (-4.8%)2.524s (+4.5%)1.662s101.12x
▲ VercelNext.js (Turbopack)0.864s (-11.5% 🟢)2.436s (-12.4% 🟢)1.572s101.12x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.098s2.005s0.908s101.00x
🌐 RedisNext.js (Turbopack)1.100s2.006s0.906s101.00x
💻 LocalNitro1.103s (~)2.005s (~)0.902s101.00x
💻 LocalExpress1.106s (~)2.005s (~)0.899s101.01x
🌐 MongoDBNext.js (Turbopack)1.300s2.008s0.708s101.18x
🐘 PostgresNitro2.355s (-4.2%)3.014s (~)0.658s102.15x
🐘 PostgresExpress2.365s (+4.8%)3.014s (~)0.649s102.15x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.603s (-2.3%)3.828s (+7.1% 🔺)1.224s101.00x
▲ VercelNitro2.750s (+5.5% 🔺)4.114s (+8.0% 🔺)1.363s101.06x
▲ VercelNext.js (Turbopack)2.780s (+1.8%)4.144s (+1.6%)1.364s101.07x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.689s11.021s0.332s31.00x
💻 LocalNext.js (Turbopack)10.692s11.021s0.330s31.00x
💻 LocalNitro10.813s (~)11.022s (~)0.209s31.01x
💻 LocalExpress10.834s (~)11.021s (~)0.187s31.01x
🌐 MongoDBNext.js (Turbopack)12.230s13.018s0.788s31.14x
🐘 PostgresNitro20.230s (-0.6%)21.055s (~)0.825s21.89x
🐘 PostgresExpress20.399s (+1.5%)21.059s (~)0.659s21.91x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro19.605s (~)20.998s (-0.9%)1.392s21.00x
▲ VercelNext.js (Turbopack)19.738s (+1.2%)21.071s (+3.1%)1.333s21.01x
▲ VercelExpress19.770s (-0.6%)21.286s (~)1.516s21.01x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)26.886s27.050s0.164s31.00x
💻 LocalNext.js (Turbopack)27.115s28.051s0.936s31.01x
💻 LocalNitro27.425s (-0.7%)28.051s (~)0.625s31.02x
💻 LocalExpress27.512s (~)28.050s (~)0.539s31.02x
🌐 MongoDBNext.js (Turbopack)30.506s31.037s0.531s21.13x
🐘 PostgresExpress50.209s (~)51.134s (~)0.925s21.87x
🐘 PostgresNitro50.511s (~)51.122s (~)0.612s21.88x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)48.883s (-3.5%)50.465s (-3.6%)1.583s21.00x
▲ VercelNitro49.279s (+0.8%)50.435s (~)1.156s21.01x
▲ VercelExpress49.688s (+2.3%)51.403s (+2.5%)1.715s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)54.316s55.099s0.783s21.00x
💻 LocalNext.js (Turbopack)56.408s57.101s0.692s21.04x
💻 LocalNitro56.986s (-0.7%)57.097s (-1.7%)0.111s21.05x
💻 LocalExpress57.184s (~)58.100s (+0.9%)0.916s21.05x
🌐 MongoDBNext.js (Turbopack)61.153s62.072s0.919s21.13x
🐘 PostgresNitro100.152s (~)100.213s (-1.0%)0.061s11.84x
🐘 PostgresExpress100.375s (~)101.241s (~)0.866s11.85x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)103.197s (+1.9%)104.035s (+1.2%)0.838s11.00x
▲ VercelNitro104.722s (~)106.206s (~)1.484s11.01x
▲ VercelExpress105.039s (~)106.542s (~)1.503s11.02x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.250s2.006s0.756s151.00x
💻 LocalNext.js (Turbopack)1.376s2.005s0.629s151.10x
💻 LocalExpress1.398s (-1.1%)2.005s (~)0.606s151.12x
💻 LocalNitro1.409s (+1.1%)2.005s (~)0.597s151.13x
🌐 MongoDBNext.js (Turbopack)2.147s3.008s0.862s101.72x
🐘 PostgresNitro2.221s (-3.6%)3.013s (~)0.792s101.78x
🐘 PostgresExpress2.408s (+3.2%)3.013s (~)0.606s101.93x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.786s (-14.7% 🟢)3.894s (-13.7% 🟢)1.108s81.00x
▲ VercelNext.js (Turbopack)3.031s (+1.4%)4.096s (-3.1%)1.064s81.09x
▲ VercelNitro3.088s (-19.2% 🟢)4.395s (-23.9% 🟢)1.307s71.11x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.470s3.008s0.538s101.00x
🌐 RedisNext.js (Turbopack)2.503s3.007s0.505s101.01x
💻 LocalNitro2.520s (-3.6%)3.006s (~)0.486s101.02x
💻 LocalExpress2.558s (+0.9%)3.008s (~)0.450s101.04x
🌐 MongoDBNext.js (Turbopack)4.761s5.178s0.417s61.93x
🐘 PostgresNitro8.385s (-1.5%)8.780s (~)0.395s43.39x
🐘 PostgresExpress8.742s (-2.0%)9.280s (~)0.538s43.54x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.163s (~)4.567s (+2.5%)1.404s71.00x
▲ VercelNitro3.251s (-4.2%)4.518s (+1.3%)1.267s71.03x
▲ VercelExpress3.338s (+5.5% 🔺)4.301s (-1.4%)0.963s71.06x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.036s4.867s0.831s71.00x
💻 LocalNitro7.026s (-5.5% 🟢)7.765s (-3.2%)0.739s41.74x
💻 LocalNext.js (Turbopack)7.137s7.413s0.275s51.77x
💻 LocalExpress7.462s (+6.0% 🔺)8.024s (+3.3%)0.562s41.85x
🌐 MongoDBNext.js (Turbopack)9.919s10.351s0.432s32.46x
🐘 PostgresExpress46.535s (-4.7%)47.125s (-4.1%)0.590s111.53x
🐘 PostgresNitro49.744s (-1.8%)50.104s (-2.0%)0.360s112.32x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.268s (+50.6% 🔺)6.266s (+19.3% 🔺)0.998s61.00x
▲ VercelNitro5.712s (+51.9% 🔺)7.349s (+25.8% 🔺)1.637s51.08x
▲ VercelNext.js (Turbopack)7.729s (+99.2% 🔺)9.071s (+69.0% 🔺)1.341s41.47x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.277s2.006s0.729s151.00x
💻 LocalNitro1.421s (-1.2%)2.005s (~)0.584s151.11x
💻 LocalNext.js (Turbopack)1.429s2.005s0.576s151.12x
💻 LocalExpress1.444s (+2.3%)2.005s (~)0.561s151.13x
🐘 PostgresExpress2.046s (-6.8% 🟢)2.681s (~)0.636s121.60x
🐘 PostgresNitro2.059s (+1.7%)2.511s (+8.3% 🔺)0.452s121.61x
🌐 MongoDBNext.js (Turbopack)2.174s3.007s0.834s101.70x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.610s (-13.1% 🟢)3.680s (-19.6% 🟢)1.071s91.00x
▲ VercelExpress2.640s (-9.1% 🟢)3.770s (-5.0% 🟢)1.130s81.01x
▲ VercelNitro2.659s (-5.5% 🟢)4.225s (+5.2% 🔺)1.565s81.02x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)2.513s3.008s0.495s101.00x
💻 LocalNext.js (Turbopack)2.565s3.008s0.443s101.02x
💻 LocalNitro2.604s (-4.3%)3.007s (~)0.403s101.04x
💻 LocalExpress2.687s (+0.7%)3.007s (~)0.321s101.07x
🌐 MongoDBNext.js (Turbopack)4.667s5.175s0.509s61.86x
🐘 PostgresExpress11.920s (-6.4% 🟢)12.377s (-7.5% 🟢)0.457s34.74x
🐘 PostgresNitro12.031s (+5.6% 🔺)12.701s (+8.6% 🔺)0.669s34.79x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.904s (-2.5%)3.937s (-5.3% 🟢)1.033s81.00x
▲ VercelExpress2.911s (+2.6%)3.897s (-3.5%)0.986s81.00x
▲ VercelNitro2.973s (+1.6%)4.349s (-5.0% 🟢)1.375s71.02x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)4.095s4.868s0.773s71.00x
💻 LocalNext.js (Turbopack)7.295s7.514s0.219s41.78x
💻 LocalNitro7.487s (-6.4% 🟢)8.019s (-8.6% 🟢)0.533s41.83x
💻 LocalExpress7.907s (+3.8%)8.277s (+3.3%)0.370s41.93x
🌐 MongoDBNext.js (Turbopack)10.049s10.348s0.299s32.45x
🐘 PostgresExpress51.210s (-2.3%)52.130s (-1.9%)0.920s112.51x
🐘 PostgresNitro54.770s (+7.7% 🔺)55.119s (+7.8% 🔺)0.349s113.38x
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.650s (+6.2% 🔺)4.753s (-8.2% 🟢)1.103s71.00x
▲ VercelExpress3.908s (+1.9%)5.251s (+2.6%)1.343s61.07x
▲ VercelNitro4.233s (+15.7% 🔺)5.440s (+10.9% 🔺)1.207s61.16x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.138s1.001s0.010s1.015s0.877s101.00x
🌐 RedisNext.js (Turbopack)0.157s1.000s0.001s1.007s0.850s101.14x
💻 LocalNitro0.168s (-4.0%)1.002s (~)0.010s (-12.5% 🟢)1.015s (~)0.847s101.22x
💻 LocalExpress0.174s (-1.5%)1.002s (~)0.010s (+6.3% 🔺)1.015s (~)0.841s101.27x
🌐 MongoDBNext.js (Turbopack)0.515s0.931s0.001s1.009s0.493s103.74x
🐘 PostgresNitro2.295s (-4.4%)2.739s (+3.9%)0.001s (-25.0% 🟢)3.013s (~)0.718s1016.66x
🐘 PostgresExpress2.477s (+14.3% 🔺)2.564s (-10.9% 🟢)0.001s (~)3.014s (~)0.538s1017.97x
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.495s (-15.1% 🟢)3.275s (-11.7% 🟢)0.247s (+49.2% 🔺)4.250s (-10.9% 🟢)1.755s101.00x
▲ VercelNitro2.529s (-4.9%)3.291s (+6.9% 🔺)0.407s (+204.8% 🔺)4.536s (+13.0% 🔺)2.007s101.01x
▲ VercelExpress3.073s (+22.3% 🔺)3.474s (+16.5% 🔺)0.181s (-33.6% 🟢)4.418s (+10.3% 🔺)1.345s101.23x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)9/12
🐘 PostgresExpress6/12
▲ VercelNext.js (Turbopack)7/12
Fastest World by Framework

Winner determined by most benchmark wins

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

Worlds:

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

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds @workflow/ai/* entrypoints for additional official AI SDK providers using the existing 'use step' wrapper approach so model factory functions can cross workflow step boundaries.

Changes:

  • Added 12 new provider wrapper modules under packages/ai/src/providers/*.
  • Exposed new provider entrypoints via packages/ai/package.jsonexports and added corresponding optional dependencies.
  • Updated lockfile and added a changeset for a patch release of @workflow/ai.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 12 comments.

Show a summary per file
FileDescription
pnpm-lock.yamlAdds resolved optional dependencies for the new AI SDK provider packages (and their transitive deps).
packages/ai/package.jsonAdds exports entries for new provider subpath entrypoints and lists new provider SDKs as optional dependencies.
packages/ai/src/providers/amazon-bedrock.tsAdds step-compatible wrapper for Bedrock provider factory.
packages/ai/src/providers/azure.tsAdds step-compatible wrapper for Azure provider factory.
packages/ai/src/providers/cerebras.tsAdds step-compatible wrapper for Cerebras provider factory.
packages/ai/src/providers/cohere.tsAdds step-compatible wrapper for Cohere provider factory.
packages/ai/src/providers/deepinfra.tsAdds step-compatible wrapper for DeepInfra provider factory.
packages/ai/src/providers/deepseek.tsAdds step-compatible wrapper for DeepSeek provider factory.
packages/ai/src/providers/fireworks.tsAdds step-compatible wrapper for Fireworks provider factory.
packages/ai/src/providers/google-vertex.tsAdds step-compatible wrapper for Google Vertex provider factory.
packages/ai/src/providers/groq.tsAdds step-compatible wrapper for Groq provider factory.
packages/ai/src/providers/mistral.tsAdds step-compatible wrapper for Mistral provider factory.
packages/ai/src/providers/perplexity.tsAdds step-compatible wrapper for Perplexity provider factory.
packages/ai/src/providers/togetherai.tsAdds step-compatible wrapper for TogetherAI provider factory.
.changeset/add-ai-sdk-providers.mdDeclares a patch release noting the new provider wrappers.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpackages/ai/src/providers/mistral.ts
Comment threadpackages/ai/src/providers/amazon-bedrock.ts
Comment threadpackages/ai/src/providers/azure.ts
Comment threadpackages/ai/src/providers/cohere.ts
Comment threadpackages/ai/src/providers/fireworks.ts
Comment threadpackages/ai/src/providers/togetherai.ts
Comment threadpackages/ai/src/providers/cerebras.ts
Comment threadpackages/ai/src/providers/deepinfra.ts
Comment threadpackages/ai/src/providers/deepseek.ts
Comment threadpackages/ai/src/providers/google-vertex.ts
@pranaygp

pranaygp commented Feb 11, 2026

Copy link
Copy Markdown
ContributorAuthor

Closing: blocked on AI SDK v6 upgrade

After investigating the type compatibility issues flagged by Copilot's review, I'm closing this PR. The as CompatibleLanguageModel casts required by all 12 new providers aren't a good pattern to ship.

Root cause

All 12 new provider SDKs resolve to a different copy of @ai-sdk/provider than what @workflow/ai uses:

Provider SDKs@ai-sdk/provider version
@workflow/ai (direct dep)2.0.0
amazon-bedrock, google-vertex2.0.1
azure, cerebras, cohere, deepinfra, deepseek, fireworks, groq, mistral, perplexity, togetherai3.0.8

pnpm installs these as separate package instances, and TypeScript treats types from different copies as incompatible — even when structurally identical. This causes TS2742 ("inferred type cannot be named") on every new provider when you try to match the clean pattern used by the existing 5 providers (openai, anthropic, google, xai, gateway), which all happen to resolve to @ai-sdk/provider@2.0.0.

The only workaround is explicit return type annotations + as CompatibleLanguageModel casts, which hides the provider's concrete model type from consumers.

Why the existing providers work

openai, anthropic, google, xai, and gateway SDKs all depend on @ai-sdk/provider@2.0.0 — the same copy that @workflow/ai resolves to. TypeScript can name the types directly, so LanguageModelV2 satisfies CompatibleLanguageModel without any cast.

Path forward

Upgrading to AI SDK v6 exclusively (dropping v5 support) would unify the workspace on @ai-sdk/provider@3.x, eliminating the dual-version problem. However, that upgrade requires:

  1. Migrating consumer code (do-stream-step.ts, durable-agent.ts, stream-text-iterator.ts, tools-to-model-tools.ts) from V2 to V3 types
  2. Handling provider SDKs that don't have v3 releases yet (cerebras, deepinfra, deepseek, fireworks, togetherai)
  3. Handling provider SDKs whose v3 still depends on @ai-sdk/provider@2.0.1 (amazon-bedrock, google-vertex)

Once v6 is landed, adding these provider wrappers becomes trivial — just copy the existing openai/anthropic pattern with no casts needed.

cc @gr2m@lgrammel@TooTallNate — tagging for visibility since this is blocked on @ai-sdk/provider version alignment across provider packages.

@lgrammel

Copy link
Copy Markdown
Contributor

@pranaygp@gr2m all ai sdk 6 providers should use the v3 provider spec. the dependencies happen automatically:

https://github.com/vercel/ai/blob/main/packages/amazon-bedrock/package.json#L54

so I do not understand how you can have providers with older @ai-sdk/provider versions. you probably just need to upgrade them to their latest version?

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.

3 participants

@pranaygp@lgrammel