Skip to main content

Preflight checks for LLM prototypes.

Project description

ModelPreflight

Preflight checks for LLM prototypes.

A tiny local gateway for LLM smoke tests, provider failover, and cheap prototype checks.

Install

uvx model-preflight --help
uv add --dev model-preflight
# or
pip install model-preflight

Install locally

uv pip install -e .
# or from another repo
uv add --dev --editable /absolute/path/to/model-preflight

Configure once per machine

mpf init
$EDITOR ~/.config/model-preflight/config.yaml
export OPENROUTER_API_KEY=...
export GROQ_API_KEY=...
export CEREBRAS_API_KEY=...
export MISTRAL_API_KEY=...
mpf doctor

Both mpf and model-preflight are installed as console scripts.

Use in projects

mpf models
mpf run examples/smoke_cases.jsonl
mpf pro "Return a robust answer to this toy task" --n 8

Python:

from model_preflight import ModelGateway, load_config, pro_mode

gateway = ModelGateway(load_config())
print(gateway.text("Return only: ok", group="free_reasoning"))
print(pro_mode(gateway, "Solve this toy puzzle", n=8)["final"])

Design

  • Global provider/auth/routing lives in ~/.config/model-preflight/config.yaml.
  • Project-local checks only define cases, scoring, fixtures, and artifacts.
  • LiteLLM handles provider-specific API quirks while ModelPreflight adds stable aliases and audit logs.
  • The package can be used as a library, CLI, AutoHarness provider adapter, or FastAPI backend.

Commands

mpf init
mpf doctor
mpf models
mpf run evals/smoke.jsonl
mpf pro "solve this toy task" --n 8

Repo adapters

  • examples/autoharness_provider.py: drop-in provider wrapper for AutoHarness.
  • examples/gpt_pro_mode_refactor.py: refactors single-provider Pro Mode into shared routing.
  • examples/node_hook_example.mjs: CLI bridge for JS/agent-hook projects.
  • skills/model-preflight/SKILL.md: optional coding-agent skill for consistent usage.

Non-goals

ModelPreflight is not a model leaderboard, a formal benchmark harness, a hosted gateway, or an authority on which endpoints are free today. It is a small preflight layer for early prototype checks.

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

model_preflight-0.1.0.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

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

model_preflight-0.1.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: model_preflight-0.1.0.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for model_preflight-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1db100c7dc0509470beb4afd912d2c5026990ee25434b4eaa2f6daae0e738a6a
MD5 118cd72443e80237688c2378815ec3b8
BLAKE2b-256 af2ef8e31b41fd61ffb7231ebcc837c9c000006b5b455fd59054e8eb3ee1de75

See more details on using hashes here.

File details

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

File metadata

  • Download URL: model_preflight-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for model_preflight-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2f10aab9ec5ac0ed972244206a3863ac4b1f8f6570f938b3e48dc47735d4de3f
MD5 b2609bf57ff1d60e47d722ba96e24386
BLAKE2b-256 486e0d62653ed7d9fe63eddebb1d86eb5b8ad97e0a5740aaa39eda2b3bb93a94

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