OpenAI2 breaking4 additive
- Breakingdirection flip: their tools call this safeprompt_cache_options is no longer acceptedUsually ignored rather than rejected, so the call succeeds and does something subtly different. 2 places: CreateModelResponseProperties.prompt_cache_options, BetaCreateModelResponseProperties.prompt_cache_options## Code that breaks
await client.post("/…", {
// prompt_cache_options is now ignored, not rejected
prompt_cache_options: value,
});
- Breakingdirection flip: their tools call this safevalue can now return "max_output_tokens"Producer-side tools call this additive. It breaks exhaustive switches, strict parsers and generated client enums. SessionTurnErrorCodeResource · reachable from 6 operations## Code that breaks
switch (response) {
// existing branches …
// no branch for "max_output_tokens"
default:
throw new Error("unexpected value");
}
4 new response fields #
- ResponseUsage.input_tokens_details.cache_write_tokens_details
- BetaResponseUsage.input_tokens_details.cache_write_tokens_details
- BetaResponse.usage.input_tokens_details.cache_write_tokens_details
- Response.usage.input_tokens_details.cache_write_tokens_details