(policy: CachePolicy | undefined)
| 31 | // - "none" → no auto placement; manual `CacheHint`s still flow. |
| 32 | // - object form → exactly what the caller asked for. |
| 33 | const resolve = (policy: CachePolicy | undefined): CachePolicyObject => { |
| 34 | if (policy === undefined || policy === "auto") return AUTO |
| 35 | if (policy === "none") return NONE |
| 36 | return policy |
| 37 | } |
| 38 | |
| 39 | // Protocols whose wire format ignores inline cache markers (OpenAI's implicit |
| 40 | // prefix caching, Gemini's implicit + out-of-band CachedContent). Skip the |