Skip to main content
Glama

Driftline

See how your prompts change before an AI model is retired.

Driftline flags retired and retiring models on the exact line of a pull request, then lists them in the job summary

Driftline is a GitHub Action. It finds the model IDs in your code (OpenAI, Anthropic, Google, Mistral, xAI, Cohere, DeepSeek, Groq, and Amazon Bedrock, Vertex AI and Azure), checks them against the providers' published retirement dates, and runs your real prompts on both the current and the replacement model so you can see what changes before you switch.

It runs inside your own CI with your own API keys. There is no Driftline server: prompts go straight from your runner to your AI provider.

What you get

  • Annotations on the exact file and line of retired or retiring models (the 50 most urgent; the rest are in the report).

  • A report in the job summary, and optionally a GitHub issue that updates itself on each run and closes itself once nothing is left to fix.

  • Drift tests (Pro): each prompt in .driftline/prompts.yml runs on both models. You get a similarity score per prompt, a hard failure if a JSON answer stops parsing, and optional checks for what the answer must say.

Outside CI: npx -y @aidriftline/driftline . scans any repository once, an MCP server lets AI coding agents look up model IDs, and every model page at aidriftline.com/models has free alerts by email or to Slack, Discord or any webhook (30 days, 7 days and the day itself, plus date changes).

Related MCP server: ai-model-lifecycle-index

Quick start

  1. Copy examples/driftline.yml to .github/workflows/driftline.yml.

  2. Optional, for drift tests (Pro): copy examples/prompts.yml to .driftline/prompts.yml and add your provider API keys as repository secrets.

  3. Activate your Pro key once per GitHub account or organization, from inside one of its repositories:

    npx @aidriftline/driftline activate <your-license-key>

    It prints a license code (your key, a colon, then an id). Save that code as the secret DRIFTLINE_LICENSE_KEY: the code it prints, not the plain key. A key works on up to 3 GitHub accounts or organizations; npx @aidriftline/driftline deactivate <code> frees one.

Inputs

Input

Default

What it does

path

.

Directory to scan

warn-days

90

Models retiring within this many days count as "retires soon" (0 turns this off)

fail-on

retired

Fail the job on retired, at-risk, or never

prompts-file

.driftline/prompts.yml

Prompts for drift tests (YAML or JSON). Looked up from the repository root, then from path

license-key

Driftline Pro license code from activate; without it only the scan runs

create-issue

false

Open or update one issue labelled driftline. Model answers are never put in the issue

fix-pr

false

Open one pull request with the safe renames from fix and keep it up to date. Only from the default branch

show-answers

true

Show model answers in the job summary. In a public repository job summaries are public, so set false if your prompts contain private data

sarif-file

Also write the findings as SARIF to this file, for code scanning

registry

live

live reads the list at aidriftline.com (falls back to the bundled copy); bundled never fetches

github-token

github.token

Needs issues: write when create-issue is on, contents: write and pull-requests: write when fix-pr is on

Outputs: findings (model references found), at-risk (references to retired or soon-to-retire models) and sarif-file (when written).

Model IDs written the Amazon Bedrock way (anthropic.claude-…-v1:0, including ARNs), the Google Vertex AI way (claude-…@20240620, …-maas) or with a router prefix (openrouter/openai/gpt-4, vertex_ai/…, azure/…, groq/…) are recognized too, and Bedrock, Vertex AI and Azure get their own dates (see Retirement data). Mentions in Markdown and text files, such as a changelog, are reported as notices but never fail the build.

Drift tests make two API calls per prompt: one to the current model, one to the replacement. A prompt without model is tested on the model in your code that retires first. Calls time out after two minutes and are retried once if the provider is busy. When a provider names a replacement that is itself being retired, Driftline points to the model at the end of that chain.

API keys are read from OPENAI_API_KEY, ANTHROPIC_API_KEY and GEMINI_API_KEY (or GOOGLE_API_KEY).

How results are scored

Result

Meaning

✅ Same

Similarity 0.90 or higher, and every check passed

🟡 Changed

