C
Aider logoAiderAbsolute-cheapest coding assistant

Aider Cheapest Gemini Flash

Marcus Tran@penny_dev
72.0Overall score

About as cheap as agentic coding gets, with Gemini 2.5 Flash handling small scoped edits for fractions of a cent. Pass rate is modest, so it shines for boilerplate and trivial fixes rather than hard logic.

72.0Score
884Votes
4Components
4dUpdated

Install this build

Export
terminal
npx setuproll add aider-cheapest-gemini

Components

Model

  • Gemini 2.5 Flash

MCP servers

  • filesystem
  • git

Hooks

  • post-edit: auto-commit

Rules

  • Tiny scoped edits only
  • Escalate to Pro when it stalls
  • Use repo map to stay grounded
Setup

I code with AI for two cents a task and I am not even slightly sorry

Aider plus Gemini 2.5 Flash, bring your own free key, repo map on, auto-commit on. The whole setup, the config files, and the screenshot of a billing dashboard that still reads under a dollar.

penny_dev8 min read2026-06-18

Every few weeks somebody on a Discord I lurk in posts their monthly AI coding bill like it is a badge of honor. Eighty bucks. Two hundred. One guy bragged about four hundred dollars in a single month on a fancy agent rig and people clapped. I sat there on my 2017 ThinkPad and did the math on what I had spent that same month. It was forty one cents. Forty one. I screenshotted my dashboard, did not post it, and quietly felt amazing.

This is the setup that gets me there. It is Aider running in the terminal, pointed at Gemini 2.5 Flash, with my own free API key. No subscription. No seat license. No IDE that wants nine gigs of RAM to autocomplete a function. Two MCP servers, one git hook, three rules I actually follow. If you have ever felt a little sick watching tokens drain while a model rewrites a file you did not ask it to touch, this is for you.

The honest pitch
Gemini 2.5 Flash is not the smartest model on the board. It is around the cheapest one that can still reliably make a small, correct edit. The trick is never asking it to do big things. Small scope, repo map on, escalate only when it is truly stuck. That is the whole game.

Why Aider and not the shiny stuff

Aider is free and open source. It talks to whatever model you give it a key for, it lives in your terminal, and it commits its own changes to git so you always have an undo. That last part matters more than it sounds with a cheap model. Flash will occasionally do something dumb, and when it does I just type git reset --hard HEAD~1 and move on. No drama, no lost work.

The other tools are fine. Cursor is genuinely nice. But Cursor wants twenty dollars a month before I have typed a single prompt, and the whole point of me is that I will not pay twenty dollars a month for anything I can do with a free key and a config file. Aider charges me nothing. Google's free tier covers most of my day. The pennies I do spend are real usage, not rent.

Aider DocumentationThe official docs. Terminal pair programmer that wires any LLM to your local git repo, with auto-commits and a repo map. Read the model and repo-map pages first.aider.chat

The config that makes it cheap

Everything lives in one file at the repo root, .aider.conf.yml. This is the file. Not a stripped down version, the actual thing I commit. The lines that save me money are the model line, the repo map, and the context limits.

.aider.conf.yml
# .aider.conf.yml  (lives at repo root, committed)
# This is the whole reason my bill is two cents a task.

# Cheap by default. Flash for everything.
model: gemini/gemini-2.5-flash

# I bring my own key, free tier from Google AI Studio.
# export GEMINI_API_KEY=... in my shell, never in here.

# Auto-commit every edit so I can git reset when Flash goes sideways.
auto-commits: true
attribute-author: false
attribute-committer: false

# Repo map is what keeps a cheap model grounded. Do not skip this.
map-tokens: 1024
map-refresh: auto

# Keep the context tiny. Tiny context = tiny bill.
cache-prompts: true
max-chat-history-tokens: 2048

# Lint after each edit, let me eyeball before I trust it.
auto-lint: true
lint-cmd: "eslint --fix"
auto-test: false
  • model: gemini/gemini-2.5-flash is the headline. Flash, always, until I say otherwise. Pro never loads unless I ask for it mid-session.
  • map-tokens: 1024 builds a tiny repo map so a small model knows what your codebase looks like without me pasting whole files in. Grounding for almost free.
  • max-chat-history-tokens: 2048 is me being ruthless. A short memory means a cheap prompt. If a task needs more history than that, it is too big and I should split it.
  • auto-commits: true is my safety net. Every edit becomes a commit, so a bad Flash answer is one reset away from gone.
Watch your context, that is where the money goes
People think the model price is the bill. It is not. The bill is tokens, and tokens are mostly context you forgot you were sending. A huge chat history on a cheap model can cost more than a short prompt on an expensive one. Keep the window small and Flash stays in fractions of a cent.

I also keep a .aider.model.settings.yml so the edit format is locked to diffs (cheaper and safer than whole-file rewrites) and so Pro is defined but not used until I call it. This is the escalation hatch from rule two.

.aider.model.settings.yml
# .aider.model.settings.yml
# When Flash gives up on a hard file, /model swaps me to Pro for
# that one message, then I switch back. I never sit on Pro.

- name: gemini/gemini-2.5-flash
  edit_format: diff
  use_repo_map: true
  send_undo_reply: false
  examples_as_sys_msg: true

- name: gemini/gemini-2.5-pro
  edit_format: diff
  use_repo_map: true
  # only loaded on demand with /model, see the escalation rule

Two MCP servers, no more

I run exactly two MCP servers: filesystem and git. That is on purpose. Every server you add throws its tool definitions into the context window, and I just spent a whole section telling you context is money. Filesystem lets Flash read and write within the project. Git lets it see history and stay oriented. I do not need a browser, a database driver, or six SaaS connectors to rename a variable.

