Eleven AI Integrations and No Common Standard
Eleven AI integrations, different APIs, and why even OpenAI-compatible doesn't always mean truly compatible.
Welcome to my blog. Yippee.
Everything here is written by hand. I'm going to type every single character, every damn letter myself, just to bring a tiny spark of humanity back to the internet. (With the exception of this English version, which I'm letting a translator handle. ;))
In times where more and more text is AI-generated just because it's more efficient, writing something yourself almost feels like an art form.
Unfiltered opinions and words. You know what I mean?
My first topic is "Eleven AI Integrations and No Common Standard". Coming from a country where literally everything has an official norm, this is an extreme culture shock.
All you want to do is get as many LLMs as possible running in a single app, and you'd think that would be straightforward.
Text in, text out.
Instead of sticking to OpenAI-compatible APIs, everyone just does their own thing. Anthropic, Google, and plenty of others use completely different formats.
OpenAI-compatible doesn't mean truly compatible.
Even when you ping two servers with the exact same API structure, they often just do whatever they want with the parameters.
For example, presence_penalty is not just another name for repetition_penalty.
The presence_penalty simply penalizes tokens based on whether they've already shown up in the text. The repetition_penalty, on the other hand, tweaks the probabilities in some other way—how exactly, I honestly don't quite get myself.
Both are meant to prevent repetition, just with different math.
And it gets especially funny with max_tokens.
In OpenAI Chat Completions, that thing simply limits the generated tokens, though in the newer reasoning models it was immediately replaced again by max_completion_tokens.
At Anthropic, max_tokens also limits the maximum generated tokens. So far, so good.
But wait a second: What does "maximum" actually mean here? Aren't all generated tokens meant anyway?
Yeah, that's what I thought too. Except at Anthropic, the thinking tokens just casually count toward that limit as well. So if the model takes a moment to really think things through first, it already eats up half the token budget before the actual answer even shows up.
You just want to limit the length of the response, and suddenly you have to factor in how much pondering the model does beforehand. Wonderful.
You want to offer a unified setting in your app, but you can't just send the same value to every provider.
In the best case, the server ignores a parameter it doesn't know. In the worst case, it blows up right in your face with an error message, or the model does something completely unexpected.
The request is formally compatible, but the behavior just isn't.
Sounds like splitting hairs at first, but it's exactly this kind of little stuff that gets super annoying when you're building an app meant to run with different AI providers.
After all, I don't feel like building a completely different user interface for every single provider or turning my entire backend upside down.
Would a common standard make the world a better place?
A nice, shared baseline format for messages, streaming, errors, and tokens in general could save a lot of developers around the world a ton of work.
Sure, there are already well-known libraries like LiteLLM that can take this work off your hands, but as always, abstraction comes at a price:
- Dependency: You create a dependency and have to pray that new models are supported quickly and that development doesn't get abandoned!
- Security: It creates a larger attack surface, which doesn't necessarily mean more vulnerabilities, buuuut...
- Feature set: New or unusual features—especially from smaller providers—aren't supported right away.
Complexity doesn't disappear; you just outsource it.
That said, I do have to cut the providers some slack: a common standard wouldn't automatically solve every problem either.
Models just tick differently. Some can process images, others video; some have thinking modes, others don't. On top of that, you have prompt caching, tool calling, and who knows what else they'll come up with in the future.
If every provider had to sit around and wait nicely for some common standard to be expanded first, it would only slow down new features unnecessarily.
And honestly, I don't think any of us would want that.
So maybe the solution isn't to standardize every little detail to death, but to at least agree on a solid baseline format.
Messages in, answers out, unified errors, and sensible info on token usage. All the special stuff could then be handled through extra features.
That way, providers could keep trying out their own ideas without forcing every app developer to reinvent the wheel for the hundredth time.
That'd be a fair compromise, right?
In the end, my main takeaway is that behind a seemingly simple feature like "Select AI Model," there are a whole lot more headaches than you'd think at first glance.
Text in, text out. Remember?
Toodeloo! :)