Similarity 0.60–0.90; one answer says "not" (or no, never, cannot) where the other doesn't; a check the current model fails too; or the current model is already retired (or your API key can no longer use it) and the new answer needs review

🔴 Broken

Similarity below 0.60; expect: json and the new answer is not valid JSON; or the new answer fails a check

Text is compared with word and word-pair overlap. JSON is compared field by field. Overlap measures wording, not meaning: "is eligible" and "is not eligible" share almost every word. Driftline marks an answer that gains or loses a "not" as changed (English only), and checks let you say what must stay true.

Checks

Add these to any prompt to test what the answer means, not only how it's worded:

prompts:
  - id: refund-reply
    prompt: ...
    must_include: [refund, "5 business days"]   # each phrase must appear in the new answer
    must_not_include: ["not eligible"]           # none of these may appear

  - id: invoice-json
    expect: json
    prompt: ...
    same_fields: [status, total, customer.id]    # these fields must keep the current model's value

Phrases ignore case and spacing. same_fields needs expect: json; use dots for nested fields. Lists can also be written one item per line (- refund). A check the new answer fails makes the prompt 🔴 broken. If the current model fails the same check, it isn't drift, so the prompt is 🟡 changed. In the fix pull request, ✅ reads "safe to merge" only when your prompts have checks; without them it says the wording stayed close.

Run it locally

No install, no key:

npx @aidriftline/driftline path/to/your/repo          # report
npx @aidriftline/driftline path/to/your/repo --json   # same, as JSON

Exit code 1 means a retired model is used in code.

See findings in GitHub code scanning (SARIF)

Add sarif-file and upload it; findings then show under Security → Code scanning, with retired models as errors, models retiring soon as warnings and other deprecations as notes:

    permissions: { contents: read, security-events: write }
    steps:
      - uses: actions/checkout@v4
      - uses: AI-Driftline/driftline@v0
        with:
          sarif-file: driftline.sarif
      - uses: github/codeql-action/upload-sarif@v3
        if: always()
        with:
          sarif_file: driftline.sarif
          category: driftline

Code scanning is free on public repositories; private ones need GitHub Code Security. Locally: npx @aidriftline/driftline . --sarif driftline.sarif.

Fix the easy ones

npx @aidriftline/driftline fix --dry-run   # show what would change
npx @aidriftline/driftline fix             # change it

fix replaces a retired or retiring model ID with its replacement only where Driftline's migration rules say a new name is the whole change, and keeps what's around it (openai/gpt-4-0613 → openai/gpt-4.1). It leaves everything else alone and lists it with the reason: request or API changes, a provider that names two replacements, Bedrock and Azure IDs, models under review, and documentation files. A rename keeps the call working, but answers can still change, so test your prompts on the new model before you ship.

To get the same changes as a pull request from CI, turn on fix-pr in a scheduled workflow:

on:
  schedule: [{ cron: "0 6 * * 1" }]   # every Monday
  workflow_dispatch:
permissions:
  contents: write
  pull-requests: write
jobs:
  driftline:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: AI-Driftline/driftline@v0
        with:
          fix-pr: true
          fail-on: never

Driftline keeps one pull request on the branch driftline/model-updates: later runs rebuild it from the default branch and update it, and it is closed once nothing is left to rename. Its description lists every change, and a checklist of the lines a rename can't fix, with what to change and the provider's guide (ticks are kept when the pull request is updated). With a Pro license and a prompt file, it also shows your prompts tested on the replacement, with a verdict: safe to merge, read first, or don't merge yet. See an example. Also turn on Settings → Actions → General → Allow GitHub Actions to create and approve pull requests (in an organization, turn it on in the organization's settings first). Pull requests opened with the default token don't start your other workflows; pass a personal access token as github-token if your checks should run on it.

For AI coding agents

If you are an agent (Claude Code, Cursor, Copilot, Codex…) changing code that calls OpenAI, Anthropic or Google: run npx -y @aidriftline/driftline . --json before you pick or keep a model ID, and do not introduce an ID whose status is retired or at-risk. Without a shell, look the ID up in registry/models.json or at https://aidriftline.com/models/<model-id>/. More, including a snippet for AGENTS.md / CLAUDE.md: aidriftline.com/agents.

