显式缓存 参数 类型 必填 说明 model string 是 模型名称或模型 ID system string 或 array 否 系统提示。需缓存时使用数组形式,并在最后一个文本块上标记 cachecontrol tools array 否 工具定义数组。需缓存时在最后一个工具对象上标记 cachecontrol messages array 是 对话消息数组,按时间顺序排列 messages[].content string 或 array 是 内容。需缓存时使用数组形式,在目标内容块上标记 cachecontrol cachecontrol object 否 缓存断点标记,可出现在 system、tools、messages.content 的任意可缓存块上 cachecontrol.type string 是 固定值 ephemeral,表示临时缓存 cachecontrol.ttl string 否 缓存有效期:5m(默认)、1h maxtokens integer 是 最大输出 Token 数 stream boolean 否 默认 false。流式模式下缓存用量在 messagedelta 事件中返回
来自: