---
title: "Track the retirement date of every model · Agent Wranglers"
url: https://agentwranglers.se/playbook/ai-features/prompts-as-code/model-retirement-dates
id: AIF-75
level: Required
applies: ai-features
risk: outage
updated: 2026-10-27
build: a2a6bdfed830
tokens: 1143
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Track the retirement date of every model you call

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Prompts as code](https://agentwranglers.se/playbook/ai-features/prompts-as-code.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-27.

- ID: AIF-75
- Level: Required
- Chapter: [Prompts as code](https://agentwranglers.se/playbook/ai-features/prompts-as-code.md)
- Rule: Keep one list of every model version your code calls, with its provider's retirement date. Alert the owner 90 days before a date, and finish the move with a full eval run before it.
- Check: A CI test reads every model ID from the gateway settings and finds each in the list. Each entry has a retirement date or "none announced", checked in the last 14 days. A scheduled job fails when a date is under 90 days away and no migration ticket links to it.
- Risk: The app down or unusable
- Applies when: The project uses AI models.
- Review by: 2027-06-30
- How: Providers retire old models, and calls to a retired model fail. Notice can be short, such as the 60 days Anthropic promises for public models. Build the list from the gateway settings, so no model is missing, including embedding, speech and fine-tune base models. Read the dates from each provider's deprecation page or API on a schedule, such as weekly, and store the date checked. Keep a short runbook per feature. It names the replacement candidates, the eval set to run and who signs off. Switching the base model is a new model, so rerun the whole eval set, not a sample, as [review and test every prompt change](https://agentwranglers.se/playbook/ai-features/prompts-as-code/prompt-change-review.md) requires. Fine-tunes are rebuilt on the new base, as [rebuild fine-tuned models from stored data](https://agentwranglers.se/playbook/ai-features/evals-and-quality/reproducible-fine-tunes.md) says. It is the model form of [keep one list of support end dates](https://agentwranglers.se/playbook/engineering/major-upgrades/support-end-dates.md).

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### TypeScript example

```ts
const ALERT_DAYS = 90;
const DAY_MS = 86_400_000;

export function modelsNearRetirement(models: ModelEntry[], today = new Date()): ModelEntry[] {
  return models.filter(model => model.retiresOn && (model.retiresOn.getTime() - today.getTime()) / DAY_MS < ALERT_DAYS && !model.migrationTicket);
}
```

### Python example

```python
ALERT_DAYS = 90

def models_near_retirement(models: list[ModelEntry], today: date | None = None) -> list[ModelEntry]:
    today = today or date.today()
    return [m for m in models if m.retires_on and (m.retires_on - today).days < ALERT_DAYS and not m.migration_ticket]
```

## Sources

- [Claude Docs, model deprecations](https://platform.claude.com/docs/en/about-claude/model-deprecations)
- [OpenAI API deprecations](https://developers.openai.com/api/docs/deprecations)

## Related rules

- AIF-81 [Write a short card for every AI feature](https://agentwranglers.se/playbook/ai-features/deciding-to-use-a-model/ai-feature-card.md) in AI features
- AIF-59 [Pin the AI model version you depend on](https://agentwranglers.se/playbook/ai-features/prompts-as-code/pin-model-versions.md) in AI features
- AIF-8 [Review and test every prompt change](https://agentwranglers.se/playbook/ai-features/prompts-as-code/prompt-change-review.md) in AI features
- AIF-62 [Rebuild fine-tuned models from stored data and compare before switching](https://agentwranglers.se/playbook/ai-features/evals-and-quality/reproducible-fine-tunes.md) in AI features
- ENG-71 [Keep one list of support end dates](https://agentwranglers.se/playbook/engineering/major-upgrades/support-end-dates.md) in Engineering

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/ai-features/prompts-as-code/model-retirement-dates">Agent Wranglers AI features playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Pin the AI model version you depend on](https://agentwranglers.se/playbook/ai-features/prompts-as-code/pin-model-versions.md)
- [Prompts as code](https://agentwranglers.se/playbook/ai-features/prompts-as-code.md)
