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.
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-idsays 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-4ohas 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.--strictexits 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/2026is 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.--fixhere 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: https://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.
Metadata
Release files for model-pin-check 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| model_pin_check-0.1.0.tar.gz | 74.2 kB | Without provenance | Details for model_pin_check-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| model_pin_check-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for model_pin_check-0.1.0-py3-none-any.whl |
Total release size: 148.4 kB
Release files / model_pin_check-0.1.0.tar.gz
| Download URL | model_pin_check-0.1.0.tar.gz |
|---|---|
| Size | 74.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2079e0bd74f8615a5e8d3bf33a13351a0dbbbb829d82873ac667ac9b674026a3
|
|
BLAKE2b-256 checksum How to use checksums |
c2db46143934b5305b7c84a7d83caeb92eb2b223a18f5bca48e4b974a3b91936
|
| 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.1.0-py3-none-any.whl
| Download URL | model_pin_check-0.1.0-py3-none-any.whl |
|---|---|
| Size | 74.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
389ce4433f66aeb20eb9c9c32deacccb332bea40306c35d75c279822bc9e1fd5
|
|
BLAKE2b-256 checksum How to use checksums |
0c24c06229b19ad5cc3b17457d87b1345ac62f95c0c6d3398a1446deb7056bb6
|
| 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.1.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.