e2e-vercel-ai-sdk

Runs Vercel AI SDK end-to-end tests against local or production OpenRouter environments.

7|12|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/OpenRouterTeam/docs --skill e2e-vercel-ai-sdk-openrouterteam
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: e2e-vercel-ai-sdk
Source: https://github.com/OpenRouterTeam/docs/tree/main/.agents/skills/e2e-vercel-ai-sdk
Command: npx skills add https://github.com/OpenRouterTeam/docs --skill e2e-vercel-ai-sdk-openrouterteam

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Running end-to-end tests for the Vercel AI SDK integration requires juggling Infisical secrets, environment variables, and choosing between a local stack and production, which is error-prone without clear guidance. ## Core Features & Use Cases - Dual Environment Testing: Run tests against production OpenRouter or a local development stack with the correct environment overrides. - Secrets Management: Authenticate with Infisical universal auth to inject the required API keys and test scopes. - LLM Flakiness Guidance: Diagnose failures caused by non-deterministic model behavior, such as models skipping tool calls. - Use Case: A developer modifies the Vercel AI SDK integration and needs to verify tool-calling behavior against production before merging, using a production API key and the correct test invocation. ## Quick Start Run the Vercel AI SDK e2e test for a specific test directory against production using my Infisical credentials and OpenRouter API key.

Frequently Asked Questions about e2e-vercel-ai-sdk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Vercel AI SDK e2e tests against production?▼

Export an Infisical token via universal auth, then run bun run test:e2e from tests/e2e with OPENROUTER_API_BASE set to https://openrouter.ai and OPENROUTER_API_KEY set to your production key, pointing at the specific test file.

How do I run e2e tests against a local OpenRouter stack?▼

Start the local development environment first, then run bun run test:e2e from the tests/e2e directory. OPENROUTER_API_BASE defaults to http://localhost:8787; adjust it if Tilt reports a different API port.

Why does my tool-calling test fail with expected 0 to be greater than 0?▼

This usually means the LLM responded with text instead of invoking a tool, not a code bug. Reasoning models like O4 Mini are prone to this; Claude models tend to be more consistent for tool-calling tests.

Why does Infisical fail with 403 errors when using --recursive?▼

Using --recursive with --path="/" can fail due to cross-environment secret references, such as dev secrets referencing prod. Use a specific path like --path="/tests/e2e" instead.

Does tests/e2e/.env.local override my shell environment variables?▼

Yes, tests/e2e/.env.local overrides shell values, so check it before switching between local and production targets to avoid accidentally hitting the wrong environment.