Skip to main content

poolprobe — Probe first. Classify before pruning.

poolprobe

Probe first. Classify before pruning.

Inspect OpenAI-compatible model pools, classify failures and produce terminal, JSON or HTML reports. Keep transient and credential failures separate from permanent-model prune candidates.

Install · Quickstart · Commands · Prune guards · Contributing

Scope: Live sweeps and benchmarks send model requests and may incur provider charges. Pruning requires all five guards; config writes require --apply. Offline selfcheck does not establish live gateway availability.

Checks: run python -m poolprobe selfcheck before pushing. This is the repository's offline contract; it needs no live service or credentials.

Package and license badges

python dependencies license

Why it exists

A pool of routed models rots quietly. An upstream drops a model, a key hits an account tier, a reasoning model starts spending its whole token budget on thinking, a gateway route begins answering SSE to a non-streaming request. None of that raises an exception anywhere. The agent just gets an empty reply, or a slower one, or falls through to a worse model — and nobody notices for a week.

poolprobe looks at every model in the pool, tells you why each one is failing, and refuses to delete anything until five separate guards agree it is dead. It grew out of running a live cliproxy pool on a schedule and learning, the hard way, how many "dead model" verdicts were really weather.

The three rules

Everything in the tool obeys these. They are the reason it exists.

  1. A verdict is not a death sentence. Every failure is classified into a kind — ALIVE, ALIVE-STARVED, PERMANENT, TRANSIENT, CREDENTIAL, MODALITY, UNKNOWN. Only PERMANENT (the upstream genuinely does not know this model) is ever a prune candidate. A 401 is a dead key, not a dead model; pruning on it deletes a good alias because a credential ran dry.

  2. One observation is not a verdict. A measured pool produced 544 scheduled liveness runs over six weeks; 39% went red, and every single red was transient. poolprobe burst-confirms by default — five attempts in one run, best answer wins — before it will call anything dead.

  3. A number without evidence is not reported. Throughput comes from the gateway's own usage block, or it is marked as a lower bound (>=), or it renders as -. Never estimated from SSE chunk counts and dressed up as a measurement.

Install

Use Python 3.10+. For a first run from a checkout, use a virtual environment (the activation command below is for a POSIX shell):

git clone https://gitlab.com/ameobius-ai/poolprobe.git
cd poolprobe
python3 -m venv .venv
. .venv/bin/activate
python -m pip install .
poolprobe --version

Expected version output: poolprobe 1.1.0 with exit code 0. Installation may fetch the build tooling declared in pyproject.toml; installing is not the offline check below. No gateway credentials or real config are needed.

When a release is available on PyPI, the package-install alternatives are:

pip install poolprobe                 # stdlib engine, generic gateway lane
pip install 'poolprobe[cliproxy]'     # + PyYAML, to read a cliproxy-style config

The engine has zero runtime dependencies. PyYAML is optional and only needed to attribute models to providers and to plan config edits from a gateway YAML. For that existing adapter, install python -m pip install '.[cliproxy]' from the checkout; it may fetch PyYAML. It is not needed for the offline first run.

Quickstart

First run without a gateway

With the virtual environment above active, run the installed entry point:

poolprobe selfcheck

Expected output:

poolprobe selfcheck ok

A pass exits 0; a failed selfcheck exits 1. Keep Python assertions enabled (do not use python -O). The equivalent checkout command is python -m poolprobe selfcheck.

This runs built-in synthetic checks for chain rules, prune guards, argv redaction, terminal/JSON/HTML rendering and atomic writes. It needs no API key, gateway, user config or saved state. The atomic-write check creates and cleans its own temporary directory; no report or config file should be kept from this run. A pass does not establish live gateway/model availability or validate a real YAML config. No cliproxy extra is needed for these checks.

Next safe step: poolprobe --help lists commands without sending requests. See the existing contribution checks for the module/installed-entry and optional-adapter check sequence.

Live gateway examples — not offline checks

The examples below are a separate operational path, not the first-run check. ping contacts the gateway even though it sends no chat request; sweeps, benchmarks and pruning without --apply can send model requests and incur charges. --apply guards config changes, not network access. Review commands and all five prune guards before using an authorized gateway. Do not run these examples as an offline test.

# 1. Is the gateway even up, and what does it publish? (no chat request sent)
poolprobe ping -u http://127.0.0.1:8317/v1 -k "$KEY"

# 2. Probe the whole pool, burst-confirmed, and keep a self-contained HTML report
poolprobe sweep -u http://127.0.0.1:8317/v1 -k "$KEY" --html out.html

# 3. Give it memory: fail streaks across runs are what make `prune` safe
poolprobe sweep -u ... -k "$KEY" --state ~/.cache/poolprobe.json

# 4. Probe and plan candidates; only config writes require --apply
poolprobe prune -u ... -k "$KEY" --state ~/.cache/poolprobe.json \
                --adapter cliproxy --config ~/.config/gateway.yaml

# 5. Validate agent fallback chains against the lane rules that actually read them
poolprobe chains ~/.hermes/config.yaml --cross-check -u ... -k "$KEY"

-u also reads POOLPROBE_BASE_URL; -k reads POOLPROBE_API_KEY then OPENAI_API_KEY; --state reads POOLPROBE_STATE. The bearer key is masked in every argv echo — reports are meant to be pasted into issues.

What a sweep looks like

poolprobe 1.1.0  ·  sweep
http://127.0.0.1:8317/v1 · generic adapter (read-only)

5 models  ·  4 alive  ·  0 starved  ·  1 dead  ·  0 prunable  ·  median 5.43s  ·  run #1

