Philip Kiely of Baseten gives an AI Engineer talk about where coding agents spend time and money: choosing a model, carrying session context forward, and running work on the GPU.

Price the task, not the token

  • Baseten predicts both the chance that a model completes a coding task and how much the run will cost. Its example chooses between GLM 5.3 Flash and Opus 5.5.
  • Repeat tasks. Kiely reports four Opus runs and eight GLM runs per task to separate real differences from runs that just happened to pass. Use a random router as a baseline.
  • On Baseten’s test, one setting cost 72% less than always using Opus 5.5, with a 0.8-percentage-point drop in pass rate. Kiely cites 429 ms of routing overhead at the 95th percentile for the measurement he discusses.
  • Caveat: those are Baseten’s benchmark results. The comparison includes routers built for different workloads and model pools.

Let warm context affect the route

  • A trivial follow-up can be cheaper to keep with the model that already has the prior conversation cached. Measure before switching to a cheaper model and rebuilding that state.
  • Keep a short subtask with the parent session when it shares the same prefix. Compact the context for a longer branch when future savings repay the initial summary and cache miss.

Profile the whole GPU workload

  • A faster kernel, one operation run on a GPU, helps only if it reduces a bottleneck. Test on representative batch sizes and require both correctness and an end-to-end improvement before keeping a change.
  • Fusion can avoid writing intermediate values out to memory. Overlapping launches and grouping work into execution graphs can reduce time spent waiting between operations.
  • Baseten shows improvements in median time per denoising step on FLUX.2 and Qwen-Image. That measures part of image generation; it does not measure coding-agent throughput.

“Let’s make sure that we’re optimizing the right thing.” — Philip Kiely, 2:31