Note · evergreen
A mock fallback presents fiction as results
- Stage
- evergreen
- Links
- 1 out, 1 in
The first version of procurement returned synthetic offers when no API keys were configured, so the tools could be tried without accounts. The fallback was triggered by “the sources returned nothing”.
Sources also return nothing when a query has no matches. A search for something that does not exist came back with plausible products, prices and sellers, and the caller was an AI model with no way to tell them from real ones.
I removed the fallback. A source that fails now returns a diagnostic entry saying which source failed and why, and a source with no matches returns no offers.
The same shape of problem came back from a different direction. Apify reports quota errors as ordinary items in the result list, an object with an error field where an offer should be. Parsed naively, an exhausted free tier becomes a row of empty products. Those are now split out into diagnostics before anything is ranked.
When the consumer of a tool is a model, an empty answer and an error have to stay distinguishable from data all the way to the output, because the model will reason from whatever it is given.
Projects
- procurement An MCP server that searches Chinese and Australian marketplaces and ranks what it finds by landed cost.
Projects
- procurement An MCP server that searches Chinese and Australian marketplaces and ranks what it finds by landed cost.