add-function-examples
Guide for adding new AI function examples, for testing specific features against the actual provider APIs.
Add new or remove obsolete model IDs for existing AI SDK providers. Use when adding a model to a provider, removing an obsolete model, or processing a list of model changes from an issue. Triggers on "add model", "remove model", "new model ID", "obsolete model", "update model
$ npx -y skills add vercel/ai --skill update-provider-models --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/update-provider-modelsContext preview
The summary Claude sees to decide when to auto-load this skill.
Add new or remove obsolete model IDs for existing AI SDK providers. Use when adding a model to a provider, removing an obsolete model, or processing a list of model changes from an issue. Triggers on "add model", "remove model", "new model ID", "obsolete model", "update model
name: update-provider-models description: Add new or remove obsolete model IDs for existing AI SDK providers. Use when adding a model to a provider, removing an obsolete model, or processing a list of model changes from an issue. Triggers on "add model", "remove model", "new model ID", "obsolete model", "update model IDs". metadata: internal: true
This skill covers adding new model IDs and removing obsolete ones across the AI SDK codebase. Each workflow uses search to discover all locations that need changes.
You may be asked to add or remove a single model ID, or to process a list of multiple model ID changes from an issue. For each model ID, follow the appropriate workflow:
<adding-new-model>
Determine:
Search for a similar existing model from the same provider (e.g. a lower version, or the preview version being replaced) across `packages/`, `content/`, and `examples/`. This reveals all locations that need updates.
# Search quoted occurrences to find all reference locations grep -r "'<similar-model-id>'" packages/ content/ examples/ --include='*.ts' --include='*.mdx' --include='*.md' grep -r '"<similar-model-id>"' packages/ content/ examples/ --include='*.ts' --include='*.mdx' --include='*.md'
For each relevant `packages` file found, add the new model ID to the type union (and const arrays if present), respecting existing sort order.
Examples of common locations for model ID type definitions:
This is NOT an exhaustive list — the search in Step 2 may reveal other files with model ID references that need updating as well.
**Never** replace a model ID here. Only add the new model ID. Replacing references to an older or preview model ID is only relevant in documentation and examples.
Example type union addition:
export type SomeModelId =
| 'existing-model-a'
| 'new-model-id' // ← add in sorted position
| 'existing-model-b'
| (string & {});Example const array addition:
export const reasoningModelIds = [ 'existing-model-a', 'new-model-id', // ← add in sorted position 'existing-model-b', ] as const;
For each `.mdx` file found in `content/`, add or update entries:
If you found the similar model ID referenced in a specific package's `README.md` file, update the model ID in those code examples as well.
**If the new model replaces an older one**: Find existing examples using the old model and update them to use the new model ID.
**If purely new with no predecessor**: Create new example files, one file per top-level function that is relevant for the new model (e.g. `generateText`, `streamText`, `generateImage`). For example, if it's a new language model, you would create files like:
Or if it's a new image model, you might create:
The AI Toolkit for TypeScript. From the creators of Next.js, the AI SDK is a free open-source library for building AI-powered applications and agents
Repo: vercel/ai
Guide for adding new AI function examples, for testing specific features against the actual provider APIs.
Guide for adding new AI SDK harness packages. Use when creating a new @ai-sdk/harness-<name> package that adapts a coding-agent runtime to HarnessV1.
Guide for adding first-party AI provider packages to the AI SDK. Use when creating a provider package under packages/ to integrate an external AI service.
Create and maintain Architecture Decision Records (ADRs) optimized for agentic coding workflows. Use when you need to propose, write, update, accept/reject,…
Capture API response test fixture.
Develop examples for AI SDK functions. Use when creating, running, or modifying examples under examples/ai-functions/src to validate provider support,…