.aider.conf.yml (mcp section)
# .aider.conf.yml  (mcp section)
# Two servers, that is it. Files and git. Anything fancier is just
# tokens I am paying for and tokens are money.

mcp-servers:
  filesystem:
    command: npx
    args: ["-y", "@modelcontextprotocol/server-filesystem", "."]
  git:
    command: uvx
    args: ["mcp-server-git", "--repository", "."]
If a server is not earning its keep, cut it
I tried a couple of fancier MCP servers when I started. After a week I checked which tools Flash had actually called. Two of them: read file and git log. Everything else was dead weight I was paying tokens to describe. So I deleted them. Be a miser about this.

One hook: commit every edit

There is exactly one piece of automation in this build, and Aider gives it to me for free: auto-commits. After every edit it makes, Aider stages and commits with a generated message. I do not write a hook script for this, I just leave the flag on. It is the cheapest insurance there is. When Flash hands me garbage, the previous good state is already a commit behind it.

zsh - aider auto-commit
$cheap
alias -> aider --model gemini/gemini-2.5-flash
Aider v0.86 Model: gemini/gemini-2.5-flash Repo-map: 1024 tokens
$add a null check to formatPrice() in src/utils/money.ts
Edited src/utils/money.ts
Commit a91f4c2 fix: guard formatPrice against null amount
Tokens: 1.2k sent, 180 received. Cost: $0.0008 session.
less than a tenth of a cent. this is the whole feeling.
$

I launch it through a shell alias so I never accidentally start on an expensive model. Muscle memory protects the wallet.

~/.zshrc
# ~/.zshrc
# How I actually launch it. Note: no Pro anywhere by default.
alias cheap='aider --model gemini/gemini-2.5-flash --no-auto-test'

# The one I run 95% of the time. Flash, repo map on, auto-commit on.
# When it stalls twice on the same file I type /model gemini/gemini-2.5-pro,
# get the one fix, then /model gemini/gemini-2.5-flash to go cheap again.

The three rules I actually live by

A cheap model is a sharp tool with a short handle. The rules are not about ethics or code style, they are about keeping Flash inside the box where it is reliable. Break them and the pass rate falls off a cliff and you start re-running tasks, which costs more than just using a better model in the first place.

  1. Tiny scoped edits only. One function, one bug, one rename. The moment a request spans five files I split it into five prompts. Flash nails small things and flails at big ones.
  2. Escalate to Pro when it stalls. If Flash whiffs the same edit twice, I type /model gemini/gemini-2.5-pro, get the single fix, then drop straight back to Flash. I am on Pro for one message, not one session.
  3. Use the repo map to stay grounded. I never paste whole files when the map can carry the context for a fraction of the tokens. The map is the cheapest grounding you will ever buy.
Google AI Studio - Billing - June
Project: penny-dev-default Tier: Free + pay-as-you-go
gemini-2.5-flash 2,140 requests $0.31
gemini-2.5-pro 18 requests $0.10 (escalations)
-----------------------------------------------
Total billed this month .................. $0.41
Budget alert at $5.00 ............. (never fired)
My month so far. Yes I screenshot this. Yes I am proud of it.
Where it actually shines
Boilerplate, small bug fixes, renames, adding a guard clause, writing a quick test, converting a config. The stuff that is annoying to type but not hard to think about. That is 80% of my day and Flash eats it for pennies. Hard architectural reasoning is not its job, and I do not pretend it is.

The honest tradeoff, in a table

I am not going to sell you a fairy tale. This build sits in the C tier on the leaderboard for a reason. It is the cheapest thing that still works, not the best thing. Here is the real comparison so you can decide if your time is worth more than my forty cents.

What you care aboutThis build (Flash)A premium agent rig
Cost per task~$0.02$0.50 and up
First-try pass ratearound 66%90%+
Best atsmall scoped editswhole features
Monthly bill, my usageunder $1$80 to $400
Setup costfree, BYO keysubscription per seat

Two thirds of my tasks land on the first try for two cents. The other third I either reword, split smaller, or bounce to Pro for one message. I have run the numbers more than once. It is still cheaper than anything else by a mile.

me, defending this setup in yet another Discord argument

Watch it before you build it

If you have never seen Aider drive a terminal, these two are the quickest way to get the shape of it. First one is the official overview, second is a hands-on starter. Neither is about being cheap specifically, but both show the loop I am running.

What is Aider? AI Pair Programming in Terminal9:48
What is Aider? AI Pair Programming in Terminal· Aider AI
Getting Started with AIDER: AI Code Generation for Terminal Projects11:32
Getting Started with AIDER: AI Code Generation for Terminal Projects· Mervin Praison
modelcontextprotocol/modelcontextprotocolThe MCP spec and TypeScript schema. If you want to understand exactly what the filesystem and git servers are handing the model, start here. Free, like everything else I use.github.com

Steal it, it costs you nothing

Grab a free Gemini key from Google AI Studio, install Aider, drop in the config above, and you are running. Adding this build writes the .aider.conf.yml, the model settings, and the two MCP servers into your repo so you can start cheap on day one. Tune the rules to your own discipline and your bill will look like mine.

zsh - your repo
$npx setuproll add aider-cheapest-gemini
wrote .aider.conf.yml, .aider.model.settings.yml
configured 2 MCP servers (filesystem, git), auto-commits on
next: export GEMINI_API_KEY=... then run `cheap` and keep the prompts small
$

That is it. No subscription got harmed in the making of this build. Now go check your own dashboard and tell me you cannot beat four hundred dollars a month.

0 Reviews

Your rating
Sign in to post

Loading discussion...