NVIDIA-NeMo/Switchyard ? reverse-engineered prompt
Reverse engineered prompt
Build me a Rust project called Switchyard that acts as a proxy for LLM traffic and can also be used as a library for routing decisions.
I want it to let an agent keep using the API it already expects, like OpenAI Chat, OpenAI Responses, or Anthropic Messages, while Switchyard translates the request to whatever backend is configured and translates the reply back. It should support routing across multiple model backends, including simple random splits, a classifier style route, a stage based route, and a passthrough option for one to one forwarding. I also want basic metrics for requests, errors, latency, tokens, and routing overhead, plus a simple health endpoint.
Please include a command line way to run it as a standalone server, and a small launcher flow for pointing a coding agent at it. Make the configuration easy to understand with a TOML file, and add a few example configs and docs so I can try it locally. If you need to check current library or API docs online, feel free to look them up.
Are you gonna build this?
make sure you review the code using coderabbit