Skip to main content

check_LLM

Pre-flight connectivity checks for the n8n + Ollama training stack. Run this before a training session to catch VPN/firewall/proxy problems that would otherwise derail the day — before participants start blaming n8n or Ollama for what's actually a blocked outbound connection.

Setup

There are two ways to run check_LLM:

  • Local dev clone — for anyone editing checks.toml/course profiles or working on the code itself. Clone the repo, cd into it, then:

    Copy-Item .env.example .env
    # edit .env: set GEMINI_API_KEY / OPENAI_API_KEY / OPENROUTER_API_KEY
    # (only needed for profiles that include the gemini/openai/openrouter checks)
    uv run dc-preflight-llm-check
    
  • Zero-clone, straight from PyPI — for a participant who just wants to run the pre-flight checks, no git required:

    uvx dc-preflight-llm-check
    

    With no local checks.toml, this uses a bundled default profile set (api-only/n8n-ollama/ollama-only — same as the repo's). Drop your own .env/checks.toml in whatever directory you run this from to customize either; dc-preflight-llm-check reads/writes .env, checks.toml, and check_log.txt relative to your current directory, not wherever the tool itself is installed.

  • Windows, no terminal comfort needed — just double-click check_script.bat. The first time, it asks for your API keys and saves them to a .env next to itself; every run after that reuses the saved keys automatically, no prompts. It also checks network connectivity and installs uv if it's missing before running dc-preflight-llm-check.

Profiles and flags

Which checks run is controlled by checks.toml, which defines named profiles — e.g. api-only runs network, uv, gemini, openai, openrouter. dc-preflight-llm-check's no-flag default is checks.toml's default_profile (currently api-only).

  • --profile NAME — run a specific named profile instead of the default
  • --checks a,b,c — run an explicit, comma-separated list of checks, overriding both --profile and checks.toml; handy for testing one or two checks without editing the config
  • --config PATH — use a checks.toml file at a non-default location
  • --list-profiles — print the profiles defined in checks.toml and exit

Examples:

uv run dc-preflight-llm-check --profile api-only
uv run dc-preflight-llm-check --checks network,uv
uv run dc-preflight-llm-check --list-profiles

The network check always runs first regardless of the order it's listed in, since every other check's failure is ambiguous without first knowing whether outbound internet works at all.

Reading the output

Each check prints one [PASS]/[FAIL] line as it runs, followed by an aggregate summary line, e.g.:

[PASS] network: reached https://www.google.com
[FAIL] gemini: GEMINI_API_KEY not set in .env — skipped network call
[PASS] openrouter: OpenRouter API reachable, key accepted
[PASS] uv: uv reached the package index
SUMMARY: 3/4 passed — FAILED: gemini

dc-preflight-llm-check exits 0 if every check passed, 1 if one or more checks ran and failed, and 2 if a config problem (an unknown --profile, or a missing/malformed checks.toml) stopped checks from running at all.

Every run also appends a timestamped block to check_log.txt (same content as the screen output) — paste this file when asking for help instead of re-describing what happened. It accumulates across runs rather than being overwritten, so a retry history is preserved; it's gitignored since it's a local runtime artifact, not something to commit.

Running a single check standalone

Every check_*.py under src/check_llm/ is independently runnable and follows the same contract — prints its [PASS]/[FAIL] line, appends to check_log.txt, and exits 0/1. This only works from a local dev clone (these aren't published as separate PyPI commands):

uv run src/check_llm/check_network.py
uv run src/check_llm/check_gemini.py

Running the test suite

uv run python -m unittest discover tests

This runs the full suite of unittest.mock-based tests accumulated so far — _common.py's helpers, main.py's orchestration logic, and the network/gemini/openai/openrouter/uv checks — with no real network calls and no third-party test framework. Docker-related checks and their tests aren't part of this repo yet; see PLAN.md Stage 8.

Metadata

Release files for dc-preflight-llm-check 0.2.1

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

Source distribution (sdist)

Source distribution for dc-preflight-llm-check 0.2.1
File Size Uploaded Provenance Actions
dc_preflight_llm_check-0.2.1.tar.gz 9.9 kB Without provenance Details for dc_preflight_llm_check-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dc-preflight-llm-check 0.2.1
File Interpreter ABI Platform Actions
dc_preflight_llm_check-0.2.1-py3-none-any.whl Python 3 none any Details for dc_preflight_llm_check-0.2.1-py3-none-any.whl

Total release size: 25.3 kB

Release files / dc_preflight_llm_check-0.2.1.tar.gz

Download URL dc_preflight_llm_check-0.2.1.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
07a8111889623ca8f5c44a70b5ccbe0d18647884e08033b3490b9f4e6d2505d5
BLAKE2b-256 checksum
How to use checksums
249cb5d7fc97e99466da666db31aa252bba3b57f5a41e27e2f71b928125b3e9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"26.05","id":"yarara","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / dc_preflight_llm_check-0.2.1-py3-none-any.whl

Download URL dc_preflight_llm_check-0.2.1-py3-none-any.whl
Size 15.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
788da894aaed2790e145ac413df14620893848ed30899ec3c2cdbfd21826788b
BLAKE2b-256 checksum
How to use checksums
c643de5408d23219a075a1ab10f8f4f642b043cfa6a1c0884a30c4e6672dfe7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"26.05","id":"yarara","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for dc-preflight-llm-check 0.2.1

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