Who it is forA developer whose provider rejects requests unless a header is set or a field has a specific value.
The problemSome providers need a custom User-Agent, reject a header a client sends, or expect a fixed parameter value, and the client tool offers no setting for this.
The outcomeA request rewrite rule changes the outgoing request for that provider only, and the editor's test case confirms the change before you rely on it.
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
- Open Request Rewrite and pick a template behind New rule, or start a blank rule.
- Set the change you need, such as adding a User-Agent header, dropping a header, or pinning a field to a value.
- Run the test case in the editor to confirm the rewritten request looks correct.
- Save the rule and send a request through the OSW address to the affected provider.
- Check Request Logs to confirm the provider accepted the request.
Prompt for your agent
Using the OSW repo at yinxulai/osw, create a request rewrite rule that <change> for the provider <provider-name>. Expected output: a saved rule and a successful request in Request Logs. Verify that the editor test case passes before saving.
Caveat. Rewrite rules change outgoing requests, so a wrong rule can cause a provider to reject every request it touches until the rule is fixed or removed.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for yinxulai/osw and "Fix a provider's header or field quirk with rewrite rules"
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