How Airbnb uses cost per task to operate coding agents on Amazon Bedrock

Airbnb published an account of how it evaluates and operates coding agents on Amazon Bedrock, describing the internal tooling behind AirChat, an internal tool thousands of engineers and engineering-adjacent staff use weekly to run coding agents. Requests from AirChat and from AirChat Remote, which runs cloud agents in separate cloud workspaces, pass through Airbnb's LLM gateway to Bedrock, which processes Airbnb's code, prompts and model responses inside AWS. The post describes two systems run side by side: evals before a rollout that measure each model's score and cost per task on Airbnb's own tasks, and production observability after a rollout that shows what actually changed.
The forcing function is release velocity. Eight new models arrived in roughly five weeks, and by mid-October about two thirds of the requests engineers sent through coding agents went to those new models. Each release can shift output tokens, cost, latency and capacity at once, and Airbnb argues that launch-time benchmark charts do not show how a model handles its engineers' work.
Cost per task is the central metric. It is defined as the list-price cost of all the tokens an agent consumes to finish one task, priced across four token types Bedrock reports per request: uncached input, cache reads, cache writes and output. Because a coding agent makes many requests per task and re-reads accumulated context each time, Airbnb prices the whole task rather than individual calls, averages in low-scoring attempts, and records cost next to score for each model, reasoning effort and agent client. Reasoning effort, a setting controlling how much a model reasons before responding, moves both numbers: on one tested model, going from low to high effort added 0.8 score points while making cost per task 2.5 times higher. Those results set each tool's default model and effort, plus an effort ceiling the gateway enforces.
The eval harness is built for speed. When a model launched, a single request started a campaign running it through seven task suites; hundreds of tasks spread across several cloud workspaces, with results appearing as graders scored them. First results came within hours, and by the next morning every suite had a score and a cost per task, enough for an org-wide deployment decision. Each task is a self-contained folder with instructions, resource limits, a sandbox Dockerfile, grader scripts and a reference solution; the grader recomputes the correct answer from frozen data and awards a reward of 1 only if every check passes. The examples follow Harbor, an open-source framework for running agent evals in sandboxes. Airbnb calls rubric writing the hardest part: long tasks run several rounds with a simulated reviewer pushing back, and a model grader scores eight weighted dimensions (delivery correctness 25, verification quality 15, autonomy 15, judgment 10, evidence and reporting 10, readability 10, design fit 10, operational discipline 5), each scored 0 to 3, with a ceiling of 25 of 100 if the reviewer had to repeatedly rescue the agent.
On the operations side, Airbnb leans on CloudWatch metrics in the AWS/Bedrock namespace: InvocationLatency, TimeToFirstToken, OutputTokenCount and a derived output-tokens-per-second figure computed as OutputTokenCount divided by the difference between invocation latency and time to first token, times 1000, since Bedrock publishes no native OTPS metric. In one example, latency rose 40 percent while time to first token and OTPS stayed flat; a system prompt change had pushed output tokens per request up 50 percent. Airbnb's lesson is to treat prompt changes and model upgrades as deploys and mark them on dashboards.
The most instructive episode concerns a model the post calls model A. It outscored the previous best by more than three points on Airbnb's coding tasks at roughly the same cost per task, so it was rolled out with effort capped at high and guidance to use low or medium for most work. A few weeks later, list-priced production data showed average weekly spend per user several times higher than on the prior model: each request cost about three times as much, and the average user sent about three times as many requests. Output tokens were only about a tenth of a request's cost; most went to cached context re-read on every request. Model A could work autonomously for long stretches, so people began long, self-directed sessions. The post's framing is that the eval measured the model on a task while production measured how people chose to work with it. A later model scored higher on the same tasks and grader at about a sixth of model A's cost per task, and a configuration change migrated heavy model A users; in their first full week the group sent roughly the same number of requests while spend on that model fell to about a seventh.
Throttling gets a detailed treatment. Bedrock checks tokens-per-minute quota when a request arrives, reserving uncached input tokens plus cache writes plus max_tokens, then adjusts and returns the unused reservation when the request settles. Cache reads never count against quota, so a request can be easy on quota and expensive on the bill, and output tokens settle at a burndown rate that is 1:1 on most models and several times that on some current ones. In the post's example, a 1 million TPM quota with 300 requests per minute looked like 30 percent of quota on a billed-token dashboard but consumed about 77 percent after a 5:1 burndown. Admission initially reserved 4,696 tokens per request (600 uncached input plus 4,096 max_tokens) while p99 responses were about 800 tokens; lowering max_tokens to 1,024 shrank the reservation to 1,624 tokens, about 65 percent smaller, without changing final consumption for unchanged input and output. Airbnb also keeps an eval-verified equivalent model for every major model so traffic can be rebalanced, by changing a default, when headroom tightens. Legacy-period models can lose access after 15 days of inactivity, and after end-of-life requests fail and traffic is not moved automatically, so the post suggests alarming when LegacyModelInvocations rises above zero.
Attribution is another operational thread. Runtime metrics are dimensioned by ModelId, not team, and failed requests may appear only in series without that dimension. Airbnb's own gateway records model, client, team and user per request, used only in aggregate for cost and capacity planning, and it computes cost per task from the same four token counts as the evals so eval and production token mixes are comparable. Bedrock-side options include tagged IAM roles or session tags for Cost Explorer and CUR 2.0, one tagged application inference profile per application and model, and requestMetadata key-value pairs on Converse that land in invocation logs but not the bill. Behind a gateway, the gateway's role is what Bedrock sees unless it assumes a per-user role with a distinct RoleSessionName or session tags, cached to avoid straining AWS STS rate quotas.
Why it matters: Teams putting coding agents into production face the same trap Airbnb hit, where a model that wins an eval drives up spend because users work differently with it. The practice here, measuring list-price cost across all four token types for complete tasks and reconciling evals against production usage weekly, is portable to any Bedrock-based stack, and it suggests model selection should be revisited on every release rather than fixed at rollout. The quota mechanics described, especially output burndown multipliers and max_tokens reservations, are likely to surprise teams reading throttling off billed-token dashboards, since inference from the stated numbers is that admission headroom can be far tighter than billing suggests.
Based on reporting from the original publisher. Visit the source for full context and later updates.
Publisher excerpt
Airbnb runs evals on real engineering tasks and uses Amazon Bedrock observability to choose models for its coding agents and control production costs. This post shows how cost per task guides model selection, why production spending can differ from eval results, and how to monitor latency, manage quotas, and attribute spend.