My Free AI Model Vanished, and I Hit My Limit by Lunch
How to keep AI-written summaries running on free tiers: find what's free today, never get billed by surprise, and stop paying twice for the same diff.
CBBuild a workflow on free AI tiers and two things will eventually happen to you.
First, the model you relied on changes. It gets renamed, retired, or moved behind a paywall, and your tool starts failing on a Tuesday morning for no reason you did anything about. Second, you hit the daily limit before lunch, because every time you re-ran the tool it sent the same unchanged code to the model again.
Neither is a bug in anyone's code. Both are what free tiers are like. What matters is whether your tooling makes them cheap to deal with.
1. Switching Providers Should Be an Edit to One File
gitaiflow has no built-in provider and no hard-coded model name. It reads four settings: AI_PROVIDER, AI_API_KEY, AI_BASE_URL and AI_MODEL. When a model disappears, you change a value, not your workflow.
Settings are resolved in this order, and the first one that sets a value wins:
- The real environment, such as variables exported in your shell or set by CI.
- A project
.env, found by walking up from the current folder to the repository root. - A global
~/.gitaiflow/config.env, which works from any repository.
# ~/.gitaiflow/config.env AI_PROVIDER=openrouter AI_API_KEY=your-key-here AI_BASE_URL=https://openrouter.ai/api/v1 AI_MODEL=<a model id from the list below>
Moving to Gemini, OpenAI or a local Ollama model is the same four values with different contents. A project .env overrides the global file for that repository only. And .env files are always skipped when gitaiflow builds a diff, so your key isn't part of what's sent.
2. Ask What's Free Today
Instead of guessing a model name from a blog post that is six months old, ask the provider:
gitaiflow --list-models --free-only
This reads OpenRouter's live model catalog and prints a table with each model's ID, its context size and a FREE column. It only lists models that accept text and return text, which is what gitaiflow needs, and where both the prompt price and the completion price are zero. Add --json for the raw data.
ID CONTEXT FREE example-vendor/example-model:free 131072 yes
That output is illustrative. The real list changes, which is the point. Be aware of the limit: this works only against OpenRouter-compatible endpoints. Other providers don't publish a live pricing catalog, and gitaiflow doesn't carry a hard-coded list of "free" models, because it would go stale and mislead you.
3. Never Get Billed by Surprise
Before it sends anything, gitaiflow checks the model you configured against the live OpenRouter catalog. It stops in two cases: the catalog confirms the model has a price, or the model can't be confirmed free at all, for example because the catalog is unreachable or the ID isn't listed.
Treating "can't confirm" like "paid" is deliberate. A typo, or dropping the :free suffix from a model ID, can quietly resolve to the paid version of the same model if your account has credit.
When you do want a paid model, say so with --allow-billing:
gitaiflow --path . --change-summary --allow-billing
The flag skips the pre-flight check. For other providers such as Gemini, OpenAI or Ollama, gitaiflow can't verify pricing at all, so it prints a reminder to check your own billing, and --allow-billing silences that reminder. It doesn't make anything free; it only records that you've decided.
4. Stop Paying Twice for the Same Diff
This is what keeps a free quota alive. For each group of files, gitaiflow computes a SHA-256 hash of the exact diff it's about to send and compares it with the diff it last summarized for that group. If they match, and the earlier summary file is still there and valid, the AI call is skipped and the earlier summary is reused.
The record is kept in change-summary/.cache, and it doesn't expire by date. A diff you summarized last Tuesday is still a hit today.
Because matching is per group, changing one folder re-sends only that folder. To force a fresh answer anyway, for example after trying a different model, use --regenerate-summary.
5. Know Where You Stand
gitaiflow --usage shows the estimated tokens in and out, duration and outcome of your recent runs, read from a local log that is never transmitted. You can also set soft limits in your environment:
export GITAIFLOW_MAX_RUNS_PER_DAY=40 export GITAIFLOW_MAX_TOKENS_PER_DAY=200000
These produce a warning when reached. They're a courtesy check against your own local log, not enforcement, and the token counts are estimates, so keep them well under your provider's real limit.
When the provider's own daily quota runs out, gitaiflow doesn't keep retrying, because waiting a few seconds can't help. Switch to another free model, or come back after the quota resets.
Want the Full Picture?
This post covers provider switching, cost guard-rails and caching. Provider-specific setup is in the gitaiflow documentation ↗.
What I'd Tell You If You Depend on Free Tiers
- Treat model names as configuration, not code. The one you rely on today will change, so make changing it a one-line edit.
- Make the safe path the default and the paid path a deliberate flag. If an unverifiable model is blocked by default, a typo can't cost you money.
- Recognize repeated work by its content, not by the date. A cache keyed on the exact input saves the most quota on the days you changed the least.