add-function-examples

Guide for adding new AI function examples, for testing specific features against the actual provider APIs.

Install
npx skills add 'https://github.com/vercel/ai/tree/main/skills/add-function-examples'
Download bundle ↓
main · 8b92ba9Scanned 2026-09-15

Contributors

GitHub-linked commit authors for this SKILL.md at the saved revision. Co-authors and history before file renames are not included.

File history ↗

SKILL.md

SKILL.mdBrowse 1 file
View on GitHub

Adding Function Examples

Review the changes in the current branch, and identify new or modified features or bug fixes that would benefit from having an example in the examples/ai-functions directory. These examples are used for testing specific features against the actual provider APIs, and can also serve as documentation for users.

Determine for which kind of model and top-level function the example should be added. For a language model, the example should be added in two variants, one for generateText and one for streamText. For any other models kinds, add the example for the relevant top-level function (e.g. generateImage, generateSpeech).

After creating the example, run pnpm type-check:full; fix any errors encountered.

Discovery context

Discovered by repository scan. No exact path reference found in the snapshot’s root AGENTS.md.