Great write-up! This is exactly what we do. Pointing coding CLIs at cheaper models is the single biggest cost saver we've found.
A few things we learned:
- Not all CLI tools support custom endpoints the same way. Some only do Chat Completions, some do Messages, some do Responses. Make sure your API gateway supports all the protocols you need.
- Model tiering matters. Don't use the same model for everything. Routine tasks (reading files, simple edits) work fine on cheap flash models. Only use frontier models for hard reasoning.
- Easy switching is key. If switching models means editing config files and restarting, you won't do it. Make it one-click or one-command.
We ended up using a multi-model gateway that gives us access to 40+ models through one endpoint. Switching between them is just changing the model name. No SDK changes, no different auth.
The cost savings are real. Once you stop running every single task on the most expensive model, the bill drops 50-70% easily.
Nice guide. This should save people a lot of money.
Great write-up! This is exactly what we do. Pointing coding CLIs at cheaper models is the single biggest cost saver we've found.
A few things we learned:
We ended up using a multi-model gateway that gives us access to 40+ models through one endpoint. Switching between them is just changing the model name. No SDK changes, no different auth.
The cost savings are real. Once you stop running every single task on the most expensive model, the bill drops 50-70% easily.
Nice guide. This should save people a lot of money.