---
title: "Cost per task: Using cheap classifiers to route across Gemini models and thinking levels"
description: "Per-token API prices are falling, but engineering bills for autonomous coding agents keep climbing because the dominating metric is now cost per successful task, not price per million tokens. A lightweight routing layer can intercept routine decisions before they reach an expensive reasoning model, preventing unnecessary deep-reasoning spend. The article tests TypeSafe’s Jev classifier in front of Google Antigravity’s model calls, using a single atomic Noul question to route tasks. On a 50-question coding-agent benchmark, the Jev router achieved 100% accuracy on 34 unseen held-out tasks and 96% overall, while a frozen regex and prompt-length heuristic dropped to 70.6% on unseen tasks. The most cost-effective approach is to start with a fast model on a light thinking setting, then add a near-free classifier to send only hard tasks to a stronger model."
---

# Cost per task: Using cheap classifiers to route across Gemini models and thinking levels

[Google](https://yomu.fyi/company/google) · Sergio Villani · Nov 3, 2026

**Type:** Benchmark

## Summary

Per-token API prices are falling, but engineering bills for autonomous coding agents keep climbing because the dominating metric is now cost per successful task, not price per million tokens. A lightweight routing layer can intercept routine decisions before they reach an expensive reasoning model, preventing unnecessary deep-reasoning spend. The article tests TypeSafe’s Jev classifier in front of Google Antigravity’s model calls, using a single atomic Noul question to route tasks. On a 50-question coding-agent benchmark, the Jev router achieved 100% accuracy on 34 unseen held-out tasks and 96% overall, while a frozen regex and prompt-length heuristic dropped to 70.6% on unseen tasks. The most cost-effective approach is to start with a fast model on a light thinking setting, then add a near-free classifier to send only hard tasks to a stronger model.

## Context

Per-token API prices are falling, but engineering bills for autonomous coding agents keep climbing. The dominating metric is now cost per successful task: total spend across every loop iteration, tool call, retry, and internal thinking pass divided by the number of tasks that pass verification. Using a high-thinking reasoning configuration for every micro-decision incurs unnecessary cost.

## Approach / What changed

Add a lightweight routing layer (e.g., TypeSafe’s Jev classifier) in front of model calls. The classifier evaluates a single atomic Noul question per factor—such as whether a task requires more than one sequential calculation—and routes simple tasks to a cheaper model (Flash-Lite) and hard tasks to a stronger model (Flash on low thinking).

## Takeaways

- A frozen regex and prompt-length heuristic dropped from 93.8% to 70.6% on unseen coding-agent tasks, while Jev classified all 34 unseen tasks with 100% agreement.
- Lowering maxOutputTokens does not reduce thinking tokens on easy tasks; it only truncates hard tasks, breaking 7 of 25 in the test.
- The strongest setup without a router was Gemini 3.8 Flash on low thinking, solving all 50 tasks; the Jev router matched that accuracy while reducing cost and response time.

## FAQ

### Does lowering maxOutputTokens save money on easy tasks?

No. Capping maxOutputTokens does not reduce thinking tokens on easy tasks; the cap is only a ceiling that easy answers never approach. In tests, a capped model spent almost identical thinking tokens on simple tasks as an uncapped one, and the cap broke 7 of 25 hard tasks by truncating reasoning or forcing wrong answers.

### How should I structure a routing question for Jev?

Use a single atomic Noul question per factor, such as whether the task requires more than one sequential calculation, simulation step, or logical deduction. A broad Choice question (simple vs. complex) tends to route nearly everything to simple, even tasks needing multi-step reasoning.

### How does caching interact with a routing classifier?

Routing and caching pull in opposite directions because a cache belongs to one model. If your agent switches between models from turn to turn, it either keeps two caches or loses the 75%–90% discount. The practical split is to route short, self-contained tasks and keep long, context-heavy turns on a single model.

**Tags:** [AI](https://yomu.fyi/topic/ai), [Classification](https://yomu.fyi/topic/classification), [Cost Optimization](https://yomu.fyi/topic/cost-optimization), [Gemini](https://yomu.fyi/topic/gemini), [LLMs](https://yomu.fyi/topic/llm)

- Source: [Google](https://developers.googleblog.com/cost-per-task-using-cheap-classifiers-to-route-across-gemini-models-and-thinking-levels)
- Source URL: https://developers.googleblog.com/cost-per-task-using-cheap-classifiers-to-route-across-gemini-models-and-thinking-levels
- Ingested by Yomu: 2026-11-03T18:01:13.009Z

[Read original post](https://developers.googleblog.com/cost-per-task-using-cheap-classifiers-to-route-across-gemini-models-and-thinking-levels)