VERDICT       MODEL                PROVIDER   LAT      BURST  STREAK  KIND        NOTE
------------  -------------------  ---------  -------  -----  ------  ----------  --------------------
OK            gpt-5.4              -            2.74s  ✓         ok1  -           alive
OK            gemini-3.8-flash     -            6.12s  ✓         ok1  -           alive
OK            grok-4.6             -           27.3s   ✓         ok1  -           alive
ERR           suno-music           -            0.13s  ✗          x1  CREDENTIAL  {"error":{"message"…
OK            deepseek-v4-flash    -            4.73s  ✓         ok1  -           alive

prunable: none — nothing met all five guards (dead, PERMANENT, streak, unprotected, chat modality)

what to do
  CREDENTIAL (1): credential or account level: rotate/top up the key, never prune the model

grok-4.6 answering OK here is the whole point: a prior single-shot check had written it off as dead. The burst said otherwise.

Commands

Command What it does Sends a chat request?
ping Reach the gateway, list the published catalog, break it down by provider. no
sweep [models…] Burst-confirmed liveness probe; one verdict + kind per model. yes
bench [models…] Latency and throughput; --repeat N reports the median, --stream measures time-to-first-token. yes
prune [models…] List models that passed all five guards and plan the config edit. --apply writes it (previous copy kept as .bak). yes
chains PATH Validate agent fallback chains against the lane rules that read them. --cross-check diffs rungs against the live catalog. no
selfcheck Offline assert suite — taxonomy, burst logic, prune guards, argv redaction, all three renderers. This is what CI runs. no

Common options: --adapter {auto,cliproxy,generic}, --config PATH, --threads N, --timeout S, --max-tokens N, --prompt TEXT, --state PATH, --streak-min N, --protect MODEL (repeatable), --json PATH, --html PATH, --color {auto,always,never}, -q/--quiet.

--max-tokens is a floor, not a cap: a reasoning model spends it on thinking and answers EMPTY-LENGTH, which poolprobe reads as alive but starved, never as dead.

Exit codes

A cron contract. Red is a finding, not noise.

Code Meaning
0 Nothing dead — or nothing that met every guard.
1 Something dead (burst-confirmed), or a fallback chain is broken.
2 Usage error, unreadable config, or PyYAML missing for a config read.
3 The gateway could not be reached, or published an empty catalog.
130 Interrupted.

The five prune guards

prune will not name a model unless all five agree. A report that says "prunable" while the prune cycle deletes something else is the worst outcome for a tool like this, so the guards live in one function, checked in one place:

  1. dead verdict — EMPTY, ERR, or TIMEOUT (OK/EMPTY-LENGTH never qualify);
  2. kind PERMANENT — the upstream does not know this model;
  3. fail streak — dead for at least --streak-min consecutive runs (needs --state);
  4. not protected — absent from --protect (a namespaced alias's base name matches too);
  5. not a generation modality — image/video/tts/music models legitimately fail a chat probe.

Without --state there is no memory, every streak reads 0, and guard 3 can never pass — so prune lists candidates but changes nothing. That is the safe default.

Reading a report

Verdict — what the probe saw:

OK · EMPTY (200, empty body) · EMPTY-LENGTH (empty because the token budget ran out — alive) · ERR (non-2xx) · TIMEOUT.

Kind — what it means:

Kind Reading Prunable?
ALIVE Answered. no
ALIVE-STARVED Answered EMPTY-LENGTH — raise --max-tokens. no
PERMANENT Upstream does not know this model (404, "does not exist"). yes
TRANSIENT Timeout, 429, 5xx — weather. Burst-confirm before believing it. no
CREDENTIAL 401/403, "invalid api key" — rotate the key, never the model. no
MODALITY Model lives on another endpoint (/v1/images/…), not chat. no
UNKNOWN None of the above; reported, never acted on. no

Three renderers, one report: the terminal table (ANSI, honours NO_COLOR / FORCE_COLOR / TERM=dumb / isatty), a machine-readable --json, and a self-contained --html you can attach to a post. They cannot disagree about what a run recorded.

Library use

from poolprobe import Gateway, sweep, taxonomy

gw = Gateway("http://127.0.0.1:8317/v1", api_key="local")
for result in sweep(gw, ["gpt-5.4", "glm-5.3-flash"], attempts=5):
    print(result.model, result.verdict, result.kind, result.advice)

Development

python -m poolprobe selfcheck   # the whole offline contract; CI runs exactly this

selfcheck needs no gateway, no network and no secrets. If it passes, the taxonomy, the burst "best truth wins" logic, the five prune guards, the argv redaction and all three renderers are behaving.

License

MIT — see LICENSE.

Metadata

Release files for poolprobe 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for poolprobe 1.1.0
File Size Uploaded Provenance Actions
poolprobe-1.1.0.tar.gz 62.9 kB Without provenance Details for poolprobe-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for poolprobe 1.1.0
File Interpreter ABI Platform Actions
poolprobe-1.1.0-py3-none-any.whl Python 3 none any Details for poolprobe-1.1.0-py3-none-any.whl

Total release size: 126.6 kB

Release files / poolprobe-1.1.0.tar.gz

Download URL poolprobe-1.1.0.tar.gz
Size 62.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f3a0e76f9fd3672361cc2b4dca8ec2c0c0338b71894ce4e92072a4e9491baab0
BLAKE2b-256 checksum
How to use checksums
eb925613a0d9b0ac8ada510893974b79cf7f77e687401796f8a1cd4b4ea34d78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release files / poolprobe-1.1.0-py3-none-any.whl

Download URL poolprobe-1.1.0-py3-none-any.whl
Size 63.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
714a8768bfc0d70e6574301ef696e022e852f304239ac5998583a11a0df1ef27
BLAKE2b-256 checksum
How to use checksums
8558a90e67f37988a85ff7289811b1e0c937f0ec050b0ef2cfceb032a2098f51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Security for poolprobe 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page