OpenAI
5 articles on OpenAI, each a problem from production engineering work and how it was solved.
-
LiteLLM model aliases per use case to survive OpenAI model retirements
Call a LiteLLM alias named after the use case, not a raw model id, so a retired OpenAI model is swapped on the proxy without a deploy.
-
OpenAI strict structured outputs can't decline: check input in code
A strict JSON schema leaves the model no way to return "not enough data", so enforce the evidence minimum before the call, not in the prompt.
-
OpenAI JSON mode needs the word json: guard prompts from Langfuse
Check a Langfuse prompt mentions JSON before sending it in json_object mode, in one shared helper, so an edit fails clearly instead of at the API.
-
Moving a .NET OpenAI SDK call to a LiteLLM proxy: three silent changes
Swapping the OpenAI ChatClient for a LiteLLM proxy client can change your timeout, reasoning effort and model access. Set all three explicitly.
-
What to keep in code when moving LLM prompts to Langfuse
Keep a per-request JSON schema in code, move only the editable instructions to Langfuse, and name the schema separately: OpenAI rejects slashes.