Schedule icon
Parallel icon
Download icon
Script icon
If icon
Exit icon
SlackIncomingWebhook icon
Pause icon
Loop icon
WorkingDirectory icon
Clone icon
PushExecutionFiles icon
Create icon
Set icon

LLM Model Retirement Migrator for OpenAI, Anthropic and Gemini Model IDs in Your Repositories

Find retiring OpenAI, Anthropic and Gemini model IDs in your GitHub repos with Kestra and open approved pull requests with replacements before shutdown.

Categories
AI

Diagram unavailable

We could not build the topology for this blueprint. The flow itself is valid, use the YAML on the left to run it.

LLM providers now retire models every few months, and a hard-coded model ID keeps working until the shutdown date, then breaks production. Tracking three providers' deprecation pages and searching every repository by hand doesn't scale. This flow does both every day and turns the result into pull requests a person approves.

How it works

  1. daily (Schedule) starts the run. fetch_schedules (Parallel of http.Download) downloads the OpenAI, Anthropic and Google deprecation pages.
  2. read_schedules turns their tables into model ID, shutdown date and replacement, skipping models that are only "not sooner than" a date. vars.replacements overrides or fills in replacements. A page with no rows fails the run loudly.
  3. scan_repositories downloads each repository as a tarball and finds retiring IDs as exact tokens, so gpt-4 never matches gpt-4o-mini. Excluded paths are skipped, and repositories with an open fix pull request are listed instead.
  4. post_digest posts the findings to Slack, most urgent first. approve (Pause) offers only repositories where every model has a replacement.
  5. open_pull_requests (Loop) clones each approved repository, replaces only the matched IDs (git.Clone, git.PushExecutionFiles) and opens a pull request with the shutdown dates, sources and a review checklist (github.pulls.Create).

What you get

  • Daily, official shutdown dates and replacements for every model ID your code uses.
  • Minimal pull requests that change only retiring model IDs, ready for your normal review and CI.
  • findings.csv and a reminder while a fix pull request stays unmerged.

Who it's for

  • Platform, AI and application teams that call OpenAI, Anthropic or Gemini models from code and config.

Why orchestrate this with Kestra

Parallel downloads, retries, a human approval and the Git changes run as one audited flow; no LLM guesses the replacements.

Prerequisites

  • A GitHub token that can read the repositories and open pull requests.
  • Set github_owner, and optionally repositories, replacements and exclude_paths, in variables.

Secrets

  • GITHUB_TOKEN: list and download repositories, push branches and open pull requests.
  • SLACK_WEBHOOK_URL: digests, pull request links and failure alerts.

Quick start

  1. Add the secrets and set variables.
  2. Execute with dry_run: true to read the digest.
  3. Execute again, pick repositories in the form, and review the pull requests.
  4. Enable daily.

Outputs: {{ outputs.references }} and {{ outputs.findings }}.

How to extend

  • Add other providers' deprecation pages to sources if they publish tables.
  • Run your evals on the pull request branch before merging.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.