4 ms·
I kept running into the same problem: every time I wanted to try a different LLM provider, I had to rewrite large parts of my code. Different SDKs, different AP
by Nayjest 8mo ago
I kept running into the same problem: every time I wanted to try a different LLM provider, I had to rewrite large parts of my code. Different SDKs, different APIs, different response formats. It slowed down experiments and made simple comparisons painful.
So I ended up building a small abstraction layer that lets me switch between providers without touching the rest of the app. One interface, multiple backends.
In this post, I explain:
the exact problem I kept hitting
what design choices worked and what didn’t
how I structured the abstraction
and the trade-offs of this approach
If you’ve ever wanted to compare models or avoid vendor lock-in, this might be useful:
https://dev.to/chief_yaml_officer/how-i-stopped-rewriting-my-code-every-time-i-switched-llm-providers-4gjh https://dev.to/chief_yaml_officer/how-i-stopped-rewriting-my...
Source: https://github.com/Nayjest/lm-proxy https://github.com/Nayjest/lm-proxy