Skip to main content

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

Project description

Model Alive

517 models · 21 providers · 130+ aliases — OpenAI, Anthropic, Google, Qwen, DeepSeek, Llama, Groq, Together, Fireworks, Bedrock, Azure, OpenRouter, Ollama, and more.

Hardcoded model IDs break silently until production fails. Model Alive answers in one call — with source links, breaking change notes, and host-aware lifecycle status.

Quality scorecard → · Universal registry guide → · 60-second quickstart →

Install

pip install modelalive

JavaScript/TypeScript:

npm install modelalive

Go:

go get github.com/Ahaozandaburada/modelalive/go/modelalive

Quick examples

# Retired model → exit 1
modelalive check claude-sonnet-4-20250514

# Resolve alias + replacement
modelalive resolve claude-3-5-sonnet-latest

# List all retired Anthropic models
modelalive list --status retired --provider anthropic

# Validate registry integrity
modelalive validate --strict

# Pre-flight: print safe model ID (auto-replaces retired)
modelalive ensure claude-sonnet-4-20250514

# Production CI: fail on unknown models too
modelalive check "$MODEL_ID" --strict-unknown --warn-deprecated
import modelalive

# Pre-flight: auto-replace retired models
model_id = modelalive.ensure("claude-sonnet-4-20250514")
# → "claude-sonnet-4-6"

# Context manager for call sites
with modelalive.gate("gemini-2.0-flash") as safe:
    call_api(safe)  # → gemini-3.5-flash

result = modelalive.alive("claude-mythos-preview")
print(result.days_until_retirement)  # 2 (as of 2026-06-28)
print(result.source_url)             # Anthropic deprecation docs
print(result.confidence)             # "verified"

TypeScript / Node

cd js && npm install && npm run build
import { alive, ensure, resolve } from "modelalive";

ensure("claude-sonnet-4-20250514"); // → "claude-sonnet-4-6"
alive("gemini-2.0-flash").status;     // → "retired"

HTTP API

uvicorn api.main:app --port 8787
Method Path Description
GET /v1/alive?model= Lifecycle check (410 if retired)
POST /v1/alive/batch Check up to 100 models
GET /v1/ensure?model= Pre-flight: return safe model ID
GET /v1/resolve?model= Best model ID + breaking changes
GET /v1/registry Filter by status, provider
GET /v1/sources Official doc URLs + last checked date
GET /v1/validate Registry integrity report
GET /v1/expiring?days= Models retiring within N days
GET /openapi.json OpenAPI 3 schema
GET /v1/health Version + model count

CI gate (GitHub Actions)

- uses: Ahaozandaburada/modelalive@main
  with:
    models: claude-sonnet-4-20250514 gpt-5-2025-08-07
    warn-deprecated: "true"

Or plain shell:

- run: pip install modelalive && modelalive check ${{ env.MODEL_ID }}

Trust & accuracy

Every verified entry includes:

  • source — provider key (anthropic, openai, google, groq)
  • source_url — official deprecation page (returned in API/SDK)
  • source_checked_at — date registry was last synced with docs
  • confidenceverified (in registry) or unknown (not listed)

Registry rules enforced in CI:

  • Retired/deprecated models must have replacement + retired_at
  • Past retired_at auto-marks model dead even if status lags
  • Aliases resolve before lookup (claude-3-5-sonnet-latest → dated snapshot)
  • modelalive validate --strict fails on errors before release

Canonical registry: edit registry/models.json, then:

python scripts/sync_registry.py   # copies to package bundle
modelalive validate --strict
pytest

Sources (as of 2026-06-28):

Response shape

{
  "queried_model": "claude-sonnet-4-20250514",
  "canonical_model": "claude-sonnet-4-20250514",
  "alive": false,
  "status": "retired",
  "provider": "anthropic",
  "retired_at": "2026-06-15",
  "replacement": "claude-sonnet-4-6",
  "breaking_changes": [],
  "source_url": "https://platform.claude.com/docs/en/about-claude/model-deprecations",
  "source_checked_at": "2026-06-28",
  "confidence": "verified"
}

Coverage

Provider Active Deprecated Retired
Anthropic Sonnet 4.6, Opus 4.8, Haiku 4.5, Mythos 5, … Opus 4.1, Mythos Preview Sonnet 4, Opus 4, 3.x series
OpenAI gpt-5.5, gpt-4o, … gpt-5 snapshots, gpt-5.2-chat-latest, … gpt-4-0314, gpt-3.5-turbo-0301, …
Google gemini-3.5-flash, … 2.5 Flash, embeddings, image previews gemini-2.0-flash (June 1), gemini-3-pro-preview
Groq llama-3.3-70b-versatile, … llama3-70b-8192, mixtral-8x7b-32768

See docs/ACCURACY.md for source policy and error reporting.

Unknown models return status: unknown, confidence: unknown, alive: true — we never block what we haven't verified.

Docker (self-host API)

docker compose up --build
curl "http://localhost:8787/v1/alive?model=gemini-2.0-flash"

Deploy to Fly.io:

fly launch --copy-config --yes
fly deploy

Keep registry fresh

pip install modelalive[http]
python scripts/refresh_sources.py   # fetch provider docs, update checked_at
modelalive validate --strict
python scripts/sync_registry.py

Weekly automated refresh runs via .github/workflows/registry-refresh.yml.

Sources (as of 2026-06-28):

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-1.4.0.tar.gz (5.0 MB view details)

Uploaded Source

Built Distribution

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

modelalive-1.4.0-py3-none-any.whl (33.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for modelalive-1.4.0.tar.gz
Algorithm Hash digest
SHA256 100953b91e43dc3bd0f629239f1759fbfc192db47e26db99e121acd84c5d3c58
MD5 49c9823eada4e7e8b449b4893f04b66a
BLAKE2b-256 883fe5d640e7dda1b4e6ae5ae3fe96766864e5f3f3ed2fe635c7565eefa26980

See more details on using hashes here.

File details

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

File metadata

  • Download URL: modelalive-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 33.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-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a31ddf301c15f0efd244e433bf3f80981d7c10bacecfb07e36670eefde08e35c
MD5 4f2ec185d0af7e3ecd7a960606a5c747
BLAKE2b-256 15c613fad84a3365a6a53d33177aef248f28810574d875cff0758a832ad07eef

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