You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Share the OpenRouter client setup across AI e2e test apps #25175
node-mastra now has one shared src/mastra/openrouter.ts for all its scenarios. Do the same in the other apps, so that each app creates its OpenRouter client in one place. Each e2e app is a separate package, so the scope is one helper per app, unless a shared helper in @sentry-internal/test-utils is a good fit. The Cloudflare apps read the key from env per request, so a shared helper must take the key as an argument.
Just tried to do this but having one shared helper has the problem that think uses AI SDK v6, which needs Openrouter v2 while we use v3 for the other providers. So we'd basically have to add an argument to pass the createOpenRouter implementation that the respective app uses. Given that I'd say let's just keep it as is given that this is just two lines of code anyways and probably doesn't even warrant a function in the first place.
Activity
linear-code commentedon Oct 8, 2026
JS-3894
nicohrubec commentedon Oct 9, 2026
Just tried to do this but having one shared helper has the problem that think uses AI SDK v6, which needs Openrouter v2 while we use v3 for the other providers. So we'd basically have to add an argument to pass the
createOpenRouterimplementation that the respective app uses. Given that I'd say let's just keep it as is given that this is just two lines of code anyways and probably doesn't even warrant a function in the first place.