Sunday, August 9, 2026
spot_img

Databricks cut AI coding costs by up to 90%: the case study

Databricks reduced its per-task AI coding costs by as much as 90% in some scenarios while pushing developer adoption up, using four stacked techniques: shifting default traffic to cheaper and open-source models, automating model selection through routing, giving every developer spend visibility with progressive friction instead of hard caps, and cutting token overhead through context pruning and cache tuning. The company published the full method on August 7, 2026, in a post by co-founder and VP of engineering Patrick Wendell with Akshat Bhatia, Vinay Gaba, Erich Elsen, and Ivan Zhou.

Who Databricks is in this story

Databricks is a San Francisco data and AI platform company whose engineering organization runs thousands of engineers on coding agents every day, mixing Claude Code, Codex, Cursor, and others, often several at once. Agentic coding has improved every velocity metric the company tracks, with order-of-magnitude output gains on some teams.

Coding agent spend became one of the fastest growing line items in R&D. Wendell told Axios in June 2026 that AI token costs were entering the top three expenses among Databricks customers, behind salaries and other IT costs, and that he had seen companies move from near-zero AI spend to tens of millions a month, including mistakes in the millions. A single runaway automation loop can burn a month of budget in an afternoon.

(The company also sells the tooling described below, important context for reading the numbers.)

The four levers

Lever 1: move traffic to the efficiency frontier. Roughly 50% savings or more.

The efficiency frontier (Databricks’ label for that curve) is the set of models offering the best price for a given level of capability, distinct from the intelligence frontier that labs compete on. Most day-to-day coding work does not require novel mathematical or security reasoning, so aggregate cost is set by the price of models that clear the quality bar for ordinary software engineering. That variable moves faster than peak intelligence, with better price-per-capability models arriving close to weekly.

Public coding benchmarks predict real-world performance poorly, so Databricks built an internal benchmark on its own multi-million-line codebase. GLM models scored competitively on price and performance, and GLM was rolled out to developers internally.

Evaluations often produce negative results, which is part of the discipline. Stripe found Opus 4.7 delivered no meaningful quality gain over Opus 4.6 at higher cost and declined to make it available internally. Databricks saw cost regressions comparing Opus 5.0 to Opus 4.8.

As of August 6, 2026, the internally recommended models for core software development were GLM 5.2, Opus 4.8, and GPT-5.6 Sol. Data and knowledge work runs on Genie One.

Capturing those wins requires harness flexibility. Proprietary frontier models are increasingly co-designed with specific harnesses, so a harness can become de facto lock-in to one model family. Two options exist: ask developers to switch harnesses when the company wants to move spend, which carries high individual switching costs, or run a meta-harness that presents one interface and dispatches to the harness underneath. Databricks defaults to the second through Omnigent.

Lever 2: dynamic routing. Roughly 30% savings.

Three routing patterns are in use. Request-level routing puts a stateful proxy between the harness and the models and sends each inference request to the lowest-cost model that can answer it, accounting for server-side caching because a cold cache hit on a large context is expensive. Task-level routing sends whole tasks to different harnesses based on complexity, so “rename this component” and “explore design options to reduce latency” land in different places. Escalation and delegation pairs an expensive model with a cheap one, either with the cheap model running the loop and escalating, as in Claude’s Advisor tool, or the expensive model running the loop and outsourcing pieces, as in Cognition’s Devin Fusion.

Named products in this category include Cursor Router, OpenRouter’s AutoRouter, Ramp’s Router, and Databricks’ own Smart Routing in Unity AI Gateway. Internal results show the Smart Router consistently reducing average task cost by more than 30% while roughly matching the quality of the most expensive model in the working set.

Lever 3: visibility, tripwires, and budgets. Roughly 10% savings.

Every company Databricks spoke with treats hard budget cutoffs as a last resort. Cutting a developer off mid-work damages productivity, and some of the heaviest spenders are the people getting the largest output gains from AI.

The replacement is a ladder. Developers see near-instantaneous spend feedback across all tools, often with tips on cheaper models. Spend gates arrive at rising thresholds, the simplest being self-clearing warnings. Above that, developers can be downshifted to a lower-cost model rather than suspended. Full suspension exists as a limit case and functions as the start of a conversation.

The internal implementation was documented separately on July 28, 2026, with illustrative rather than actual dollar figures. The original system used one monthly limit per engineer raised in fixed steps by ticket, and between 500 and 1,000 engineers were hitting it every month. Every increase was permanent, so one expensive month left an engineer with a high ceiling indefinitely.

The redesign splits the job in two. A small daily limit catches runaway spend, and at about 90% of it the engineer gets a Slack notification with their spend, their headroom, and one button that raises the limit by an increment. There is no cap on self-acknowledgements per day, the same raise is available from a CLI and an internal portal, and daily tiers reset at the start of each month. An unattended cron job cannot click a Slack button, which is the point of the human confirmation. A separate monthly limit governs extraordinary spend through a few coarse tiers, roughly 2x, 5x, and effectively unlimited, each needing manager or skip-level approval and scoped to one, three, or six months before reverting. Raising the monthly tier scales the daily increment proportionally.

