↓ Skip to main content
Make Your App Survive Any OpenAI Shake-Up in One Sitting
Daily Signal 3 min read

Make Your App Survive Any OpenAI Shake-Up in One Sitting

The Atlantic ran 'I quit OpenAI because its culture is broken.' Here is how to make your app indifferent to which lab ships the model.

In one sitting you will know how to make your app indifferent to which lab ships your model. The Atlantic just ran an essay titled “I quit OpenAI because its culture is broken.”

This post does not summarize that essay. Read it yourself for what the author alleges. The headline alone is enough to raise the builder’s question: if the vendor wobbles, what does it cost me to leave?

For most apps the honest answer is “a rewrite.” That is the problem worth fixing.

The recipe:

  1. Search your codebase for every direct vendor SDK import and every hardcoded model string.
  2. Collapse all of them into a single function that every feature calls.
  3. Move the base URL, API key and model name into environment variables.
  4. Save the prompts you cannot afford to break as a golden file: real inputs, plus a check for what a passing output looks like.
  5. Run that file against a second provider’s OpenAI-compatible endpoint and write down what fails.

Here is the whole abstraction. Paste it as llm.py:

import os
from openai import OpenAI

# .env
# LLM_BASE_URL=<your provider's OpenAI-compatible base URL>
# LLM_API_KEY=<key for that provider>
# LLM_MODEL=<model name on that provider>

client = OpenAI(
    base_url=os.environ["LLM_BASE_URL"],
    api_key=os.environ["LLM_API_KEY"],
)
MODEL = os.environ["LLM_MODEL"]

def ask(prompt: str, system: str = "") -> str:
    messages = []
    if system:
        messages.append({"role": "system", "content": system})
    messages.append({"role": "user", "content": prompt})
    r = client.chat.completions.create(model=MODEL, messages=messages)
    return r.choices[0].message.content

Switching providers is now three lines in a .env file. Your golden file tells you whether the switch is safe.

The gotcha: the function is portable, your prompts are not. Prompts tuned against one model quietly lean on its habits. You will recognise it when the second provider returns valid text that breaks your parser: JSON wrapped in prose, tool calls shaped differently, a refusal where there used to be an answer. If your golden file only checks that a response exists, it will pass while production burns. Check structure, not vibes. A validation layer helps here, and the Forge write-up shows how guardrails around a model change what it can reliably do. The same discipline matters when a vendor’s quality drifts under you, as in this look at Claude Code quality reports.

My read: a resignation essay should never be what forces a migration. If swapping providers takes you more than an env change and a test run, the concentration risk is in your architecture, not in any lab’s culture. Fix that this week, while nothing is on fire.

One AI signal a day. 90 seconds. No fluff. Subscribe and get it in your inbox.