refresh-free

A command that checks OpenRouter's free AI models, tests candidates with a small benchmark, and saves working models to the Summarize configuration.

In plain words
What is it for?
Use it to refresh the models available through `--model free`, rank candidates, and optionally make `free` the default model.
Why use it?
It removes the need to manually choose a free model and can keep a short list of models that pass the test.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/steipete/summarize/refresh-free
Clone the repo
git clone --depth 1 https://github.com/steipete/summarize
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 727 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00727
Opus 5 $0.00000 $0.00364
Sonnet 5 $0.00000 $0.00145
Haiku 4.5 $0.00000 $0.00073

Measured 2d ago against content hash b1ce11735cd1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

refresh-free scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/commands/refresh-free.md · 84 lines

How it starts

The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.

summarize refresh-free

summarize refresh-free [--runs 2] [--smart 3] [--min-params 27b]
                       [--max-age-days 180] [--set-default] [--verbose]

Probes OpenRouter's catalog for :free models, runs them on a small benchmark, and writes the working ones to models.free in ~/.summarize/config.json. Useful when you want to use --model free without picking a specific OpenRouter slug.

Needs OPENROUTER_API_KEY in the environment.

What it does

  1. Pulls the OpenRouter model catalog.
  2. Filters to models tagged :free that meet --min-params and --max-age-days.
  3. Runs each candidate --runs times against a sanity prompt; ranks by --smart heuristics (latency, completion length, refusal rate).
  4. Writes the survivors to models.free in ~/.summarize/config.json.
  5. With --set-default, also sets top-level model to free.

After the run, summarize "https://example.com" --model free rotates through the saved list until one succeeds.

Flags

--runs <n> : How many times to probe each candidate. Default 2.

--smart <n> : How many top candidates to keep. Default 3.

--min-params <size> : Minimum parameter count. Accepts 7b, 27b, 70b, etc. Default 27b.

--max-age-days <n> : Reject models older than N days based on OpenRouter's metadata. Default 180.

--set-default : Also set model: "free" at the top level of ~/.summarize/config.json.

--verbose : Per-candidate progress, timings, and rejection reasons on stderr.

Examples

# Quick refresh; keep the best 3 free models ≥27B, ≤180d old.
summarize refresh-free

# Looser filter — accept smaller / older models.
summarize refresh-free --min-params 7b --max-age-days 365

# Refresh and also set the default model.
summarize refresh-free --set-default

# Verbose ranking output for debugging.
summarize refresh-free --runs 3 --smart 5 --verbose

Output

~/.summarize/config.json is updated in place. The relevant section ends up looking like:

Read the full file on GitHub · 84 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 84 lines · 0 tokens per session scan A b1ce11735cd1

Subscribe to this mod's changes

refresh-free is a command published in the GitHub repository steipete/summarize (6,588 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 727 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.