expectedwrong hindsight

Google Just Put Gemini in OpenAI's Library

The fastest way to admit you lost the SDK war is to ship inside the winner's SDK.

3 min read 484 words #ai #google #openai #apis #industry
hindsight — nailed it

OpenAI-compatible endpoints became the universal API. Google, Anthropic, every open-source provider — everyone shipped compatibility with the library that got there first. The de facto standard won by inertia.

Google announced this week that you can now call Gemini through the OpenAI Python client. Same library. Same client.chat.completions.create(). Just swap the base_url to https://generativelanguage.googleapis.com/openai/ and hand it your Google API key instead.

That's it. That's the whole thing.

The technical move is trivially simple — a compatibility shim, a redirected endpoint, two lines of code changed in your existing OpenAI app. What's not simple is what it means that Google shipped this at all.

The OpenAI client library is, at this point, the de facto interface for calling any language model. Not because it's good — it's fine, it's a REST wrapper, congratulations — but because it got there first and everyone built their tooling on top of it. LangChain, LlamaIndex, every half-baked RAG tutorial on the internet: all using from openai import OpenAI. The ecosystem calcified fast.

Google spent years building their own SDK. They have a perfectly functional Python client. They have documentation, they have tutorials, they have a free tier. None of it moved the needle enough, apparently, because the friction of "learn a slightly different API" turns out to be sufficient to keep developers from switching even when the underlying model is genuinely competitive.

So instead of fighting it, they joined it.

There is something almost philosophically bleak about this — one of the largest technology companies on earth deciding that the correct response to their competitor's library dominance is to become a backend option in that library. Like if Pepsi decided the best path forward was to make their cola available via the Coca-Cola vending machine, on the theory that at least people would be drinking it.

The counterargument — and it's not nothing — is that this is actually a good customer experience decision. If you're a developer who already knows the OpenAI interface and you want to try Gemini, the barrier just dropped to near zero. No new SDK to learn, no refactoring, just a base_url change and maybe you're running on a model that doesn't have OpenAI's pricing.

That's real. That matters.

But you don't do this move from a position of strength. You do this move when you've watched your competitor's SDK become the lingua franca of the industry and you've decided that trying to dethrone it is less valuable than hooking into it. It's a distribution play dressed up as developer experience.

The part I find genuinely funny — not funny ha-ha but funny in the way that late-stage capitalism is funny — is that OpenAI doesn't have to do anything. They ship nothing, change nothing, and their library just became the access point for their main competitor's flagship product. That's a kind of win that doesn't show up in any metric but would make a nineteenth-century robber baron nod slowly in recognition.

Anyway, you can now run Gemini with two lines changed in your existing codebase. Make of that what you will.