Repository navigation
Choose how each backend runs and know what it cost, and let coding agents use WebRouter from their terminal.
Upgrade with pip install -U "webrouter[all]". Then read Behaviour Change: some defaults changed.
🚀 What's New
Vendor modes (#315, #324, #327, #343, #347)
- Get the speed or depth you need from one backend: pin one of its own tiers, such as Exa's instant search or Tavily's ultra-fast tier, by naming it in
provider. Works on search, extract, answer and browse, and insideautochains - Know what each call really cost: it is priced at its mode's published rate, in
cost_usdand against any spending limit you set. A mode with no published price never runs under a spending limit - Let a router pick the mode for you: opt in with
route_modes=True, and a mode the backend refuses falls through to the next one at no charge. Vendor modes lists every mode
from web_router import WebRouter
router = WebRouter()
router.search("...", provider="exa:exa-instant") # Exa's instant search type
router.search("...", provider="exa:exa-instant+lite") # the same, at the lite depth
router.search("...", provider="tavily:tavily-ultra-fast")CLI for agents (#330)
- Coding agents with a terminal, such as Claude Code, Codex and Cursor, can now search, read pages and get answers through WebRouter with one shell command, with no MCP server to set up
- Agents can read every result and handle every failure: each method is a
webroutercommand that prints one JSON object, with exit codes to branch on: 1 the call failed, 2 refused before anything was sent, 3 a key or an extra is missing. Try it with no install and no key throughuvx. See CLI
uvx --from "webrouter[search,extract]" webrouter search "rust async runtimes" -n 5 | jq -r '.results[].url'More features
- Four more search backends for
autoto fall back on and for you to compare: Valyu, Seltz, Octen and Keirolabs. Call Valyu, Seltz and Octen withsearch(provider=...);call_vendor()no longer lists them (#257, #258, #259, #264) - Run one MCP server for your whole team:
web-router-mcp --transport httpserves it over HTTP, local by default and on other addresses only withWEB_ROUTER_MCP_TOKEN, and aDockerfileships with it (#348) - Find the right scraper faster: live data search ranks by site, kind of page and country, so "amazon product" finds product pages first. And
extract()tells you which data API (YouTube, GitHub, Wikipedia and others) serves a page's site, so you can call it directly (#256, #280)
🐛 Fixes
timeout=now holds on the syncWebRouter: a slow response no longer runs past your deadline (#348)- When every URL in an extract fails, you get one error with each URL's reason, so you know which to retry (#348)
- Docs: the MCP guide loads again, at /mcp-server, and several pages were corrected (#291, #338, #340)
🔄 Behaviour Change
- Agent tools are safer by default (Claude, OpenAI, LangChain): a model can no longer point them at your internal network, a stuck call ends after 60 s, and a failed call comes back to the model as a message it can act on instead of crashing your agent. Pass
url_policy=Noneortimeout=Noneto undo either (#348) - MCP
load_envreads only.envfiles, so a prompt can't make it read another file on your machine.webrouter[mcp]now installs the browser tools too, so every MCP tool works out of the box (#348) - Keenable now works with spending limits: when you cap spend with
Budget(max_cost_usd=...), WebRouter used to skip Keenable because it had no price. It now has one ($4 per 1,000 requests), so it runs, and its cost counts toward your limit (#349) - If you look up prices by mode, use the new names:
":ultra-fast"is now"tavily-ultra-fast". The old name still works this release, with a warning (#289)
🙌 New Contributors
Full Changelog: v0.13.0...v0.14.0