Who it is forA developer or operator who pays for a strong model and wants routine requests to use a cheaper channel automatically.
The problemEvery request goes to the same default channel, so simple requests use an expensive model and hard requests may not get the stronger one.
The outcomeRequests land in different channel groups according to a rule table or a workflow graph, and each saved policy can be rolled back to an earlier version.
What you need first
- A Mac, Windows PC, or Linux machine that can run the OSW installer
- API keys for at least two LLM channels you own
- An AI client that lets you set a custom base URL
Steps
- Set up at least two logical models in OSW with different strengths and costs.
- Open Smart Routing and choose between Workflow graph and Rule table in the page header.
- In Workflow graph, drop the LLM request complexity policy onto the canvas, or in Rule table, add one rule per condition with its landing channel.
- Save the policy and send a few test requests of different difficulty through the OSW address.
- Check Request Logs to confirm which channel served each request, then adjust the rules if the split is wrong.
Prompt for your agent
Using the OSW repo at yinxulai/osw, build a Smart Routing policy that sends requests matching <condition> to <channel-group> and everything else to the fallback. Expected output: a saved policy and request log rows showing the chosen channel for each test request. Verify with at least one test request per group before reporting the policy as working.
Caveat. The complexity policy relies on a model to judge difficulty, so it adds a call before routing and its judgments need checking against your own requests.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for yinxulai/osw and "Send hard requests to a strong model and easy ones to a cheap model"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer