Skip to main content
Agents don’t need one model for everything. Keep a small local model for cheap, high-volume steps and a bigger hosted model for hard reasoning, and route each call to whichever fits. Both clients are instances of the same OpenAI class, so a single instrumentModules: { openAI: openai.OpenAI } covers them all:
Every span records the model that served it, so the tasks and groups views show which model handles which kind of work. That makes the routing tunable from production data: find task types where the small model underperforms and promote those routes to the bigger model — or the reverse, and cut inference cost.