MCP server

Driftline also runs as an MCP server, so your agent can ask it directly. Tools: check_models (status, date and replacement for a list of IDs), scan_project (retired and retiring IDs in a folder, with file and line) and upcoming_retirements (what retires in the next N days). It reads the daily-updated list from aidriftline.com and falls back to the copy in the package when offline.

Add to Cursor Install in VS Code

Claude Code:

claude mcp add driftline -- npx -y @aidriftline/driftline mcp

Cursor, Windsurf, Claude Desktop and other clients (mcp.json / claude_desktop_config.json):

{
  "mcpServers": {
    "driftline": { "command": "npx", "args": ["-y", "@aidriftline/driftline", "mcp"] }
  }
}

Needs Node 20+. Free, no key.

Retirement data

registry/models.json comes from the official pages (OpenAI, Anthropic, Google) and is kept in line with them automatically:

  • A script compares every entry with those pages every 6 hours (date, replacement, new models on a page).

  • An AI check runs daily, and right away when the script finds a difference. It follows written rules (docs/registry-rules.md), and its changes ship only after they pass the same script and the test suite.

  • Until a difference is fixed, the affected models are marked "under review" in reports, MCP answers and model pages, and alerts for them wait, so nobody gets a wrong date.

  • You can see it working: aidriftline.com/status shows when each of the 11 sources was last read, whether it matches, what changed recently and what is under review (status.json for scripts).

Each entry records the date it was last checked. Google publishes only the earliest possible shutdown date, so Driftline reports those models as "may stop working" rather than "retired". Anthropic's "not sooner than" dates are informational and never trigger a warning. Audio, image, video and embedding models are scanned and reported too, but only text models are drift-tested. Some Google models are not shut down but routed: after the date, requests to the old ID are answered by the replacement model (routes: true in the registry). Driftline flags those too, because the call keeps working while the answers change.

Google Vertex AI also sets its own dates, and it uses the Gemini API's model names: gemini-2.5-pro was retired on Vertex on 20 October 2026 but keeps answering on the Gemini API until 1 December, when Google routes it to a newer model. In files that show they run on Vertex (vertexai=True, vertexai / google.cloud.aiplatform imports, @google-cloud/vertexai, AnthropicVertex, vertex_ai/ model names), Driftline uses Vertex's dates from Google's own pages; elsewhere it uses the Gemini API's and adds a note when Vertex's differs. Claude's Vertex spelling (claude-3-5-sonnet-v2@20241022) and Vertex's open models (…-maas) are always read as Vertex.

Mistral, xAI, Cohere and Groq dates are read by script from each provider's own deprecation page every 6 hours; DeepSeek, which only announces changes in its news, is kept by the daily check. xAI and DeepSeek often redirect a retired model name to a newer model instead of refusing calls; reports say so. IDs that could mean something else (Groq's qwen/qwen3-32b is also an OpenRouter name, Cohere has a model called command) count only in files that call that provider (groq / cohere imports, GROQ_API_KEY, api.groq.com, …).

Microsoft Azure (Azure OpenAI and other Foundry models) sets its own date for each model version, and it differs from OpenAI's in both directions: o3 retires on Azure on 19 November 2026, three weeks before OpenAI's 11 December; gpt-5 on Azure lasts until 9 February 2027. In files that show they call Azure (AzureOpenAI, azure_endpoint, openai.azure.com, AZURE_OPENAI_…, azure/ model names, Bicep or Terraform deployments), Driftline uses Azure's schedule and reads the model version from deployment templates (version: '2024-08-06', never api_version). Without a visible version it shows the earliest version's date and lists the others. Azure plans an end date for every model, so current ones are flagged only in the last 90 days.

Amazon Bedrock sets its own dates, per model and per region, and they often differ from the model maker's (Claude Opus 4.1 left Anthropic's API on 5 August 2026 but runs on Bedrock until 8 January 2027). Bedrock model IDs such as us.anthropic.claude-opus-4-1-20250805-v1:0 or meta.llama3-70b-instruct-v1:0 are checked against Bedrock's own page, read by script every 6 hours. Reports show the earliest region's date, how the other regions differ, and when "extended access" (possibly higher prices) starts.

