openai.internal._apply_cache_breakpoints

(internal) Write each recorded cache breakpoint onto its content part. The prompt's items are always the FIRST items of `input` (the journal's are appended after), and the null-prune drops map entries, never array elements, so the recorded indices still address the same parts.

Reference version

Signature

function openai.internal._apply_cache_breakpoints(
body: baml.json.json,
) -> baml.json.json throws never

(internal) Write each recorded cache breakpoint onto its content part. The prompt's items are always the FIRST items of input (the journal's are appended after), and the null-prune drops map entries, never array elements, so the recorded indices still address the same parts.

Applied to the SERIALIZED body, after the null-prune, because args is the caller's own JSON: an explicit null inside it is theirs, not an unset field. A second breakpoint on the same part replaces the first.

Source:<builtin>/openai/ns_internal/responses.bamlbytes 20354–20954