conversation-session-model-output-token-budget.json 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-model-output-token-budget",
  4. "spec": "./test/e2e/conversation-session/models/conversation-session-model-output-token-budget.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "model-output-token-budget-title",
  8. "description": "输出预算 case 内的标题生成固定响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "标题生成不是本 case 的产品语义,只需避免干扰预算请求匹配。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/chat/completions",
  18. "bodyIncludes": ["Generate a concise title"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "statusMessage": "OK",
  23. "headers": {
  24. "content-type": "text/event-stream; charset=utf-8"
  25. },
  26. "body": "data: {\"id\":\"chatcmpl-otb-title\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-default\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-otb-title\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-default\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"{\\\"title\\\":\\\"Output Budget\\\"}\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-otb-title\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-default\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":32,\"completion_tokens\":8,\"total_tokens\":40}}\n\ndata: [DONE]\n\n"
  27. }
  28. },
  29. {
  30. "id": "otb01-default-main",
  31. "description": "OTB01 未声明模型输出上限时,真实主请求必须发送 32K fallback。",
  32. "metadata": {
  33. "kind": "main",
  34. "timingPolicy": "fast-text",
  35. "source": "synthetic",
  36. "syntheticReason": "核心证据来自成功 model-io 的 request.body.max_completion_tokens;响应只需稳定结束。"
  37. },
  38. "maxMatches": 1,
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/chat/completions",
  42. "lastUserMessageIncludes": ["E2E_OTB01_MAIN"],
  43. "bodyIncludes": ["E2E_OTB01_MAIN", "\"max_completion_tokens\":32000", "otb-default"],
  44. "bodyExcludes": ["Generate a concise title", "create a detailed summary"]
  45. },
  46. "response": {
  47. "statusCode": 200,
  48. "statusMessage": "OK",
  49. "headers": {
  50. "content-type": "text/event-stream; charset=utf-8"
  51. },
  52. "body": "data: {\"id\":\"chatcmpl-otb01\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-default\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-otb01\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-default\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"otb01-output-budget-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-otb01\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-default\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":128,\"completion_tokens\":8,\"total_tokens\":136}}\n\ndata: [DONE]\n\n"
  53. }
  54. },
  55. {
  56. "id": "otb02-16k-main",
  57. "description": "OTB02 首轮 16K 主请求。",
  58. "metadata": {
  59. "kind": "main",
  60. "timingPolicy": "fast-text",
  61. "source": "synthetic",
  62. "syntheticReason": "核心证据来自成功 model-io 的请求体;响应只需稳定结束。"
  63. },
  64. "maxMatches": 1,
  65. "match": {
  66. "method": "POST",
  67. "pathIncludes": "/chat/completions",
  68. "lastUserMessageIncludes": ["E2E_OTB02_MAIN"],
  69. "bodyIncludes": ["E2E_OTB02_MAIN", "\"max_completion_tokens\":16000", "otb-16k"],
  70. "bodyExcludes": ["Generate a concise title", "create a detailed summary"]
  71. },
  72. "response": {
  73. "statusCode": 200,
  74. "statusMessage": "OK",
  75. "headers": {
  76. "content-type": "text/event-stream; charset=utf-8"
  77. },
  78. "body": "data: {\"id\":\"chatcmpl-otb02\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-16k\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-otb02\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-16k\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"otb02-output-budget-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-otb02\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-16k\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":160,\"completion_tokens\":8,\"total_tokens\":168}}\n\ndata: [DONE]\n\n"
  79. }
  80. },
  81. {
  82. "id": "otb02-16k-history",
  83. "description": "OTB02 第二轮 16K 主请求形成可手动压缩历史。",
  84. "metadata": {
  85. "kind": "main",
  86. "timingPolicy": "fast-text",
  87. "source": "synthetic",
  88. "syntheticReason": "第二轮只用于满足现有 Compact 的两轮历史前置条件,且仍需保持 16K。"
  89. },
  90. "maxMatches": 1,
  91. "match": {
  92. "method": "POST",
  93. "pathIncludes": "/chat/completions",
  94. "lastUserMessageIncludes": ["E2E_OTB02_HISTORY"],
  95. "bodyIncludes": ["E2E_OTB02_HISTORY", "\"max_completion_tokens\":16000", "otb-16k"],
  96. "bodyExcludes": ["Generate a concise title", "create a detailed summary"]
  97. },
  98. "response": {
  99. "statusCode": 200,
  100. "statusMessage": "OK",
  101. "headers": {
  102. "content-type": "text/event-stream; charset=utf-8"
  103. },
  104. "body": "data: {\"id\":\"chatcmpl-otb02-history\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-16k\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-otb02-history\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-16k\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"otb02-history-ready\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-otb02-history\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-16k\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":192,\"completion_tokens\":8,\"total_tokens\":200}}\n\ndata: [DONE]\n\n"
  105. }
  106. },
  107. {
  108. "id": "otb02-16k-compact",
  109. "description": "OTB02 effective=16K 时 Compact summary 请求也必须为 16K。",
  110. "metadata": {
  111. "kind": "main",
  112. "timingPolicy": "fast-text",
  113. "source": "synthetic",
  114. "syntheticReason": "核心证据来自 querySource=compact 的成功 model-io 请求体。"
  115. },
  116. "maxMatches": 1,
  117. "match": {
  118. "method": "POST",
  119. "pathIncludes": "/chat/completions",
  120. "bodyIncludes": [
  121. "E2E_OTB02_MAIN",
  122. "create a detailed summary",
  123. "\"max_completion_tokens\":16000",
  124. "otb-16k"
  125. ],
  126. "bodyExcludes": ["Generate a concise title"]
  127. },
  128. "response": {
  129. "statusCode": 200,
  130. "statusMessage": "OK",
  131. "headers": {
  132. "content-type": "text/event-stream; charset=utf-8"
  133. },
  134. "body": "data: {\"id\":\"chatcmpl-otb02-compact\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-16k\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-otb02-compact\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-16k\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"<summary>OTB02 retained its two 16K-budget turns.</summary>\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-otb02-compact\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-16k\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":256,\"completion_tokens\":32,\"total_tokens\":288}}\n\ndata: [DONE]\n\n"
  135. }
  136. },
  137. {
  138. "id": "otb03-64k-main",
  139. "description": "OTB03 模型级 64K 必须原样进入真实主请求,不能被 32K 裁剪。",
  140. "metadata": {
  141. "kind": "main",
  142. "timingPolicy": "fast-text",
  143. "source": "synthetic",
  144. "syntheticReason": "响应只为完成请求;model-io 请求体是验收证据。"
  145. },
  146. "maxMatches": 1,
  147. "match": {
  148. "method": "POST",
  149. "pathIncludes": "/chat/completions",
  150. "lastUserMessageIncludes": ["E2E_OTB03_MAIN"],
  151. "bodyIncludes": ["E2E_OTB03_MAIN", "\"max_completion_tokens\":64000", "otb-64k"],
  152. "bodyExcludes": ["Generate a concise title", "create a detailed summary"]
  153. },
  154. "response": {
  155. "statusCode": 200,
  156. "statusMessage": "OK",
  157. "headers": {
  158. "content-type": "text/event-stream; charset=utf-8"
  159. },
  160. "body": "data: {\"id\":\"chatcmpl-otb03\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-64k\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-otb03\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-64k\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"otb03-output-budget-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-otb03\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-64k\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":192,\"completion_tokens\":8,\"total_tokens\":200}}\n\ndata: [DONE]\n\n"
  161. }
  162. },
  163. {
  164. "id": "otb06-64k-history",
  165. "description": "OTB06 先形成一轮低 usage 历史,确保 Auto Compact 有至少两轮可总结内容。",
  166. "metadata": {
  167. "kind": "main",
  168. "timingPolicy": "fast-text",
  169. "source": "synthetic",
  170. "syntheticReason": "Auto Compact 会保留最新轮;先形成低 usage 历史,才能让后续高 usage seed 触发真实 summary 请求。"
  171. },
  172. "maxMatches": 1,
  173. "match": {
  174. "method": "POST",
  175. "pathIncludes": "/chat/completions",
  176. "lastUserMessageIncludes": ["E2E_OTB06_HISTORY"],
  177. "bodyIncludes": ["E2E_OTB06_HISTORY", "\"max_completion_tokens\":64000", "otb-64k"],
  178. "bodyExcludes": ["Generate a concise title", "create a detailed summary"]
  179. },
  180. "response": {
  181. "statusCode": 200,
  182. "statusMessage": "OK",
  183. "headers": {
  184. "content-type": "text/event-stream; charset=utf-8"
  185. },
  186. "body": "data: {\"id\":\"chatcmpl-otb06-history\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-64k\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-otb06-history\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-64k\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"otb06-history-ready\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-otb06-history\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-64k\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":192,\"completion_tokens\":8,\"total_tokens\":200}}\n\ndata: [DONE]\n\n"
  187. }
  188. },
  189. {
  190. "id": "otb06-64k-seed",
  191. "description": "OTB06 第二轮返回超过 94K threshold 的 provider usage,驱动下一轮 Auto Compact。",
  192. "metadata": {
  193. "kind": "main",
  194. "timingPolicy": "fast-text",
  195. "source": "synthetic",
  196. "syntheticReason": "受控 usage 用于稳定触发 128K context、21K reserve 的 Auto Compact 决策。"
  197. },
  198. "maxMatches": 1,
  199. "match": {
  200. "method": "POST",
  201. "pathIncludes": "/chat/completions",
  202. "lastUserMessageIncludes": ["E2E_OTB06_SEED"],
  203. "bodyIncludes": ["E2E_OTB06_SEED", "\"max_completion_tokens\":64000", "otb-64k"],
  204. "bodyExcludes": ["Generate a concise title", "create a detailed summary"]
  205. },
  206. "response": {
  207. "statusCode": 200,
  208. "statusMessage": "OK",
  209. "headers": {
  210. "content-type": "text/event-stream; charset=utf-8"
  211. },
  212. "body": "data: {\"id\":\"chatcmpl-otb06-seed\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-64k\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-otb06-seed\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-64k\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"otb06-seed-ready\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-otb06-seed\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-64k\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":95000,\"completion_tokens\":8,\"total_tokens\":95008}}\n\ndata: [DONE]\n\n"
  213. }
  214. },
  215. {
  216. "id": "otb06-64k-auto-compact",
  217. "description": "OTB06 Auto Compact summary 使用 reserve=min(64K, max(21K, 128K×8%))=21K。",
  218. "metadata": {
  219. "kind": "main",
  220. "timingPolicy": "fast-text",
  221. "source": "synthetic",
  222. "syntheticReason": "Auto Compact 的成功请求体和决策日志共同证明 reserve/summary 预算一致。"
  223. },
  224. "maxMatches": 1,
  225. "match": {
  226. "method": "POST",
  227. "pathIncludes": "/chat/completions",
  228. "bodyIncludes": [
  229. "E2E_OTB06_SEED",
  230. "create a detailed summary",
  231. "\"max_completion_tokens\":21000",
  232. "otb-64k"
  233. ],
  234. "bodyExcludes": ["Generate a concise title"]
  235. },
  236. "response": {
  237. "statusCode": 200,
  238. "statusMessage": "OK",
  239. "headers": {
  240. "content-type": "text/event-stream; charset=utf-8"
  241. },
  242. "body": "data: {\"id\":\"chatcmpl-otb06-compact\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-64k\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-otb06-compact\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-64k\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"<summary>OTB06 retained the seed turn before continuing.</summary>\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-otb06-compact\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-64k\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":256,\"completion_tokens\":32,\"total_tokens\":288}}\n\ndata: [DONE]\n\n"
  243. }
  244. },
  245. {
  246. "id": "otb06-64k-post-compact-main",
  247. "description": "OTB06 压缩后的主请求仍必须发送 64K。",
  248. "metadata": {
  249. "kind": "main",
  250. "timingPolicy": "fast-text",
  251. "source": "synthetic",
  252. "syntheticReason": "验证 Auto Compact 后主请求没有回退到旧 32K cap。"
  253. },
  254. "maxMatches": 1,
  255. "match": {
  256. "method": "POST",
  257. "pathIncludes": "/chat/completions",
  258. "lastUserMessageIncludes": ["E2E_OTB06_POST"],
  259. "bodyIncludes": ["E2E_OTB06_POST", "\"max_completion_tokens\":64000", "otb-64k"],
  260. "bodyExcludes": ["Generate a concise title", "create a detailed summary"]
  261. },
  262. "response": {
  263. "statusCode": 200,
  264. "statusMessage": "OK",
  265. "headers": {
  266. "content-type": "text/event-stream; charset=utf-8"
  267. },
  268. "body": "data: {\"id\":\"chatcmpl-otb06-post\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-64k\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-otb06-post\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-64k\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"otb06-post-compact-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-otb06-post\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-64k\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":320,\"completion_tokens\":8,\"total_tokens\":328}}\n\ndata: [DONE]\n\n"
  269. }
  270. },
  271. {
  272. "id": "otb07-before-refresh-main",
  273. "description": "OTB07 当前模型未声明输出上限时,热更新前主请求使用 32K fallback。",
  274. "metadata": {
  275. "kind": "main",
  276. "timingPolicy": "fast-text",
  277. "source": "synthetic",
  278. "syntheticReason": "先建立同一 active session 的旧 runtime 预算,核心证据来自成功 model-io 请求体。"
  279. },
  280. "maxMatches": 1,
  281. "match": {
  282. "method": "POST",
  283. "pathIncludes": "/chat/completions",
  284. "lastUserMessageIncludes": ["E2E_OTB07_BEFORE_REFRESH"],
  285. "bodyIncludes": [
  286. "E2E_OTB07_BEFORE_REFRESH",
  287. "\"max_completion_tokens\":32000",
  288. "otb-runtime-refresh"
  289. ],
  290. "bodyExcludes": ["Generate a concise title", "create a detailed summary"]
  291. },
  292. "response": {
  293. "statusCode": 200,
  294. "statusMessage": "OK",
  295. "headers": {
  296. "content-type": "text/event-stream; charset=utf-8"
  297. },
  298. "body": "data: {\"id\":\"chatcmpl-otb07-before\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-runtime-refresh\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-otb07-before\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-runtime-refresh\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"otb07-before-refresh-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-otb07-before\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-runtime-refresh\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":192,\"completion_tokens\":8,\"total_tokens\":200}}\n\ndata: [DONE]\n\n"
  299. }
  300. },
  301. {
  302. "id": "otb07-after-refresh-main",
  303. "description": "OTB07 registry 为同一模型补齐 64K 后,同一 session 的下一主请求立即使用 64K。",
  304. "metadata": {
  305. "kind": "main",
  306. "timingPolicy": "fast-text",
  307. "source": "synthetic",
  308. "syntheticReason": "请求响应只需稳定结束;session identity 与成功 model-io 请求体共同证明 active runtime 已刷新。"
  309. },
  310. "maxMatches": 1,
  311. "match": {
  312. "method": "POST",
  313. "pathIncludes": "/chat/completions",
  314. "lastUserMessageIncludes": ["E2E_OTB07_AFTER_REFRESH"],
  315. "bodyIncludes": [
  316. "E2E_OTB07_AFTER_REFRESH",
  317. "\"max_completion_tokens\":64000",
  318. "otb-runtime-refresh"
  319. ],
  320. "bodyExcludes": ["Generate a concise title", "create a detailed summary"]
  321. },
  322. "response": {
  323. "statusCode": 200,
  324. "statusMessage": "OK",
  325. "headers": {
  326. "content-type": "text/event-stream; charset=utf-8"
  327. },
  328. "body": "data: {\"id\":\"chatcmpl-otb07-after\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-runtime-refresh\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-otb07-after\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-runtime-refresh\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"otb07-after-refresh-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-otb07-after\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-runtime-refresh\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":224,\"completion_tokens\":8,\"total_tokens\":232}}\n\ndata: [DONE]\n\n"
  329. }
  330. },
  331. {
  332. "id": "otb07-after-refresh-compact",
  333. "description": "OTB07 热更新后的手动 Compact 使用 reserve=min(64K, max(21K, 128K×8%))=21K。",
  334. "metadata": {
  335. "kind": "main",
  336. "timingPolicy": "fast-text",
  337. "source": "synthetic",
  338. "syntheticReason": "核心证据来自同一 session 中 querySource=compact 的成功 model-io 请求体。"
  339. },
  340. "maxMatches": 1,
  341. "match": {
  342. "method": "POST",
  343. "pathIncludes": "/chat/completions",
  344. "bodyIncludes": [
  345. "E2E_OTB07_BEFORE_REFRESH",
  346. "E2E_OTB07_AFTER_REFRESH",
  347. "create a detailed summary",
  348. "\"max_completion_tokens\":21000",
  349. "otb-runtime-refresh"
  350. ],
  351. "bodyExcludes": ["Generate a concise title"]
  352. },
  353. "response": {
  354. "statusCode": 200,
  355. "statusMessage": "OK",
  356. "headers": {
  357. "content-type": "text/event-stream; charset=utf-8"
  358. },
  359. "body": "data: {\"id\":\"chatcmpl-otb07-compact\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-runtime-refresh\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-otb07-compact\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-runtime-refresh\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"<summary>OTB07 retained both turns across the runtime registry refresh.</summary>\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-otb07-compact\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"otb-runtime-refresh\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":288,\"completion_tokens\":32,\"total_tokens\":320}}\n\ndata: [DONE]\n\n"
  360. }
  361. }
  362. ]
  363. }