Metadata-Version: 2.4
Name: flake8-llm-sunset
Version: 0.0.7
Summary: A flake8 plugin that warns about expiring LLM model IDs
Author-email: nikkie <takuyafjp+develop@gmail.com>
License-Expression: MIT
Project-URL: Repository, https://github.com/ftnext/llm-sunset-lint
Keywords: flake8
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Framework :: Flake8
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: flake8>=7
Provides-Extra: test
Requires-Dist: pytest>=9; extra == "test"

# flake8-llm-sunset

## Install

```console
$ uv tool install flake8 --with flake8-llm-sunset
```

## Usage

```console
% flake8 --select LSG examples/adk_example_fields_output_schema_agent.py
examples/adk_example_fields_output_schema_agent.py:14:11: LSG001 Gemini model 'gemini-2.0-flash' was shut down on 2026-06-01
```

## Model lifecycle data

Gemini and other Google model retirement dates are sourced from Google Cloud's
[Model versions and lifecycle](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/model-versions.md.txt)
and [Google models](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/google-models.md.txt)
Markdown sources.
Models without an announced retirement date are not checked.

Retirement dates are stored in `src/flake8_llm_sunset/model_shutdowns.json`
and bundled with the package. Each model ID maps to a `shutdown_date` in
`YYYY-MM-DD` format and an `earliest` boolean. Set `earliest` to `true` when
the provider says the model may retire "on or after" that date, or `false`
for a fixed retirement date.

To add or update a model, edit this JSON file and run `pytest`. The data tests
automatically validate every entry and check that the checker loads all bundled
models. Lifecycle behavior is tested separately using two fixed JSON entries,
covering both fixed and earliest retirement dates at the warning and retirement
boundaries. No model-specific test needs to be added for a data-only update.

The two upstream Markdown documents are also stored under
`sources/google-cloud/` for maintenance. Run
`python scripts/fetch_markdown_sources.py` to refresh them. These snapshots are
not included in the Python package or its source distribution.

## Error codes

Error-code prefixes identify the model provider:

| Prefix | Provider | Status |
| --- | --- | --- |
| `LSG` | Google | Supported |
| `LSO` | OpenAI | Planned |
| `LSA` | Anthropic | Planned |

| Code | Description |
| --- | --- |
| `LSG001` | A Google model has reached or passed its announced retirement date. |
| `LSG002` | A Google model is within one calendar month of its announced retirement date. |

On the announced retirement date, the diagnostic changes from `LSG002` to
`LSG001`.
