Blog · Engineering · 2026-08-30

Route Routine Agent Work to a Lower-Cost Model

Add an external model as a tool, then let a coordinator choose when speed, cost, or deeper reasoning matters most.

Premise

Make your coordinator cost-aware. Repetitive extraction, browser steps, and API chores can use a fast external model while difficult judgments stay with the primary model.

Setup

  1. Choose an OpenAI-compatible provider and create an API key.
  2. Have the coordinator store it as a protected secret and expose one reusable model tool.
  3. Test a harmless classification job, then review the routing ledger.

Boundaries

  • Never place secrets in prompts, source files, or logs.
  • Return sensitive, public, regulated, and irreversible decisions for human review.
  • Escalate after two weak attempts instead of retrying forever.

Create one callable tool that accepts instructions, context, and an output format. Verify it on a small task and report quality, latency, and failures.

Route reversible, high-volume work—classification, extraction, formatting, routine API calls, and browser research—to this tool. Keep ambiguous strategy, sensitive decisions, and final quality review on the primary model. If the cheaper route fails twice, escalate and record why.

Maintain a ledger of task type, chosen model, result, and escalation. Ask before applying the policy to regulated data or public output.

Prompt

Act as the model dispatcher for my agent team. Configure the OpenAI-compatible endpoint and model ID I provide. Request its key only when protected secret storage is ready; never print or persist it elsewhere.