
Capture Api Response Test Fixture
- 1.3k installs
- 26k repo stars
- Updated August 5, 2026
- vercel/ai
capture-api-response-test-fixture provides documented workflows for Capture API response test fixture.
About
The capture-api-response-test-fixture skill capture API response test fixture API Response Test Fixtures For provider response parsing tests we aim at storing test fixtures with the true responses from the providers unless they are too large in which case some cutting that does not change semantics is advised The fixtures are stored in a __fixtures__ subfolder e g packages openai src responses __fixtures__ See the file names in packages openai src responses __fixtures__ for naming conventions and packages openai src responses openai-responses-language-model test ts for how to set up test helpers You can use our examples under examples ai-functions to generate test fixtures generateText doGenerate testing For generateText log the raw response output to the console and copy it into a new test fixture ts import openai from ai-sdk openai import generateText from ai import run from lib run run async const result await generateText model openai gpt-5-nano prompt Invent a new holiday and describe its traditions console log JSON stringify result response body null 2 streamText doStream testing For streamText
- The fixtures are stored in a `__fixtures__` subfolder, e.g.
- `packages/openai/src/responses/__fixtures__`.
- You can use our examples under `/examples/ai-functions` to generate test fixtures.
- #### generateText (doGenerate testing) For `generateText`, log the raw response output to the console and copy it into a
- Run the script from the `/example/ai-functions` folder via `pnpm tsx src/stream-text/script-name.ts`.
Capture Api Response Test Fixture by the numbers
- 1,315 all-time installs (skills.sh)
- +55 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #234 of 2,715 Automation & Workflows skills by installs in the Skillselion catalog
- Security screen: LOW risk (skills.sh audit)
- Data as of Aug 5, 2026 (Skillselion catalog sync)
capture-api-response-test-fixture capabilities & compatibility
- Capabilities
- the fixtures are stored in a `__fixtures__` subf · `packages/openai/src/responses/__fixtures__`. · you can use our examples under `/examples/ai fun · #### generatetext (dogenerate testing) for `gene · run the script from the `/example/ai functions`
- Use cases
- documentation
What capture-api-response-test-fixture says it does
The fixtures are stored in a `__fixtures__` subfolder, e.g.
`packages/openai/src/responses/__fixtures__`.
npx skills add https://github.com/vercel/ai --skill capture-api-response-test-fixtureAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1.3k |
|---|---|
| repo stars | ★ 26k |
| Security audit | 3 / 3 scanners passed |
| Last updated | August 5, 2026 |
| Repository | vercel/ai ↗ |
How do I use capture-api-response-test-fixture for the task described in its SKILL.md triggers?
Capture API response test fixture.
Who is it for?
Teams invoking capture-api-response-test-fixture when the user request matches documented triggers and prerequisites.
Skip if: Skip when cached docs are missing, the request is a negative trigger, or another sibling skill owns the workflow.
When should I use this skill?
Capture API response test fixture.
What you get
Step-by-step guidance grounded in capture-api-response-test-fixture documentation and reference files.
- JSON fixture files
- Provider parsing test coverage
Files
API Response Test Fixtures
For provider response parsing tests, we aim at storing test fixtures with the true responses from the providers (unless they are too large in which case some cutting that does not change semantics is advised).
The fixtures are stored in a __fixtures__ subfolder, e.g. packages/openai/src/responses/__fixtures__. See the file names in packages/openai/src/responses/__fixtures__ for naming conventions and packages/openai/src/responses/openai-responses-language-model.test.ts for how to set up test helpers.
You can use our examples under /examples/ai-functions to generate test fixtures.
generateText (doGenerate testing)
For generateText, log the raw response output to the console and copy it into a new test fixture.
import { openai } from '@ai-sdk/openai';
import { generateText } from 'ai';
import { run } from '../lib/run';
run(async () => {
const result = await generateText({
model: openai('gpt-5-nano'),
prompt: 'Invent a new holiday and describe its traditions.',
});
console.log(JSON.stringify(result.response.body, null, 2));
});streamText (doStream testing)
For streamText, you need to set includeRawChunks to true and use the special saveRawChunks helper. Run the script from the /example/ai-functions folder via pnpm tsx src/stream-text/script-name.ts. The result is then stored in the /examples/ai-functions/output folder. You can copy it to your fixtures folder and rename it.
import { openai } from '@ai-sdk/openai';
import { streamText } from 'ai';
import { run } from '../lib/run';
import { saveRawChunks } from '../lib/save-raw-chunks';
run(async () => {
const result = streamText({
model: openai('gpt-5-nano'),
prompt: 'Invent a new holiday and describe its traditions.',
includeRawChunks: true,
});
await saveRawChunks({ result, filename: 'openai-gpt-5-nano' });
});Related skills
FAQ
What does capture-api-response-test-fixture do?
Capture API response test fixture.
When should I use capture-api-response-test-fixture?
Capture API response test fixture.
What are common prerequisites?
--- name: capture-api-response-test-fixture description: Capture API response test fixture.
Is Capture Api Response Test Fixture safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.