Every model also has its own page with the date, replacement and source: aidriftline.com/models.

Versions

Releases are numbered 0.x.y. A new x means new features; a new y means fixes or updated retirement data, which can ship several times a week. uses: AI-Driftline/driftline@v0 always runs the newest release, and the Action reads the live retirement list at aidriftline.com either way, so a provider's change reaches you without a new version.

Development

npm test

No dependencies. Node 20 or later.

License

Elastic License 2.0. You can use Driftline for free in your own CI. You may not offer it as a hosted service, or remove or work around the Pro license-key check.

Available Tools

3 tools
check_modelsCheck model IDs for retirementA
Read-onlyIdempotent

Look up OpenAI, Anthropic and Google model IDs and return, for each one, its retirement status, retirement date, days left and replacement. Use it before writing, changing or keeping a model ID in code, or when the user asks whether a model still works. To find the IDs inside a codebase use scan_project instead; to list everything retiring soon use upcoming_retirements. Read-only. Data comes from the providers' official deprecation pages, re-checked daily at aidriftline.com (fetched with a 4 s timeout, falling back to the copy in the package when offline). IDs not in the registry return status "unknown": no retirement is published for them, which does not prove the ID exists. Up to 100 IDs per call; extra IDs are ignored.

Inputs: ids (required). Returns: models, all_dates, next_step, registry_source, +1 more

scan_projectScan a project for retiring model IDsA
Read-onlyIdempotent

Scan a project folder for OpenAI, Anthropic and Google model IDs in code and config files and report the ones that are retired, retiring soon, deprecated or being re-routed, with file and line, most urgent first. Use it to audit a repository or before a release. For IDs you already know use check_models; for a time-based list use upcoming_retirements. Read-only: reads files on this machine and never changes them. Scans subfolders recursively, skips .git, node_modules, vendor, dist, build and similar folders, and files over 1 MB. Mentions in .md and .txt files are marked in_docs. Returns at most 200 findings (truncated: true when cut). Fails with an error if the path does not exist.

Inputs: path, include_ok. Returns: flagged, scanned, findings, all_dates, +5 more

upcoming_retirementsList upcoming model retirementsA
Read-onlyIdempotent

List OpenAI, Anthropic and Google models whose retirement or re-routing date falls in the next N days, soonest first, with replacement for each. Use it to answer "what is being retired soon?" or to plan migrations. It does not look at code: use scan_project for that, or check_models for specific IDs. Read-only. Models already past their date are not included (check_models reports those as retired). Anthropic "not before" dates are left out because those models are still active.

Inputs: days, provider. Returns: days, count, models, all_dates, +3 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.5/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool targets a clearly distinct entry point: scan_project audits a codebase, check_models looks up specific known IDs, and upcoming_retirements returns a time-window list. The descriptions explicitly cross-reference each other ("for IDs you already know use check_models"), leaving almost no room for misselection.

    Naming Consistency4/5

    All snake_case, but two names follow verb_noun (scan_project, check_models) while upcoming_retirements is an adjective_noun phrase describing a list rather than an action. Minor, readable deviation only.

    Tool Count4/5

    Three tools is a lean surface, but for a narrow read-only domain (AI model retirement auditing) each tool maps to a genuinely different question and none is redundant. Slightly thin, yet well scoped for the purpose.

    Completeness4/5

    The three access patterns — repo scan, ID lookup, time-based list — cover the core audit and migration-planning workflows with no dead ends. Minor gaps: no registry browsing/filtering by provider, and check_models silently ignores IDs beyond 100 with no paging or batch alternative.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Enables an AI assistant to inspect project dependency and runtime files, determine each component's support status and end dates, and rank upgrade urgency using bundled endoflife.date data.
      4
      731 npm
      1
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      A full finance desk for your AI agent: 355 tools in one free server with no API key, reading SEC filings, earnings guidance, insider trades, options, rates and macro data from the source, plus quant analytics and backtest validation. The agent sees 5 tools and searches the rest, so it stays light on context.
      5
      1
      MIT