Driftwatch

OpenAI / OpenAI API /

Breakingdirection flip: their tools call this safe

finish_reason gained response values

What changed

Producer-side tools call this additive. It breaks exhaustive switches, strict parsers and generated client enums.

Affects choices[].finish_reason on CreateChatCompletionStreamResponse reachable from 1 operation.

can now return null

Who is affected

Code that reads OpenAI's CreateChatCompletionStreamResponse objects, used by 1 OpenAI operation.

Before and after

WhereBeforeAfter
CreateChatCompletionStreamResponse.choices[].finish_reason"content_filter", "function_call", "length", "stop", "tool_calls""content_filter", "function_call", "length", "stop", "tool_calls", null

Code that breaks

switch (response.choices[0].finish_reason) {
  // existing branches …

  default:
    throw new Error("unexpected finish_reason");
}

Based on OpenAI’s published API specification. How severity is decided.