
Description
Guide for adding new AI function examples, for testing specific features against the actual provider APIs.
SKILL.md
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.
More skills from the ai repository
View all 12 skillsadd-harness-package
add AI SDK harness packages
Jun 18AgentsAI SDKHarnessSDK +1add-provider-package
add new provider packages to AI SDK
Apr 6AI SDKAPI DevelopmentVerceladr-skill
create and maintain architecture decision records
Apr 6ADRArchitectureDocumentationEngineeringai-sdk
build AI features with Vercel AI SDK
Apr 6AgentsAI SDKLLMVercelcapture-api-response-test-fixture
capture API response test fixtures
Apr 6API DevelopmentTestingVerceldevelop-ai-functions-example
develop AI SDK function examples
Apr 6AI SDKTestingVercel
More from Vercel
View publishernext-cache-components-adoption
enable and migrate to Next.js Cache Components
next.js
Jul 17CachingFrontendMigrationNext.js +1next-cache-components-optimizer
optimize Next.js cache components
next.js
May 27CachingFrontendNext.jsPerformance +1next-dev-loop
verify Next.js runtime behavior
next.js
May 22DebuggingFrontendLocal DevelopmentNext.js +2next-partial-prefetching-adoption
adopt Partial Prefetching in Next.js apps
next.js
Jul 17FrontendNext.jsPerformanceVercelturborepo
manage monorepos with Turborepo
turborepo
Jul 21CI/CDPerformanceTurborepo