Lever 4: cut token overhead. Roughly 10% savings.

A developer typing “investigate and fix this bug” contributes a negligible fraction of what actually reaches the model. The agent gathers codebase context, invokes tools, and pulls in company skills and system information, so cost is dominated by context the developer never wrote. Techniques include forcing more frequent context compaction, using or tuning less verbose harnesses, auditing chatty tools, and breaking work into smaller units.

Prompt caching is the other half. Cache writes cost money and cached reads cut per-inference cost, and the trade-off depends on workload, so default cache settings reward hand-tuning. At Databricks, tuning harness and cache settings alone cut generated tokens and associated costs by almost 50%, with no observed quality degradation for developers.

What they used

  • Unity AI Gateway as the single control point. All agent traffic from all tools routes through it, which is what makes one spend policy enforceable, and it handles model proxying, budget tracking and enforcement, end-user tool configuration such as model allow-lists and compaction settings, and session trace logging.
  • Omnigent, the open meta-harness, as the default developer interface and task-level dispatcher.
  • Unity Catalog and Lakehouse tables for spend observability, so managers see team-level spend and finance sees one bill instead of five.
  • An internal coding benchmark built on the production codebase to evaluate new models.
  • Slack, a CLI, and an internal budget portal as the self-serve unblock paths.

Results

  • Unit costs down as much as 90% in some scenarios, from the four techniques layered together.
  • More than 30% reduction in average task cost from smart routing, at roughly the quality of the most expensive model available.
  • Almost 50% fewer generated tokens from harness and cache tuning, with no quality degradation observed by developers.
  • The approval queue for budget increases is gone. Monthly increases became a rare project-scoped manager decision instead of a recurring per-engineer ticket.
  • Engineers stopped rationing their own usage. The stated goal of the guardrails was removing fear of unbounded cost so adoption could keep climbing.
  • Adoption grew through the period, so the 90% figure describes cost per unit of work rather than a fall in total spend.

What the numbers rest on

The savings percentages are directional, drawn from an informal survey of development teams at Databricks and at Stripe, Coinbase, Uber, and Ramp, whose infrastructure leaders reviewed the post. Thrive Capital gave feedback on an early draft. The dollar figures in the budgets post are illustrative. Databricks sells or gives away every component in the stack it describes, and the post ends with an invitation to customers.

Lessons

  1. Chase the efficiency frontier rather than the intelligence frontier. The largest single win is moving default traffic to whatever model currently offers the best price at an acceptable quality level, which changes every few weeks.
  2. You cannot chase it without your own evaluation. Public benchmarks do not predict performance on a specific codebase, and negative results are frequent enough that the eval pays for itself by blocking upgrades that cost more for nothing.
  3. Treat harness choice as a procurement decision. Co-design between models and harnesses turns tool preference into model lock-in, and a meta-harness is how Databricks preserves the ability to move spend.
  4. Route by task complexity, since most requests do not need the top model. More than 30% of average task cost was recoverable this way at matched quality.
  5. Design for the heavy spenders being your best users. Hard caps punish the people getting the most leverage, so visibility plus progressive friction outperforms a ceiling.
  6. Separate runaway protection from budget policy. Accidental spend over hours and expensive habits over weeks are different failures, and one number cannot catch both.
  7. Make unblocking self-serve and require a human click. Approval queues generate tickets and idle engineers, and a deliberate acknowledgment still filters out the automation loops that cause the worst incidents.
  8. Audit context and cache settings before assuming the model price is the problem. Nearly half the token volume at Databricks was overhead nobody asked for.
  9. Everything above depends on one control point. Without a gateway that meters every tool against a user identity, none of these policies are enforceable and none of the data exists.

Sources

  • Patrick Wendell, Akshat Bhatia, Vinay Gaba, Erich Elsen, Ivan Zhou, “Managing AI Coding Costs at Scale,” Databricks blog, August 7, 2026.
  • Rohit Agrawal, Shuyu Cao, Darming Zhao, Zack Siegel, Aaron Davidson, “How Databricks manages its own coding agent spend with Unity AI Gateway Budgets,” Databricks blog, July 28, 2026.
  • Axios, “Exclusive: Databricks rolls out AI spend controls,” June 16, 2026.
  • Patrick Wendell (@pwendell) on X, August 7, 2026, including the Databricks coding model efficiency chart dated August 6, 2026.

Featured

The Cash Flow Gap Small Businesses Can’t Seem to Close

Federal Reserve, BLS, and SBA data all point to...

Southeast Asia Is Building Everyone Else’s Compute

Southeast Asia is absorbing more new data centre capacity...

Canadian B2B Firms Need an AI Rework Ledger Before Productivity Claims Count

By Gleb Tsipursky, PhD Canadian businesses are adopting artificial...

What Is Graph Engineering, the Latest AI Buzzword?

Every week AI conversation on the Internet seems to...
Jennifer Evans
Jennifer Evanshttps://patternpulse.ai
Principal, patternpulse.ai, and cofounder, Tech Reset Canada. AI policy, research and analysis. Entrepreneur since 2002, marketer since 1998, machine learning since 2009. Based in Toronto and Southeast Asia.