---
name: update-ai-models
description: Update AI model and provider settings in one or more repositories from one AI Stack Registry catalog fetch. Use when a developer asks to adopt a named model, check existing model configuration, or apply the same model update across several repositories with Codex or Claude Code.
---

# Update AI models

Use one catalog response for the whole update. Change only the model and provider settings the developer requested.

## Set the scope

- Use the target model named by the developer. Ask for it when no target is clear.
- Use only the repositories in the request.
- Read each repository's instructions before inspecting or editing it. Follow `AGENTS.md`, `CLAUDE.md`, and narrower instruction files.
- Preserve unrelated work already in each repository.

## Fetch the catalog once

- Fetch `https://aistackregistry.com/index.json` once before the repository loop.
- Save the response as one local file. Reuse those exact bytes for every repository in this update.
- Do not fetch the catalog again for another repository.
- Never call a model provider API.
- Never read an API key or token. Treat an authentication environment variable name as configuration data. Do not access its value.

## Inspect each repository

- Find the existing model configuration with the repository's own instructions and search tools.
- Inspect only files that can declare model IDs, provider URLs, authentication environment variable names, token limits, or modalities.
- Do not treat package or SDK versions as model configuration.

## Compare catalog facts

- Match the named target against `registry_id`, `api_model_id`, or an explicit alias in `models`.
- Join the model's `provider_id` to its entry in `providers`.
- Compare the target model ID, provider base URL, authentication environment variable name, token limits, and modalities with the fields the repository already declares.
- Keep documented strings and numbers in their catalog form unless the repository requires a lossless equivalent.
- Preserve unknown or repository-specific values. Do not replace them with null values or guesses.
- Do not choose a model from list order, release date, name similarity, or an undocumented assumption.
- Skip the affected field or repository when the target model or a required fact is missing. State what is missing.

## Make the requested update

- If the developer asked for a review, report the differences without editing.
- If the developer asked for changes, edit only the requested model and provider fields.
- Do not change dependencies, package files, prompts, application behavior, or an API surface unless the developer requested that separate work.
- Run the repository's existing checks when its instructions allow them.

## Report the result

- List each changed repository, its changed files, and the checks run.
- List each skipped repository and the exact reason it was skipped.
- State that the update used one catalog fetch across all listed repositories.
- Report missing or unknown facts plainly. Never fill them in from memory.
