Shipping the Berlin API Patch with a Heavy Codex Habit
The Berlin deadline made token waste visible
Our small team in Berlin started using Codex for nearly every API change: locating unfamiliar code, drafting tests, reviewing diffs, and fixing failed builds. The productivity gain was real, but so was the growing usage bill. The problem was not one enormous request. It was dozens of ordinary sessions carrying large amounts of repeated context.
This is the first important idea behind pay-as-you-go AI: you are usually paying for what goes into a request as well as what comes out. A short question attached to a large repository snapshot can cost more than a detailed question about one file. Long conversations also accumulate history, so a session that felt efficient to a developer could become expensive by the afternoon.
Separating Codex work by difficulty
We stopped treating every task as if it needed the most capable model. Before starting a session, we classified the work into three simple groups:
- Small edits, renaming, test scaffolding, and straightforward explanations.
- Multi-file changes where the model needs to understand project structure.
- Risky migrations, debugging with incomplete evidence, and final code review.
The first group uses a lighter option when it is suitable. For example, DeepSeek V4 Flash can be a practical choice for routine assistance, while GPT-6.1 Sol is reserved for work where stronger reasoning is worth the additional spend. The exact choice depends on your codebase and results, but the principle is broadly useful: match model capacity to task difficulty instead of using one default for everything.
Reducing the context attached to every request
Context is useful only when it helps the model make a better decision. We changed our Codex routine so that each session begins with a narrow working set. We point it at the relevant package, include the failing test or error message, and name the expected behavior. We do not automatically attach the entire repository.
We also ask for a plan before requesting a large implementation. A short plan can reveal that the task is actually a one-file fix. When a change spans several files, we provide a compact project map rather than pasting full files that are unrelated to the request. After a successful change, we start a fresh session for the next task instead of carrying every previous message forward.
Putting a spending limit around a daily habit
A heavy user needs a budget that is visible before the month ends. Set a daily or weekly allowance, then review usage at the same time each week. Look for patterns rather than blaming individual prompts:
- Which repositories generate the largest requests?
- Which tasks repeatedly require retries?
- Are long sessions producing better results than short sessions?
- Is a premium model being used for routine edits?
Keep a small reserve for release days and incidents. A budget that leaves no room for an urgent production fix encourages poor decisions, such as disabling useful checks or abandoning a needed review.
Using one relay for a portable Codex setup
RelayVano is a pay-as-you-go relay for Codex, Claude Code, Gemini CLI, and OpenAI-compatible SDKs. Its API base is https://api.relayvano.com, so the same general workflow can fit local scripts, editor tools, and CI experiments without committing to a large fixed plan. That makes it easier to test a model for a specific job and keep spending connected to actual use.
For a developer meeting this idea for the first time, the practical sequence is simple: connect the client, choose a model appropriate to the task, watch usage, and adjust prompts when context grows faster than value. Sign up for RelayVano when you want to try that pay-as-you-go workflow with your existing Codex habit.
The weekly review that kept our patch work affordable
Every Friday, we review the requests behind the week’s changes. We keep prompts that produced clean patches, shorten instructions that repeat information, and record which model handled each category well. This turns cost control into a normal engineering feedback loop rather than a last-minute billing surprise.
A heavy Codex habit does not need to disappear to become affordable. Smaller working sets, fresh sessions, task-based model selection, and a visible spending limit preserve the speed while removing the quiet waste that accumulates in long, automatic workflows.