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.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.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 model-pin-check 0.6.0
File Size Uploaded Provenance Actions
model_pin_check-0.6.0.tar.gz 80.0 kB Without provenance Details for model_pin_check-0.6.0.tar.gz

Built distribution (wheel)

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

Total release size: 157.1 kB

Release files / model_pin_check-0.6.0.tar.gz

Download URL model_pin_check-0.6.0.tar.gz
Size 80.0 kB
Tags Source
SHA-256 checksum
How to use checksums
aac486d1de577e1a984f1f177dc381a66214902d9d6d63e00888bc90e228b9cb
BLAKE2b-256 checksum
How to use checksums
36cf32ee6819f9525eb3e6b03010d87f44802c2870e9c209d8667c7a26cb58c0
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.0-py3-none-any.whl

Download URL model_pin_check-0.6.0-py3-none-any.whl
Size 77.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
99d3350c455716381fdfeefb959fb6e2e46f03a2b5f1b990d46864eace283868
BLAKE2b-256 checksum
How to use checksums
82795d3e5da96f4118e371c91871fd78fd4174596bfe82ce8d81122f20182a19
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.0

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