This workflow is strictly additive. Never remove an existing provider preset, even when an official source marks it deprecated, retired, unavailable, superseded, or absent from the current catalog. Record such findings in the run summary when useful, but leave the registry entry unchanged.
-
Inventory the current registry.
node .codex/skills/model-provider-updater/scripts/model_provider_presets.mjs inventory
Use --json when another script or a temporary comparison file needs structured output.
-
Check providers one by one against official sources.
Start from references/provider_sources.json, but verify the current official page/API during the run because model catalogs change often. Use official provider docs, official pricing/model pages, or official model-list APIs. Do not use third-party blogs, search snippets, or aggregator pages as removal evidence unless the provider is that aggregator, such as OpenRouter.
check-sources only checks whether source-hint URLs are reachable enough to use as starting points. A 403 access-limited result can still be acceptable for docs that block automated requests, and a passing source check is not evidence that the provider catalog was audited.
-
Classify differences conservatively.
For a general model refresh, add only primary LLM/chat/reasoning models. Do not add derived or specialized non-LLM variants just because the provider docs list them, such as TTS, STT, transcription, audio, image, video, realtime, moderation, or batch-only model IDs (gpt-4o-transcribe, gpt-4o-mini-tts, and similar). Also skip open-weight/checkpoint style IDs that encode parameter scale or architecture details when the provider has productized main model IDs, such as Qwen qwen3.6-27b, qwen3.5-397b-a17b, qwen3.5-122b-a10b, or qwen3.5-35b-a3b; prefer max, plus, flash, or other documented main product model IDs instead. Handle those only when the user explicitly asks for that modality/model class or when the provider itself is a modality-specific or open-model provider already maintained for that type.
Add a preset when an official source lists an in-scope model that is absent locally and it belongs to an existing provider. Clone the closest existing preset in the same provider and family, then adjust context, output limit, vision, reasoning, tool calling, response-format, and field-map fields from official docs or the closest local pattern.
Keep every existing preset. Deprecated, retired, unavailable, superseded, preview, experimental, and dated candidate IDs may be noted in the audit summary, but must not be removed by this workflow.
-
Create and apply an update plan.
Generate a template and fill only confirmed additions. Keep every remove array empty:
node .codex/skills/model-provider-updater/scripts/model_provider_presets.mjs plan-template --provider OpenAI > /tmp/model-provider-plan.json
Dry-run before writing:
node .codex/skills/model-provider-updater/scripts/model_provider_presets.mjs apply-plan --plan /tmp/model-provider-plan.json --dry-run
node .codex/skills/model-provider-updater/scripts/model_provider_presets.mjs apply-plan --plan /tmp/model-provider-plan.json --write
The plan format is documented in references/plan.example.json. That file includes an intentionally unregistered ExampleProvider shape example, so use plan-template for executable plans instead of applying the example file directly. Keep every audited provider in the plan:
- Use
auditStatus: "checked" with empty add and remove when the provider was checked and no registry change is needed.
- Use
auditStatus: "changed" when adding presets.
- Leave
auditStatus: "pending" only for providers not yet checked.
replace supports top-level provider-model fields only, such as maxContext, maxTokens, vision, reasoning, responseFormatList, or fieldMap. Do not use dotted paths such as fieldMap.max_tokens; replace the full top-level object instead.
The script only edits providers registered by packages/infrastructure/src/static-data/models/index.ts, skips already-present additions, validates the whole plan before writing any file, and errors if cloneFrom or required evidence fields are missing. Although the script can mechanically process removals for legacy workflows, this skill must always submit empty remove arrays.
-
Validate.
bun run test
bun tsc --noEmit
If the full suite is too broad for the change, run the model inventory plus targeted TypeScript validation and state the skipped coverage clearly.
Use the script for repeatable mechanics, then review the diff manually before final validation.