Dev.to AI πŸ€– Ai πŸ‘ 0 πŸ“– 5 min read

Price a coding call, then pick the model tier

For a short coding task, price the fast tier and the flagship on the same prompt, then keep the cheapest run that still returns code you would ship. On the pricing Paige Bailey read off the screen, Gemini 3 Flash input w

Price a coding call, then pick the model tier

For a short coding task, price the fast tier and the flagship on the same prompt, then keep the cheapest run that still returns code you would ship. On the pricing Paige Bailey read off the screen, Gemini 3 Flash input was about 25% of Gemini 3 Pro, a bit lower with a large input context, and output was about 25% as well. With thinking set to minimal, Flash wrote a lat/long helper in about one tenth the time, and the call came in at less than a penny.

Paige Bailey is the AI developer relations lead at Google DeepMind. The episode aired in January 2026. She opened compare mode in AI Studio and ran one Python prompt on Gemini 3 Pro and Gemini 3 Flash.

How do you choose a model tier for a short coding task?

Run the task on the fast tier with thinking turned down, run it on the flagship, and keep the cheaper result that matches the code you wanted. Bailey framed Gemini 3 Pro as the flagship, with thinking built in, a larger model, and a much higher price. Gemini 3 Flash can turn thinking on, at what she called a significant discount next to Pro.

In that compare Pro's thinking level was high by default, and she set Flash to minimal. The prompt asked for a Python function that returns lat/long for a city. Flash returned while Pro was still thinking. Sources were cited, both answers used GeoPy, and she called the Python more or less the same. That output had no example usage.

For folks who can't see, the input is about 25% of what you would expect to pay for Gemini three Pro, even a little bit lower if you have significant number of tokens in your context window for inputs. And then the output is also significantly less expensive, just coming in at about 25%.

Paige Bailey, AI Developer Relations Lead at Google DeepMind, on Chain of Thought ep 47

Gemini 3 & Robot Dogs: Inside … - Chain of Thought | AI Agents, Infrastructure & Engineering - Apple Podcasts

Podcast Episode Β· Chain of Thought | AI Agents, Infrastructure & Engineering Β· January 14 Β· 51m

favicon podcasts.apple.com

Read the current per-million rates, then apply them to token counts from a run of your own.

When do you turn thinking on?

Leave thinking at minimal when the fast tier already returns the function you needed. Turn it up when you want a fuller answer and you can afford the extra tokens and the wait.

Gemini three Pro, obviously, our flagship model. It has thinking baked in, which means that the answers you're going to get are probably going to be much more fully expressed, but they'll probably take a a lot longer to get you the answer that you're hoping for

Paige Bailey, AI Developer Relations Lead at Google DeepMind, on Chain of Thought ep 47

On the city lookup, she tied the savings to not using all of the intermediate thinking tokens on that run. Measure the thinking tokens you were billed. Flash still has a switch if a later task needs thinking. Minimal thinking fits a narrow function with an obvious library. Raise it above minimal when the prompt asks for a design, several files, or a justification you will review. One demo where the Python matched does not settle the next prompt.

How do you estimate the cost of one coding call?

Multiply input tokens and output tokens by the per-million prices you supply for that tier, then pick the cheapest tier that passed a quality check you recorded. On hover, the compare view showed input cost, output cost, and total. The Flash total for that function was less than a penny.

The sketch below does the same arithmetic. It takes prices as parameters, so you can pass the card you are billed on.

A minimal sketch to adapt, not a drop-in library.

def call_cost_usd(
    input_tokens,
    output_tokens,
    thinking_tokens,
    usd_per_million_in,
    usd_per_million_out,
):
    billed_out = output_tokens + thinking_tokens
    return (
        input_tokens * usd_per_million_in
        + billed_out * usd_per_million_out
    ) / 1_000_000


def cheapest_tier_that_passed(runs, prices):
    passed = [run for run in runs if run["passed"]]
    if not passed:
        return None

    def cost(run):
        rate = prices[run["name"]]
        return call_cost_usd(
            run["input_tokens"],
            run["output_tokens"],
            run["thinking_tokens"],
            rate["usd_per_million_in"],
            rate["usd_per_million_out"],
        )

    return min(passed, key=cost)["name"]

Feed it token counts from the two runs, including the thinking tokens you were billed, and the per-million input and output prices from the card you are billed on. Check the billing documentation for how thinking tokens are charged and whether reported output counts already include them. On that compare she tied Flash's lower token use to not using all of the intermediate thinking tokens, and she put Pro's slower answer down to those tokens and its larger size. If nothing passed, the function returns no tier. Change the prompt or the check before you accept the cheap failure.

Mark a run as passed only from checks you can rerun. The function should do the job, verified by a tiny fixture you wrote. Dependencies should be ones you will ship. Both of her samples pulled in GeoPy; if that is not a dependency you will ship, both runs fail. Latency should fit the product: about one tenth of the wait matters in an inline editor and matters less in a nightly job. Cost at your volume should still look like that penny-scale call once you multiply by how often the path runs. Those figures come from one prompt, so copy the shape of the test.

FAQ

Is Gemini 3 Flash about a quarter of Pro on both input and output?
On the comparison Bailey showed, input was about 25% of Pro, and lower than that with a significant number of input tokens. Output was about 25%. Confirm the card for the context length you send.

Does the fast tier have thinking at all?
Pro had thinking baked in, and in that UI the thinking level defaulted to high. Flash let her turn thinking on. She set thinking to minimal for the lat/long prompt. Measure the thinking tokens that call billed.

Will both tiers emit the same code?
On that one prompt, she said the Python was more or less the same and both used GeoPy. Treat that as a single data point. Keep a fixture so a later prompt can fail the bar even when it is cheap.

Takeaway

  • Run one real coding prompt on the fast tier with thinking minimal and on the flagship with thinking at its default.
  • Record input tokens, output tokens, wall time, and total cost from the run.
  • Use about 25% of Pro on input and on output only as the ratio Bailey showed, and pass today's per-million prices into your own estimator.
  • Raise thinking above minimal when the short answer is too thin, and count the thinking tokens you were billed.
  • Ship the cheapest tier that passed your fixture, dependency check, latency limit, and budget.

The full conversation, with the transcript, is on Chain of Thought.

Subscribe to the Chain of Thought newsletter for new episodes and write-ups like this one.

Drafted with AI assistance from the episode transcripts.

πŸ“° Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.