Log in·Sign up
BestRelay

Back to the Journal

Predictable AI Spending Starts With Smaller Decisions

A team’s AI bill becomes unpredictable when small decisions remain invisible: an assistant reads another document, an agent retries a failed task, or a conversation carries yesterday’s context into today’s request. Predictability starts with making those decisions measurable. Follow these steps to turn a monthly spending target into operating rules that developers can use.

Step one gives every workflow a spending owner

List the workflows that generate requests, such as coding assistance, customer support drafts, document extraction, and internal research. Assign each an owner and a monthly allowance. Separate experiments from established workloads so a promising prototype cannot quietly consume the support team’s allocation.

Then choose a useful unit of work: one resolved support case, one processed document, or one completed coding task. Track cost per completed unit alongside total spending. Request counts alone conceal expensive differences between short exchanges and tasks that repeatedly send large contexts.

Step two measures the complete cost per task

Run a representative sample before setting permanent limits. Include ordinary tasks, difficult cases, and failures. Record input tokens, output tokens, cache reads, cache writes, and every additional request generated by tools or retries. Attribute the full sequence to its originating task.

BestRelay bills on a pay-as-you-go basis using token counts reported by the provider, with cache reads and writes priced separately. Keep those categories separate in your estimates, applying the relevant rate to each. Check the provider’s accounting definitions so cached tokens are not accidentally counted twice.

Calculate both the average task cost and a high-cost percentile, such as the ninety-fifth percentile. The average supports forecasting; the upper range reveals workloads that need tighter boundaries. Record successful completion rates too, because cheap failures can make a workflow appear efficient.

Step three fixes model choices before comparing costs

Choose a model for each workflow using a small evaluation set with clear acceptance criteria. A routine extraction task might warrant testing Gemini 2.5 Flash, while a demanding coding workflow could justify evaluating Claude Sonnet 5.5. Measure total cost per accepted result, including corrections and retries.

This comparison requires consistent routing. BestRelay forwards each request to the official model named in it without substitution. Keep the requested model stable during measurement, and treat a model change as a new experiment. Otherwise, a spending decrease may reflect different behavior rather than improved efficiency.

Step four places limits around expensive behavior

Give every workflow explicit limits for output length, agent turns, retries, and concurrent tasks. Set these from observed needs, then measure their effect on completion quality. Long outputs and repeated attempts should have a reason to continue.

Use spending alerts at several thresholds, with an owner responsible for responding. An alert alone does not enforce a budget. Where your application supports it, add a spending gate that checks remaining allowance before starting work and reserves room for requests already running. For strict limits, account for reporting delays and concurrent activity.

BestRelay works with Claude Code, Codex, Gemini CLI, and OpenAI SDK clients. Across those entry points, maintain a shared usage ledger while preserving team and workflow attribution. Create a BestRelay account to measure a small pilot against these limits.

Step five validates caching against actual reuse

Identify stable instructions and reference material that recur across requests. Where the selected model supports caching, arrange eligible content consistently and measure actual cache reads. Estimate savings after including write charges, expiry, and refreshes. A large reusable prompt only helps the budget when subsequent requests reuse it.

Also remove stale conversation history and irrelevant retrieved text. Compare task quality before and after trimming. Smaller contexts can reduce spending, but removing essential evidence can trigger extra attempts that erase the saving.

Step six turns weekly evidence into forecasts

Each week, forecast monthly spending from expected task volume and observed cost per completed task. Add a reserve based on your measured variation, then compare the forecast with the allowance. Investigate changes in volume, context size, retries, and completion rates separately.

Keep referral income separate from operating costs. BestRelay members earn a commission when invited users top up, but that income should not justify a larger recurring workload. Update allowances when the evidence supports a change, and give owners a clear action when their forecast exceeds the budget.

Want to try the models discussed here? Sign up