Driftwatch

OpenAI / OpenAI API /

Breakingdirection flip: their tools call this safe

role can now return "developer", "function", "system", "tool", "user"

What changed

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

Affects data[].role on ChatCompletionMessageList reachable from 1 operation.

New values: developer, function, system, tool, user.

can now return "developer", "function", "system", "tool", "user"

Who is affected

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

Before and after

WhereBeforeAfter
ChatCompletionMessageList.data[].role"assistant""assistant", "developer", "function", "system", "tool", "user"

Code that breaks

switch (response.data[0].role) {
  // existing branches …
  // no branch for "developer"
  // no branch for "function"
  // no branch for "system"
  // no branch for "tool"
  // no branch for "user"
  default:
    throw new Error("unexpected role");
}

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