Skip to main content

model-pin-check

Find the AI model ids your repo pins and say, for each one, whether the provider has already shut it down — with the provider's own sentence and the page it came from, so you can check the answer rather than trust it.

$ model-pin-check

claude-3-5-sonnet-20240620 — SHUT DOWN
  .env:1:17        ANTHROPIC_MODEL=claude-3-5-sonnet-20240620
  src/llm.py:4:13  MODEL = "claude-3-5-sonnet-20240620"
    Anthropic — Anthropic API / Claude Platform on AWS / Microsoft Foundry
      status: Retired   shutdown: October 28, 2025
      the provider names as replacement: claude-sonnet-5-5
      "| October 28, 2025 | `claude-3-5-sonnet-20240620` | `claude-sonnet-5-5` |"
      https://platform.claude.com/docs/en/about-claude/model-deprecations
      our record: https://referencesource.org/ai-model-deprecation-and-retirement/claude-3-5-sonnet-20240620/  last checked 2026-11-11

1 pinned model id(s) in 2 files: 1 shut down, 0 shut down on some platforms,
0 deprecated, 0 dated but still served.
Only the ids above were looked for; one this scan did not name has not been
cleared.
$ echo $?
1

Exit 1 means at least one pinned id has been shut down by every provider we hold a record for: that call will not come back. A model that is merely deprecated with a date still in the future is listed and exits 0, because it still answers and breaking your build over it would be wrong.

Install

pip install model-pin-check          # or: pipx install model-pin-check
model-pin-check

As a pre-commit hook:

repos:
  - repo: https://github.com/referencesource/model-pin-check
    rev: v0.1.0
    hooks:
      - id: model-pin-check

As a library:

from model_pin_check import scan, lookup

result = scan(["src"])
for f in result["findings"]:
    print(f["id"], f["verdict"], len(f["hits"]), "places")

hit = lookup("gpt-4-32k")      # None when we hold no record for the id

No dependencies, and it makes no network calls: the records ship inside the package, so it works in a sealed CI job and in an air-gapped build.

What it scans

Python first — .py .pyi .ipynb — then the rest of a Python service's repo: .json .jsonc .yaml .yml .toml .ini .cfg .env .tf .hcl, .js .ts .tsx .go .rb .java .rs .php .cs .sh, and extensionless or suffixed names like Dockerfile, Dockerfile.prod, Makefile, Procfile and Jenkinsfile, matched without regard to case.

Your own dotted directories are read too, because that is where a model id often is: .github/workflows/, .devcontainer/, .streamlit/, .cursor/, .claude/, .chainlit/, .gitlab/. Caches, build output and somebody else's code are skipped — .git, .venv, venv, __pycache__, site-packages, .tox, node_modules, dist, build, .terraform and friends — because somebody else's pin is not your pin.

--include-docs adds .md .rst .txt .adoc. Those are prose mentions, not pins, which is why they are off by default.

An id is read in every shape a provider writes it: bare (gpt-4-32k), behind a namespace (models/gemini-2.5-flash, openai/gpt-4o), with a Bedrock region prefix (us.anthropic.claude-3-5-sonnet-20240620-v1:0), and with a Vertex AI version inside it (textembedding-gecko@003, imagegeneration@006 — new in 0.2.0; before that the @ ended the token and all ten ids of that shape were missed, so a repository calling a shut-down one came back clean).

What it will not tell you

  • An id it did not name has not been cleared. The scan reports what it found in the files it opened, and prints how many files that was. A clean run over nothing is not a clean bill of health.
  • An id we hold no record for is unknown to us, not supported. --model some-new-id says so in those words, with the number of records held and the date they were built, so you can see the denominator.
  • Gone on one platform is not gone. The same id is served by several platforms on different dates: gpt-4o has one retirement date on Azure and another on OpenAI's own API. "SHUT DOWN" is reported only when every record for the id says so; otherwise you get "shut down on some platforms" and the rows that disagree. --strict exits 1 for that case too.
  • A date that can be read two ways is read the later way. Providers print retirement dates every way there is, and 3/9/2026 is March 9 to an American vendor and 3 September to a European one. Both readings are printed and the later one decides, so a model is never called gone early.
  • It changes no files. The npm twin can rewrite a dead pin to the successor the provider names (npx model-pin-check --fix). That half is not ported here yet: a wrong rewrite edits your code, and the rules that make it safe deserve their own tests rather than a hurried port. --fix here exits 2 and says this.

Where the data comes from

