Lab
Which OpenRouter setting saves money?
Same prompt, every routing option, measured.
Most OpenRouter routing options are described in general terms. This lab measures them instead. It sends the same support-triage prompt through each strategy in the repo's src/strategies.ts and prints, from each response, the provider that served it, the model that ran, the latency, the tokens, the cached tokens, and the cost.
Sample results
These rows are from a run recorded in the repo:
- default: DeepInfra, deepseek/deepseek-chat-v3.1, 916 ms, 4 cached tokens, $0.00022
- sort:price: DeepInfra, deepseek/deepseek-chat-v3.1, 257 ms, 570 cached tokens, $0.00015
The same prompt produced 570 cached tokens under sort:price and 4 under the default. The full run had 12 calls and cost $0.0165 in total.
The cache row hit on its first call because an earlier run had already written the cache. The cold call in that earlier run cost $0.01158, so the warm read was a 74% cut, per the repo's notes.
The code and the full results table are in the openrouter-routing-lab repo.