$npx -y skills add vercel/ai --skill update-provider-modelsAdd 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
| 1 | ## Update Provider Model IDs |
| 2 | |
| 3 | 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. |
| 4 | |
| 5 | 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: |
| 6 | |
| 7 | - If a new model ID is being added, follow the `<adding-new-model>` workflow. |
| 8 | - If an obsolete model ID is being removed, follow the `<removing-obsolete-model>` workflow. |
| 9 | |
| 10 | ## Critical Rules |
| 11 | |
| 12 | - **Exact matching**: Model IDs are often substrings of others (e.g. `grok-3` vs `grok-3-mini`). Always verify each search result is the exact model, not a substring match. |
| 13 | - **Respect sort order**: When inserting into any list (type unions, table rows, arrays), observe the existing order and place the new entry accordingly. |
| 14 | - **File naming for examples**: Use kebab-case with hyphens replacing dots (e.g. `gpt-5.4-codex` → `gpt-5-4-codex.ts`). |
| 15 | - **Sequential processing**: When handling multiple models, complete the full workflow for one model before starting the next. |
| 16 | - **Affected providers**: New model IDs always need to be added to the primary provider package and the AI Gateway. There may be additional affected packages (e.g. Bedrock, Vertex, OpenAI-compatible) if the model is available there or referenced in tests/docs. |
| 17 | - **Never make unrelated changes**: Only update model IDs and related references. Don't modify any other code, text, or formatting in the files you edit. |
| 18 | - **Never modify `CHANGELOG.md` files of `packages/codemod`**: Changelog files are historical records, codemods are migration scripts. Do not edit either when updating model IDs. |
| 19 | |
| 20 | <adding-new-model> |
| 21 | |
| 22 | ## Workflow for Adding a New Model ID |
| 23 | |
| 24 | ### Step 1: Identify Scope |
| 25 | |
| 26 | Determine: |
| 27 | |
| 28 | - Provider name (e.g. `anthropic`, `openai`, `google`, `xai`) |
| 29 | - Exact model ID string (e.g. `claude-haiku-4-5-20260218`, `gemini-3.1-pro`, `gpt-5.4-codex`) |
| 30 | - Model type: chat, embedding, image, etc. |
| 31 | - Whether this is a new version of an existing older model, or even the stable version of an existing preview or experimental model |
| 32 | - Whether any provider packages other than the primary one and the AI Gateway need to be updated (e.g. Bedrock, Vertex, OpenAI-compatible) |
| 33 | - If a similar model ID is listed in one of those other provider packages, the new model ID should likely be added there as well. Check the provider's documentation for clues on availability. |
| 34 | |
| 35 | ### Step 2: Find Where Similar Models Are Referenced |
| 36 | |
| 37 | 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. |
| 38 | |
| 39 | ```bash |
| 40 | # Search quoted occurrences to find all reference locations |
| 41 | grep -r "'<similar-model-id>'" packages/ content/ examples/ --include='*.ts' --include='*.mdx' --include='*.md' |
| 42 | grep -r '"<similar-model-id>"' packages/ content/ examples/ --include='*.ts' --include='*.mdx' --include='*.md' |
| 43 | ``` |
| 44 | |
| 45 | ### Step 3: Update Type Definitions |
| 46 | |
| 47 | For each relevant `packages` file found, add the new model ID to the type union (and const arrays if present), respecting existing sort order. |
| 48 | |
| 49 | Examples of common locations for model ID type definitions: |
| 50 | |
| 51 | - `packages/<provider>/src/*-options.ts` — the primary provider package |
| 52 | - `packages/gateway/src/gateway-language-model-settings.ts` — the AI Gateway package |
| 53 | - `packages/amazon-bedrock/src/**/*-options.ts` — if the model is available on Amazon Bedrock |
| 54 | - `packages/google-vertex/src/*-options.ts` — if the model is available on Google Vertex |
| 55 | |
| 56 | This is NOT an exhaustive list — the search in Step 2 may reveal other files with model ID references that need updating as well. |
| 57 | |
| 58 | **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. |
| 59 | |
| 60 | Example type union addition: |
| 61 | |
| 62 | ```typescript |
| 63 | export type SomeModelId = |
| 64 | | 'existing-model-a' |
| 65 | | 'new-model-id' // ← add in sorted position |
| 66 | | 'existing-model-b' |
| 67 | | (string & {}); |
| 68 | ``` |
| 69 | |
| 70 | Example const array addition: |
| 71 | |
| 72 | ```typescript |
| 73 | export const reasoningModelIds = [ |
| 74 | 'existing-model-a', |
| 75 | 'new-model-id', // ← add in sorted position |
| 76 | 'existing-model-b', |
| 77 | ] as const; |
| 78 | ``` |
| 79 | |
| 80 | ### Step 4: Update Documentation |
| 81 | |
| 82 | For each `.mdx` file found in `content/`, add or update entries: |
| 83 | |
| 84 | - **Capability tables**: Add a row for the new model in the correct position with the appropriate capability checks (`<Check />` or `<Cross />`). |
| 85 | - **Inline code examples**: If replacing a preview/older model as the recommended |