trefeon/agentrouter-spoof-proxy ? reverse-engineered prompt
Reverse engineered prompt
Build me a small Go reverse proxy that sits in front of AgentRouter and makes it look like a local OpenAI compatible API.
I want it to run as a single binary or in Docker, listen on a local port, and expose health, models, chat completions, and Anthropic messages endpoints. It should spoof the right headers and cookies so requests get through, stream responses properly, retry on transport errors, and automatically hide broken models so clients can fall back to healthy ones. If a request is invalid or the method is wrong, handle it locally with clear errors instead of forwarding it upstream.
Please include simple config through env vars, a basic install script for Linux and Windows, and a health endpoint I can use to confirm the proxy is working. If anything about the upstream API changes, look up the current docs online and keep the proxy behavior aligned.
Are you gonna build this?
make sure you review the code using coderabbit