Send routine tool calls to the cheaper model. Call the stronger model when that attempt cannot complete the tool step. In February 2025, Logan Kilpatrick said his team kept Gemini 2.0 Flash-Lite at the same price point as 1.5 Flash so cost would stop blocking people who want AI in front of users. He called function calling the core enabler of a lot of these agentic workflows, and he pointed the Pro model at coding and agents.
Logan Kilpatrick is product lead for Google AI Studio and the Gemini API at Google DeepMind. 2.0 Flash had just become fully available for production use with higher rate limits. Developers had spent the prior two months asking to use that model in production while the team finished it.
How do you pick a model tier for tool-using agents?
Gemini 2.0 Flash-Lite kept the 1.5 Flash price, 2.0 Flash was what he called really great for most tasks, and Pro was where he wanted to push coding and agents.
If cost is the barrier for you to build with AI, like, let's not have that continue to be the case and keep the prices low.
Logan Kilpatrick, product lead for Google AI Studio and the Gemini API at Google DeepMind, on Chain of Thought ep 12
For most tasks, he said 2.0 Flash would be really great, and that it was fully multimodal. The new Pro model continued the Gemini-Exp-1206 model from December, which he described as one of the highest ranked models for coding use cases. That was where he wanted to push the frontier of coding and agents.
In the near term, he expected probably 100 to 1000x more inference compute as agents themselves start to be the ones generating tokens. That future, he said, only works with models at the cost of the Gemini 2.0 Flash models.
In that world, the only way that that world ends up being possible is with models that are at the cost of the Gemini two point zero flash models.
Logan Kilpatrick, product lead for Google AI Studio and the Gemini API at Google DeepMind, on Chain of Thought ep 12
Above that cost the products get expensive, and the world needs the products reachable by most people if the value is going to be there. Send ordinary tool steps to the cheap tier. Use Pro for coding and for agent steps the cheaper model does not finish.
How do you write a tool schema an agent can follow?
Give each tool a single job, a description that says when to call it, and a parameters object with required fields. Tool use was the piece he treated as fundamental for agentic workflows.
That is the core enabler of a lot of these agentic workflows.
Logan Kilpatrick, product lead for Google AI Studio and the Gemini API at Google DeepMind, on Chain of Thought ep 12
The 2.0 model was trained to know when to call first-party tools, search and code execution, if the developer makes them available. Those tools target two limits he named: no updated world knowledge, and embarrassingly bad mistakes on problems you can solve with a calculator or a little code. Code execution has no per-session fee; you pay for the tokens it creates. Search can scale to production and can be tried with no paid signup.
For tools you own, keep the same shape. One action per name. The description states when to call it. Required fields are listed. If order matters, enforce the prerequisite in the refund handler or orchestrator using recorded lookup results. Compositional function calling came out with 2.0, was available in the API, and lets you describe the sequence and the chain of functions. Developers had told the team that the order in which tools are called matters a lot. Pass the same list to both tiers. A different tool list on the second call can change the order you already tried to log.
When should the cheap model hand the task to a stronger one?
Hand off when the cheap model emits a tool call you cannot execute. Try the cheap tier first on ordinary steps. Escalate on a model error and pass the execution history. If the handler outcome is uncertain, reconcile it and use an idempotency key on the mutation.
A minimal sketch to adapt, not a drop-in library.
tools = [
{"name": "lookup_order", "description": "Return status for one order id.",
"parameters": {"type": "object", "properties": {"order_id": {"type": "string"}}, "required": ["order_id"]}},
{"name": "refund_order", "description": "Refund one order id.",
"parameters": {"type": "object", "properties": {"order_id": {"type": "string"}, "idempotency_key": {"type": "string"}}, "required": ["order_id", "idempotency_key"]}},
]
REQUIRED = {t["name"]: t["parameters"]["required"] for t in tools}
lookups, applied = set(), {}
def lookup_order(order_id):
lookups.add(order_id)
return {"order_id": order_id, "status": "confirmed"}
def refund_order(order_id, idempotency_key):
if order_id not in lookups:
return {"ok": False, "error": "lookup_required"}
if idempotency_key in applied:
prior = applied[idempotency_key]
if prior["order_id"] != order_id:
return {"ok": False, "error": "idempotency_key_reused"}
return prior
applied[idempotency_key] = {"ok": True, "order_id": order_id}
return applied[idempotency_key]
HANDLERS = {"lookup_order": lookup_order, "refund_order": refund_order}
def call_model(tier, task, tools, history):
# Replace with your API call; return the tool call the model proposes.
return {"tier": tier, "name": "lookup_order", "args": {"order_id": "A1"}}
def execute(call):
name, args = call.get("name"), call.get("args", {})
if name not in HANDLERS:
return {**call, "model_error": "unknown_tool"}
missing = [k for k in REQUIRED[name] if k not in args]
if missing:
return {**call, "model_error": f"missing_args: {missing}"}
try:
return {**call, "result": HANDLERS[name](**args)}
except Exception as exc:
return {**call, "uncertain": repr(exc)}
def run_with_escalation(task, tools):
history = []
outcome = execute(call_model("cheap", task, tools, history))
if outcome.get("model_error"):
history.append(outcome)
outcome = execute(call_model("strong", task, tools, history))
if outcome.get("uncertain"):
return {"reconcile": True, "history": history + [outcome]}
return outcome
execute sets the model error flag for an unknown tool name or a missing required argument. refund_order refuses an idempotency key reused for a different order. Do not set the flag for a valid empty result unless your product defines empty as failure. Do not set it for a handler exception on a mutation: the write may already have succeeded, so reconcile that outcome and use an idempotency key. Log the tool name, arguments, and error from the cheap attempt. Then call the strong model once with the same task, the same schema, and the execution history. One hop keeps a retry from stacking on top of the inference load agents add when they, not people, generate the tokens.
FAQ
Which tier should run a normal tool call?
The cheaper tier first. Logan said 2.0 Flash fits most tasks, Gemini 2.0 Flash-Lite held the 1.5 Flash price to remove the economic burden, and Pro was for coding and agents. Escalate after a model error and pass the execution history. Reconcile an uncertain mutation with an idempotency key instead of replaying it.
Is there a per-session fee for search or code execution?
Logan said code execution has no per-session fee and you pay for the tokens created. Search, he said, can be tried with no paid signup and then scaled to production. He called that the absence of a weird pricing story. Check current prices before you forecast spend.
How do you tell that a tool step succeeded?
The handler accepted arguments that match the schema and finished without error, and you stored the result your product treats as success. Logan said he would bet at least five out of 10 people putting AI in front of users would not have a good eval story. They would not know what success looks like. Write that check down per tool before the router takes traffic.
Takeaway
- Default ordinary tool steps to the cheap tier, and use the strong model for coding, harder agent steps, and a model error on the tool call.
- Write one schema per tool with a name, a when-to-call description, parameters, required fields, and any order rule.
- Escalate on an unknown tool or a missing required argument, pass execution history, reconcile an uncertain mutation with an idempotency key, and cap that hop at one stronger call.
- Log the cheap attempt so the retry is tied to a specific tool failure.
- Re-check current model rates before you budget the router.
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.
Top comments (0)