Skip to main content

🌅 llm-sunset

Your app is about to break because an AI provider is shutting down the model it uses. llm-sunset tells you before it happens.

OpenAI, Anthropic, Google, Groq, Cohere and xAI retire models constantly, often with only a few months' notice. The model ID sits hard-coded in some config file and nobody notices until production starts returning 404 model_not_found.

llm-sunset scans your code, finds every AI model ID, and checks it against a daily-updated list of official deprecation notices.

$ llm-sunset
app/llm.py:12:23     error    OpenAI model 'gpt-4o-2024-05-13' retires 2026-10-23 (16 days left); replace with: gpt-5.6-sol
app/summarize.py:8:11  error  OpenAI model 'gpt-3.5-turbo' retires 2026-10-23 (16 days left); replace with: gpt-5.6-terra
config/models.yaml:3:8 error  Anthropic model 'claude-2.0' RETIRED on 2025-07-21 (443 days ago); replace with: claude-opus-4-8
worker/.env:2:7        warning Anthropic model 'claude-sonnet-4-5-20250929' retires 2026-11-30 (54 days left)

4 finding(s): 3 error(s), 1 warning(s)
  • Zero dependencies. Pure Python standard library, Python 3.8+.
  • Works offline. Ships with a bundled snapshot; uses live data when it can reach it.
  • No API keys, and your code never leaves your machine. It only downloads a public JSON file.
  • CI-ready. Comes with a GitHub Action, a pre-commit hook, SARIF output for GitHub code scanning, JSON and Markdown.
  • Low noise. It matches exact model IDs (so gpt-4o-mini is not reported as gpt-4o, and gpt-4.1 is not reported as gpt-4) and skips prose docs, lockfiles and node_modules.

Install

pipx install llm-sunset     # or: pip install llm-sunset / uvx llm-sunset

Usage

llm-sunset                          # scan current directory
llm-sunset src/ config/             # scan specific paths
llm-sunset --provider openai        # only OpenAI notices (repeatable)
llm-sunset --fail-within 30         # only fail on models retiring within 30 days
llm-sunset --format json            # also: markdown, sarif, github
llm-sunset info gpt-4o-2024-05-13   # look up a model
llm-sunset upcoming --days 90       # every shutdown in the next 90 days

Exit code is 1 if any model is already retired or retires within --fail-within days (default 90). Use --no-fail to only report.

Ignoring things: put llm-sunset: ignore in a comment on a line, or llm-sunset: ignore-file anywhere in a file. Use --exclude 'tests/*' for paths. Markdown/RST/TXT files are skipped unless you pass --include-docs.

Azure, Vertex AI and Bedrock publish their own retirement dates for models they resell, which often differ from the original provider's dates. To avoid false alarms these are off by default. Turn them on with --provider azure or --provider all.

GitHub Action

# .github/workflows/llm-sunset.yml
name: llm-sunset
on:
  push:
  pull_request:
  schedule:
    - cron: "0 8 * * 1"   # also re-check weekly: deprecations are announced while your code sits still
jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: Ashveil1/llm-sunset@v0
        with:
          fail-within: 60          # optional
          # provider: "openai anthropic"
          # exclude: "tests/*"

Findings appear as inline annotations on the PR, along with a summary table on the run page.

pre-commit

repos:
  - repo: https://github.com/Ashveil1/llm-sunset
    rev: v0.1.0
    hooks:
      - id: llm-sunset

GitHub code scanning (SARIF)

      - run: pipx run llm-sunset --format sarif --no-fail > llm-sunset.sarif
      - uses: github/codeql-action/upload-sarif@v3
        with:
          sarif_file: llm-sunset.sarif

Where the data comes from

Deprecation data comes from deprecations.info (source, MIT). It scrapes the official deprecation pages of OpenAI, Anthropic, Google Gemini and Vertex AI, AWS Bedrock, Azure AI Foundry, Cohere, Groq and xAI every day. llm-sunset caches it for 24 hours in ~/.cache/llm-sunset/ and falls back to a bundled snapshot that is refreshed weekly.

If you find a missing or wrong entry, please report it upstream at deprecations-rss. For false positives or negatives in matching, open an issue here.

Support the project

If llm-sunset saved you from a production outage, please consider sponsoring ❤️

License

MIT

Metadata

Release files for llm-sunset 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llm-sunset 0.1.0
File Size Uploaded
llm_sunset-0.1.0.tar.gz 24.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llm-sunset 0.1.0
File Interpreter ABI Platform
llm_sunset-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 47.1 kB

Release files / llm_sunset-0.1.0.tar.gz

Download URL llm_sunset-0.1.0.tar.gz
Size 24.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b79aecbad279a3b24445ab7aa2680b9fa472a5a399404fb0b69ecd3079bc0a1c
BLAKE2b-256 checksum
How to use checksums
2b6cef742c51c694fff31de2be17cf60045fa3811d3ec03c67f150ad4e51f922
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.

Transparency log

Release files / llm_sunset-0.1.0-py3-none-any.whl

Download URL llm_sunset-0.1.0-py3-none-any.whl
Size 22.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ea9fa7afcbd425733e677216ad951e8f7904fe93af75f0b2e5a14af0a2740b00
BLAKE2b-256 checksum
How to use checksums
470291dc0f972dfbdd3a8836551e79a05f32df4b503bf092f6307a3b6a9b3090
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page