Skip to main content

Pre-flight check: is this LLM model ID still alive?

Project description

Model Alive

Pre-flight check before every LLM API call: is this model ID still alive?

Hardcoded model IDs break silently until production fails. Anthropic retired Claude Sonnet 4 and Opus 4 on June 15, 2026. Mythos Preview retires June 30, 2026. Model Alive answers in one call.

Quick start

pip install -e ".[dev]"
modelalive check claude-sonnet-4-20250514
DEAD: claude-sonnet-4-20250514 (retired)
  replacement: claude-sonnet-4-6

Python SDK

import modelalive

# Raises ModelRetiredError if dead
modelalive.check("claude-sonnet-4-20250514")

# Non-throwing status
result = modelalive.alive("claude-mythos-preview")
print(result.days_until_retirement)  # 2 (as of 2026-06-28)

# Auto-replace before calling your provider
model_id = modelalive.resolve("claude-sonnet-4-20250514")
# → "claude-sonnet-4-6"

HTTP API

uvicorn api.main:app --reload --port 8787
curl "http://localhost:8787/v1/alive?model=claude-sonnet-4-20250514"
{
  "model": "claude-sonnet-4-20250514",
  "alive": false,
  "status": "retired",
  "provider": "anthropic",
  "retired_at": "2026-06-15",
  "replacement": "claude-sonnet-4-6",
  "breaking_changes": [],
  "migrate_url": "https://platform.claude.com/docs/en/about-claude/model-deprecations"
}

Retired models return HTTP 410.

Endpoints

Method Path Description
GET /v1/alive?model= Lifecycle check
GET /v1/resolve?model= Best model ID to use
GET /v1/registry Full registry (optional ?status=retired)
GET /v1/health Health + registry version

Registry

Curated deprecation data lives in registry/models.json. Update when providers announce retirements.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

modelalive-0.1.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

modelalive-0.1.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file modelalive-0.1.0.tar.gz.

File metadata

  • Download URL: modelalive-0.1.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for modelalive-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5d3e528f7ec2a699112e809f680671abcaffe7d37dfc1b48a4c3ad6ecb678653
MD5 948f7b927e07011267e6002f96e20119
BLAKE2b-256 9efbd142194a1c14261fa9bd1fbad460215adc2657121bde7257361d0d803f44

See more details on using hashes here.

File details

Details for the file modelalive-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: modelalive-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for modelalive-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d81543b724e6962eb867f1c0f61ba1b53736736c08fa113d61ce0c16ef8bb255
MD5 1cc08c4a03b80e5571d5d6f0d4fba86e
BLAKE2b-256 197105d1d8697da2893b8957179cbd61c3512b9de6aef1cb5199f071ffa7e4a5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page