Features
- Model selection & presets
- Automatic model selection (
--model auto, now the default):- Chooses models based on input kind (website/YouTube/file/image/video/text) and prompt size.
- Skips candidates without API keys; retries next model on request errors.
- Adds OpenRouter fallback attempts when
OPENROUTER_API_KEYis present. - Shows the chosen model in the progress UI.
- Named model presets via config (
~/.summarize/config.json→models), selectable as--model <preset>. - Built-in preset:
--model free(OpenRouter:freecandidates; override viamodels.free).
- Automatic model selection (
- OpenRouter free preset maintenance
summarize refresh-freeregeneratesmodels.freeby scanning OpenRouter:freemodels and testing availability + latency.summarize refresh-free --set-defaultalso sets"model": "free"in~/.summarize/config.json(so free becomes your default).
- CLI models
- Add
--cli <provider>flag (equivalent to--model cli/<provider>). --cliaccepts case-insensitive providers and can be used without a provider to enable CLI auto selection.
- Add
- Content extraction
- Website extraction detects video-only pages:
- YouTube embeds switch to transcript extraction automatically.
- Direct video URLs can be downloaded + summarized when
--video-mode auto|understandand a Gemini key is available.
- Website extraction detects video-only pages:
- Env
.envin the current directory is loaded automatically (so API keys work without exporting env vars).
Changes
- CLI config
- Auto mode uses CLI models only when
cli.enabledis set; order follows the list. cli.enabledis an allowlist for CLI usage.
- Auto mode uses CLI models only when
- OpenRouter
- Stop sending extra routing headers.
--model free: when OpenRouter rejects routing with “No allowed providers”, print the exact provider names to allow and suggest runningsummarize refresh-free.--max-output-tokens: when explicitly set, it is also forwarded to OpenRouter calls.
- Refresh Free
- Default extra runs reduced to 2 (total runs = 1 + runs) to reduce rate-limit pressure.
- Filter
:freecandidates by recency (default: last 180 days; configurable via--max-age-days). - Print
ctx/outinkunits for readability.
- Defaults
- Default summary length is now
xl.
- Default summary length is now
Fixes
- LLM / OpenRouter
- LLM request retries (
--retries) and clearer timeout errors. summarize refresh-free: detect OpenRouter free-model rate limits and back off + retry.
- LLM request retries (
- Streaming
- Normalize + de-dupe overlapping chunks to prevent repeated sections in live Markdown output.
- YouTube
- Prefer manual captions over auto-generated when both exist. Thanks @dougvk.
- Always summarize YouTube transcripts in auto mode (instead of printing the transcript).
- Prompting & metrics
- Don’t “pad” beyond input length when asking for longer summaries.
--metrics detailed: fold metrics into finish line and make labels less cryptic.
Docs
- Add documentation for presets and Refresh Free.
- Add a “make free the default” quick start for
summarize refresh-free --set-default. - Add a manual end-to-end checklist (
docs/manual-tests.md). - Add a quick CLI smoke checklist (
docs/smoketest.md). - Document CLI ordering and model selection behavior.
Tests
- Add coverage for presets and Refresh Free regeneration.
- Add live coverage for the
freepreset. - Add regression coverage for YouTube transcript handling and metrics formatting.