Repository navigation
v0.13.0 - Vendor Data, Live Data & Cost on Every Call
Your agent can now pull data from 372 vendor APIs, from your own ad and log accounts to public data, run ready-made scrapers from four vendors without picking one, and see what every call cost. With Nimble among the keyless providers, you get more free usage before your first API key, and search can go through the LiteLLM proxy your team already runs.
Upgrade with pip install -U "webrouter[all]". If you use the MCP live data tools or plan() and run(), read Behaviour Change first.
🚀 What's New
Vendor data (#132, #133, #134, #249, #281)
call_vendor()calls a vendor's own API with your credentials (your Google Ads reports, your Datadog logs, public data such as FRED) and returns its answer untouched. The catalog lists 372 vendors and 2,708 endpoints inVENDORS.md- Every endpoint is listed as a read, and some reads spend your vendor credits. A write goes through
vendor_request()and must be allowed explicitly. Your credentials go only to that vendor's own host search()also lists the vendor APIs that match a query, from the local catalog at no cost (#250), and agents get the catalog as MCP tools- Every entry is written from the vendor's own API docs, so tell us on GitHub Issues if one doesn't match what the vendor returns
from web_router import WebRouter
router = WebRouter()
router.find_vendor_endpoints("google ads spend by campaign") # matching endpoints, from the local catalog
response = router.call_vendor(
"google-ads.query",
{
"customer_id": "1234567890",
"query": "SELECT campaign.name, metrics.cost_micros FROM campaign WHERE segments.date DURING LAST_30_DAYS",
},
)
response.data # Google's JSON, untouchedLive data from Apify, Bright Data and Oxylabs (#113, #208, #255, #263)
- Where vendor data calls an API you hold an account with, live data runs a vendor's ready-made scraper for one website (a product page, Google Maps places) and returns records. Apify, Bright Data and Oxylabs join Nimble
- Ask once and every vendor you hold a key for is searched, then run the source you pick on its own vendor. Apify and Bright Data were tested against the live services
from web_router import WebRouter
router = WebRouter()
page = router.live_data_sources(query="amazon product") # every vendor with a key, asked at once
source = router.live_data_source(page.sources[0]) # its schemas and samples, from its own vendor
result = router.live_data(source, source.samples[0].input) # run it there; no provider named
result.recordsNimble joins the keyless providers (#279)
- More free usage before your first API key: Nimble now serves search and extract with no key, within a free daily allowance, beside the free tiers WebRouter already had (Tavily, You.com, Exa, Parallel and Keenable for search; Tavily, Jina Reader, Firecrawl and Keenable for extract)
- With no keys set,
auto(the default when you name no provider) tries Nimble first, then falls back through the other free tiers when its allowance is spent, so a first run keeps working for longer
Search through your LiteLLM proxy (#262)
- Teams that already run a LiteLLM gateway can send Exa, Tavily and Parallel searches through it: the vendor keys stay on the proxy, and every call is billed and tracked under your LiteLLM key
- Each keeps the full set of options it has when called directly, and joins
autoafter the free tiers. Tested against a live proxy
Cost and time on every response (#275, #278)
- Know what each call cost and how long it took: every search, extract, answer, research and browse response carries
cost_usdandelapsed_s, the backend's own figure where it states one, an estimate otherwise, orNonewhen neither is known - Budgets are no longer experimental. A new router tries free backends first, and a spend log sums what you spent by day, backend or method
from web_router import Budget, WebRouter
router = WebRouter(router="cheapest_first") # free backends first, then the cheapest paid ones
log = router.log_spend("spend.jsonl") # from here on, every answered call is logged
response = router.answer("...", budget=Budget(max_cost_usd=0.01, time_limit_s=10))
response.provider, response.cost_usd, response.cost_source, response.elapsed_s
log.report() # what you spent, by day, backend and methodReady for production (#273, #276, #284, #286)
- Run WebRouter in a service without surprises: a timeout on search, extract and answer, a cap on calls in flight, a pause on a backend that answers with a rate limit or runs out of credit, and a log line for each fallback
- Every error says what went wrong (a bad key, a rate limit, a bad request, the page itself, a timeout) and whether a retry may help. Fallback stops when the next backend would fail the same way, so a broken URL is no longer billed across every backend
- A new Running in production page covers one shared router per process, threads, logging and warm-up
A lighter MCP server (#272, #277)
- The tool list costs a model about 15% less context per turn, you can serve only the tools you name, and
answerreturns only the sources it cites - The server is listed in the official MCP Registry and on Glama
- With no router named,
plan()andrun()now route by built-in rules: a URL is read, a request for a report or a comparison runs research (billed per run), anything else is searched. Methods you call directly are unchanged - Point WebRouter at your own router service or any OpenAI-compatible model, try several routers in order, and register your own by name
🐛 Fixes
extract()reports a 404 page, a bot challenge or a login wall as a failure instead of a document, and underautoa batch retries each failed URL on the next backend (#270)pip install "webrouter[all]"now includes the MCP server, which crashed on start without it, and a billed MCP tool is no longer marked read-only, so a client that auto-approves read-only tools asks first (#269)- A router shared across threads no longer leaks open connections (#268)
research(provider="auto")no longer starts a second paid run, and Nimble research ateffort="max"runs again (#197, #242)- A variable set in a
.envthe library did not load is now named in the error (never its value), with how to load it (#271)
🔄 Behaviour Change
run_template(),templates()andtemplate()are nowlive_data(),live_data_sources()andlive_data_source(). The old names still work with aDeprecationWarninguntil a later release, but the MCP tools are renamed with no alias:live_data_sources,live_data_sourceandlive_data, whosetemplateargument is nowsource. Their results userecordsandsourceskeys, and MCPanswercounts uncited sources inuncited_sourcesinstead ofcitation_count(#113, #277)- With no router named,
plan()andrun()can now run research, billed per run, for a prompt that asks for a report or a comparison. Passrouter=Noneto keep the old behaviour (#265) - A method call with an invalid argument raises
InvalidParameterError(still aValueError) instead of pydantic'sValidationError(#273) answer(provider="you", recency="day")is refused before the call, since You.com cited pages several days old for it (#239)
Full Changelog: v0.12.0...v0.13.0