Skip to content

Best practices

Auto-routing

Let Telem send each search to the providers that answer it best, and turn it off when you want.

Search providers are not equally good at every question. Telem designed a smart routing technique that sends each question or task to the providers that answer it best. Turn auto-routing on, and you change nothing in your code.

  • Answers from the right providers. The providers that do best on your question or task answer it.
  • Fewer web searches. A routed search runs on a few chosen providers instead of all the default providers.
  • Fewer tokens. Dropping the weaker providers filters out low-quality information before your agent reads or reasons about it.

Your agent is at least as good as before, often at a lower cost.

The installer turns auto-routing on by default. accuracy is the only mode, and off turns it off. Any other value makes every search fail with a 422.

Give the flag --auto-routing off:

Terminal window
npm create @telemai -- --auto-routing off

--auto-routing accuracy turns it on again.

Each client reads the setting from its own place:

Client Where to set auto-routing
OpenCode, Pi, Claude Code, Codex and Hermes plugins autoRouting in .telem/telem.json, or TELEM_AUTO_ROUTING
OpenClaw plugin The Telem Auto-Routing setting in the plugin config, or TELEM_AUTO_ROUTING. OpenClaw does not read .telem/telem.json.
Grok Build, Muse Code, VS Code, Cursor and Devin Desktop autoRouting in .telem/telem.json: the hook sends it with each call. The installer also writes the X-Telem-Auto-Routing header into the agent’s MCP config; the file wins over it.
Other MCP clients The X-Telem-Auto-Routing header in the server entry. Without the header, auto-routing is on; off turns it off. The installer writes it.
Python SDK The auto_routing argument of client.search(...), or TELEM_AUTO_ROUTING
JavaScript SDK The autoRouting option of telem.search(...), or TELEM_AUTO_ROUTING. The JavaScript SDK does not read .telem/telem.json.

For all the settings and their order, see Configuring the plugins and the SDK.

  • It usually costs less. A routed search makes fewer provider calls, and Telem pays for provider capacity in bulk, so the price per call is lower than when you pay for it yourself.
  • Your provider lists still apply. Telem chooses only from the providers that your include and exclude lists allow.
  • If a chosen provider fails, the other chosen providers still answer. If all of them fail, the search returns a 503.
Search parameters

The routing block in the response and the providers Telem can choose.

Parameters

All the settings, and which one wins.

Supported platforms

Platform providers that you name yourself.

Search demo

The same question with auto-routing on and off.

Was this page helpful?