Put fit checks in the path.

Run the same auditable memory verdict before CI, a model pull, or an agent recommendation. Pick the boundary you control and copy the exact contract.

Local preflight · JSON with evidence
npx fitllm "Gemma 4 12b" --detect --json --why

{
  "verdict": "yes",
  "basis": {
    "attention": { "kind": "sliding-window" },
    "limitations": ["not a speed prediction"]
  }
}

Choose the boundary you control.

Every path returns or embeds the same FitLLM calculation. No login is required. Unsupported architecture and hardware inputs stop instead of borrowing a nearby answer.

Gate CI before artifacts arrive

The composite Action runs from the tagged engine repository and preserves the CLI result. Set exactly one of gpu or mac.

exit 0
FITS or TIGHT — continue.
exit 1
WON’T FIT — stop the job.
exit 2
Invalid or unsupported input — fix the request.
GitHub Actions
permissions:
  contents: read
steps:
  - id: preflight
    uses: click6067-ship-it/fitllm-engine@v2.9.0
    with:
      model: Gemma 4 12b
      gpu: RTX 4090
      ctx: '8192'

Read this machine locally

--detect reads supported local adapters. --why adds model structure, hardware evidence, memory inputs, assumptions, and limitations without changing the verdict.

Remote agents and websites cannot detect your local hardware. Run this command on the machine, then pass its JSON to the agent.

Local agent input
npx fitllm "Gemma 4 12b" --detect --json --why

Make the pull conditional

Shell chaining turns the memory verdict into a download boundary. The runtime command executes only after FitLLM returns exit 0.

Ollama
npx fitllm "Gemma 4 12b" --detect && ollama pull gemma4:12b
llama.cpp
npx fitllm "Llama-3.1-8B-Instruct" --detect && llama-cli -m ./Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf

Give agents a callable contract

Use REST for one request or connect the read-only Streamable HTTP MCP server. The OpenAPI description and citation recipe define the machine-facing behavior.

Read the citation recipe →
REST
curl --get 'https://fitllm.run/api/check' \
  --data-urlencode 'model=Gemma 4 12b' \
  --data-urlencode 'gpu=RTX 4090' \
  --data-urlencode 'format=md'
MCP
{
  "mcpServers": {
    "fitllm": { "url": "https://fitllm.run/api/mcp" }
  }
}

Answer the model-card question

A Shields endpoint keeps the verdict outside your prose and recomputes it when the engine changes. Link the badge to a receipt or calculator page.

Markdown badge
![fits](https://img.shields.io/endpoint?url=https%3A%2F%2Ffitllm.run%2Fapi%2Fbadge%3Fmodel%3DGLM-4.7-Flash%26gpu%3D4090)