Every row was read off a provider's own deprecation or lifecycle page and kept with the sentence it was read from, the page URL, and the date it was last re-checked. The records are re-verified on a schedule and anything found wrong is fixed or pulled.

The compilation: referencesource.org/ai-model-deprecation-and-retirement

Facts and a short attributed quote from each provider's own documentation; this compilation CC0-1.0. This is not a provider's own tool and is not affiliated with any of them. Automated: built and maintained by a program.

The npm twin

The same records, the same verdicts, the same data file, for repos that have Node: npx model-pin-check. It additionally rewrites dead pins. This Python build exists because a pip install or a pre-commit hook is how a Python repository installs a check, and plenty of Python CI jobs have no Node at all.

Release notes

0.6.1 — 2026-11-20

Three Azure retirement dates in this package were wrong, and every release up to and including 0.6.0 shipped at least one of them. If you are pinned to 0.6.0 or earlier, upgrade: those versions are superseded. Nothing in the code changed. The data file is rebuilt from the records, which were corrected against Microsoft's own retirement table on 2026-11-19.

What a reader was told, and what the provider's table actually says. Each corrected value is quoted from the row it was read out of, and each record page below carries that quote and the date it was last confirmed.

id platform this package said the table says corrected
gpt-realtime-mini (version 2025-10-06) Azure / Microsoft Foundry retired 2026-09-21 2027-04-06 2026-11-19
gpt-image-1.5 Azure / Microsoft Foundry retires 2026-12-16 2027-06-16 2026-11-19
codex-mini Azure / Microsoft Foundry retired 2026-11-15 2026-11-17 2026-11-19
  • gpt-realtime-mini is the one that gave a wrong verdict, not just a wrong date. A shutdown date of 2026-09-21 is two months in the past, so this package answered gpt-realtime-mini — shut down on some platforms and exited 1 for a model Microsoft serves until 2027-04-06. A CI job that failed on that line failed for nothing. No file was ever rewritten over it: --write only replaces a pin where every platform holding the id names one same replacement, and the Azure row names none. Source row, as printed: | gpt-realtime-mini | 2025-10-06 | GA | 2027-04-06 | — | (https://referencesource.org/ai-model-deprecation-and-retirement/2025-10-06-gpt-realtime-mini/).
  • gpt-image-1.5 was given one month to live instead of seven. Row: | gpt-image-1.5 | 2025-12-16 | GA | 2027-06-16 | — | (https://referencesource.org/ai-model-deprecation-and-retirement/gpt-image-1-5-2/). The verdict was unchanged — the OpenAI platform deprecates the same id on 2026-12-01 — but anybody who read the Azure date out of --json and planned a migration round it planned it a half-year early.
  • codex-mini was two days out. Microsoft moved the row from 2026-11-15 to 2026-11-17. Both dates are in the past, so the verdict was right either way. Row: | codex-mini | 2025-05-16 | Deprecated | 2026-11-17 | — | (https://referencesource.org/ai-model-deprecation-and-retirement/codex-mini/).

Which versions are superseded, exactly. The dates are history, so this is stated per release rather than as a blanket warning:

  • codex-mini 2026-11-15 and gpt-image-1.5 2026-12-16 were in every release before this one: npm 0.1.0, 0.2.0, 0.3.0, 0.4.0, 0.5.0, 0.6.0 and PyPI 0.1.0, 0.2.0, 0.3.0, 0.6.0.
  • gpt-realtime-mini 2026-09-21 was in npm 0.3.0, 0.4.0, 0.5.0, 0.6.0 and in every PyPI release (0.1.0 onwards). npm 0.1.0 and 0.2.0 shipped 2027-04-06 and were right; the wrong date arrived in a re-harvest on 2026-11-16 and was published the same day.

Nothing is being yanked. The wrong answer is named here instead, because it travelled into two registries where a reader pins it, and withdrawing the releases quietly would leave the reader with no way to know which answer they had acted on.

Also in this release, from two days of re-checking (the records behind this package are re-read daily; 0.6.0's data file was built on 2026-11-17 and this one on 2026-11-19):

  • 63 further values moved on 36 other ids, none of them a repair of a mistake of ours.
    • 8 Azure ids now read SHUT DOWN where 0.6.0 read "deprecated", because the date their row prints has since passed: o1, o1-pro, o3, o3-mini, o3-pro, o3-deep-research, o4-mini and Llama-4-Maverick-17B-128E-Instruct-FP8. One Vertex AI id, gemini-3.6-flash, the same.
    • 27 Gemini Developer API ids re-read from Google's own deprecations page on 2026-11-17: gemini-2.5-flash and gemini-2.5-pro gained a shutdown date of December 1, 2026 where the page had announced none, four preview ids had theirs moved later (one to March 31, 2027), gemini-3.1-flash-live-preview had its date withdrawn again, and 23 recommended replacements changed.
  • 243 quotes and source URLs were refreshed under unchanged values — Google now serves that page from aistudio.google.com and the rows are rendered as bullets rather than a table, so the sentence this package shows as evidence had to be re-read even where the date had not moved.

A limit this release does not fix, stated plainly. The verdict for each id is computed when the data file is built, not when you run the tool, so a retirement date that passes after a release still reads "deprecated" until the next one. That is why the eight Azure ids above moved to SHUT DOWN in a release rather than on the day. Computing it from the date at run time is the obvious fix and it is queued with its own tests; it changes what the tool answers, so it is not being slipped into a correction release.

0.6.0 — 2026-11-17

  • One version number for both registries, written by the builder from this package's CHANGELOG.md. At 00:42Z on 2026-11-17 npm served 0.4.0 and PyPI served 0.2.0 of the same commit, and Google's AI answer for a bare search of the package name quoted the npm number while telling the reader to run pip index versions model-pin-check, which answered the other; two hours later the pair was 0.5.0 and 0.3.0, the same two-release offset. The next ship cannot re-split them: build_data.py writes the version into npm/package.json, python/pyproject.toml and the Python package's __version__.
  • The Python --version now tells the truth. __version__ had been left at 0.1.0 through two PyPI releases, so model-pin-check --version printed 0.1.0 on code published as 0.2.0 and then 0.3.0. Anybody who pasted that line into a bug report named a release that was never this code.
  • Release notes ship inside both packages, and the newest entries are rendered into both READMEs, which is the only part npm's and PyPI's own pages show.
  • Nothing changed in what the tool finds or how it answers. The data file and every rule are identical to npm 0.5.0 / PyPI 0.3.0.
  • PyPI goes 0.3.0 → 0.6.0. The numbers 0.4.0 and 0.5.0 were npm's and were never published to PyPI; the entries under "Before 0.6.0" in CHANGELOG.md say what each of them was.

The two copies, and the one thing only npm does

Everything else is the same in both copies — the records, the scanner, the verdicts, the exit codes, --json, --model, --include-docs, --strict, --quiet, --full-quote.

  • --fix and --write are npm only. The repair half — rewrite a dead pin to the successor the provider itself names — arrived in npm 0.2.0 and has never been ported to Python. The Python copy does not ignore the flags: it exits 2 and says where the repair lives, because silently doing nothing to somebody's code would be worse than refusing. A wrong rewrite edits your files, so the port waits for its own tests rather than a hurried copy.

That is the whole difference, and it is the reason npm's number used to run ahead: npm had two releases before the Python copy existed, one of them --fix. A shared version number is a release number for the pair; it does not claim the two copies accept the same flags. This section does.

Every released version, and what it changed: CHANGELOG.md in this package.

Metadata

Release files for model-pin-check 0.6.1

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

Source distribution (sdist)

Source distribution for model-pin-check 0.6.1
File Size Uploaded Provenance Actions
model_pin_check-0.6.1.tar.gz 84.0 kB Without provenance Details for model_pin_check-0.6.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for model-pin-check 0.6.1
File Interpreter ABI Platform Actions
model_pin_check-0.6.1-py3-none-any.whl Python 3 none any Details for model_pin_check-0.6.1-py3-none-any.whl

Total release size: 163.0 kB

Release files / model_pin_check-0.6.1.tar.gz

Download URL model_pin_check-0.6.1.tar.gz
Size 84.0 kB
Tags Source
SHA-256 checksum
How to use checksums
77b818a434db753ac845ec3ceabc306838e30c68f109e97d7bfb46f7097a3832
BLAKE2b-256 checksum
How to use checksums
8ca0ead1a7555edebd0f9cede15efac693027950e19e75e72d623a9af589df79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / model_pin_check-0.6.1-py3-none-any.whl

Download URL model_pin_check-0.6.1-py3-none-any.whl
Size 79.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
70280a41c255313b2f686cbbf7793e66ead12afb1dbf820a4c2dc10184926ddc
BLAKE2b-256 checksum
How to use checksums
0c1f8305bbc0f136f8463d8dc04dd84cbe444af976e9c52916a8009d9993f4b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Security for model-pin-check 0.6.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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