conversation-session-total-tokens-reminder.json 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-total-tokens-reminder",
  4. "spec": "./test/e2e/conversation-session/goals/conversation-session-total-tokens-reminder.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "tt-title-a-mcs",
  8. "description": "a-mcs 首发的确定性标题响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "首发会异步触发 title sidecar;用首轮 marker 隔离并固定标题响应。"
  14. },
  15. "maxMatches": 1,
  16. "match": {
  17. "method": "POST",
  18. "pathIncludes": "/messages",
  19. "bodyIncludes": ["Generate a concise title", "E2E_TT_A1_MCS"]
  20. },
  21. "response": {
  22. "statusCode": 200,
  23. "text": {
  24. "id": "tt-title-a-mcs",
  25. "inputTokens": 64,
  26. "outputTokens": 8,
  27. "text": "{\"title\": \"Total Tokens a-mcs\"}"
  28. }
  29. }
  30. },
  31. {
  32. "id": "tt-a1-mcs",
  33. "description": "A MCS 第一轮首个请求:Read,usage 1000/5。",
  34. "metadata": {
  35. "kind": "main",
  36. "timingPolicy": "fast-text",
  37. "source": "synthetic",
  38. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  39. },
  40. "maxMatches": 1,
  41. "match": {
  42. "method": "POST",
  43. "pathIncludes": "/messages",
  44. "lastUserMessageIncludes": ["E2E_TT_A1_MCS"],
  45. "bodyExcludes": [
  46. "Generate a concise title",
  47. "CRITICAL: Respond with TEXT ONLY",
  48. "toolu_E2E_TTREAD_A1_MCS"
  49. ]
  50. },
  51. "response": {
  52. "statusCode": 200,
  53. "toolUse": {
  54. "id": "toolu_E2E_TTREAD_A1_MCS",
  55. "messageId": "msg_toolu_E2E_TTREAD_A1_MCS",
  56. "name": "Read",
  57. "input": {
  58. "file_path": "{{e2eRuntimeRoot}}/shared/readonly-tool.txt"
  59. },
  60. "inputTokens": 1000,
  61. "outputTokens": 5
  62. }
  63. }
  64. },
  65. {
  66. "id": "tt-a2-mcs",
  67. "description": "A MCS 第一个工具批次之后:Read,usage 2400/7。",
  68. "metadata": {
  69. "kind": "main",
  70. "timingPolicy": "fast-text",
  71. "source": "synthetic",
  72. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  73. },
  74. "maxMatches": 1,
  75. "match": {
  76. "method": "POST",
  77. "pathIncludes": "/messages",
  78. "bodyIncludes": ["toolu_E2E_TTREAD_A1_MCS"],
  79. "bodyExcludes": [
  80. "Generate a concise title",
  81. "CRITICAL: Respond with TEXT ONLY",
  82. "toolu_E2E_TTREAD_A2_MCS"
  83. ]
  84. },
  85. "response": {
  86. "statusCode": 200,
  87. "toolUse": {
  88. "id": "toolu_E2E_TTREAD_A2_MCS",
  89. "messageId": "msg_toolu_E2E_TTREAD_A2_MCS",
  90. "name": "Read",
  91. "input": {
  92. "file_path": "{{e2eRuntimeRoot}}/shared/readonly-tool.txt"
  93. },
  94. "inputTokens": 2400,
  95. "outputTokens": 7
  96. }
  97. }
  98. },
  99. {
  100. "id": "tt-a3-mcs",
  101. "description": "A MCS 第二个工具批次之后:文字收尾,usage 2600/9。",
  102. "metadata": {
  103. "kind": "main",
  104. "timingPolicy": "fast-text",
  105. "source": "synthetic",
  106. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  107. },
  108. "maxMatches": 1,
  109. "match": {
  110. "method": "POST",
  111. "pathIncludes": "/messages",
  112. "bodyIncludes": ["toolu_E2E_TTREAD_A2_MCS"],
  113. "bodyExcludes": [
  114. "Generate a concise title",
  115. "CRITICAL: Respond with TEXT ONLY",
  116. "E2E_TT_A2_MCS"
  117. ]
  118. },
  119. "response": {
  120. "statusCode": 200,
  121. "text": {
  122. "id": "tt-a3-mcs",
  123. "inputTokens": 2600,
  124. "outputTokens": 9,
  125. "text": "TT_A1_DONE_MCS"
  126. }
  127. }
  128. },
  129. {
  130. "id": "tt-a4-mcs",
  131. "description": "A MCS 第二轮首个请求:Read,usage 3000/10。",
  132. "metadata": {
  133. "kind": "main",
  134. "timingPolicy": "fast-text",
  135. "source": "synthetic",
  136. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  137. },
  138. "maxMatches": 1,
  139. "match": {
  140. "method": "POST",
  141. "pathIncludes": "/messages",
  142. "lastUserMessageIncludes": ["E2E_TT_A2_MCS"],
  143. "bodyExcludes": [
  144. "Generate a concise title",
  145. "CRITICAL: Respond with TEXT ONLY",
  146. "toolu_E2E_TTREAD_A4_MCS"
  147. ]
  148. },
  149. "response": {
  150. "statusCode": 200,
  151. "toolUse": {
  152. "id": "toolu_E2E_TTREAD_A4_MCS",
  153. "messageId": "msg_toolu_E2E_TTREAD_A4_MCS",
  154. "name": "Read",
  155. "input": {
  156. "file_path": "{{e2eRuntimeRoot}}/shared/readonly-tool.txt"
  157. },
  158. "inputTokens": 3000,
  159. "outputTokens": 10
  160. }
  161. }
  162. },
  163. {
  164. "id": "tt-a5-mcs",
  165. "description": "A MCS 工具批次之后:文字因输出上限停止,usage 3050/8。",
  166. "metadata": {
  167. "kind": "main",
  168. "timingPolicy": "fast-text",
  169. "source": "synthetic",
  170. "syntheticReason": "固定一次因 max_tokens 停止的文字回复,触发输出续写;续写请求同样没有提醒。"
  171. },
  172. "maxMatches": 1,
  173. "match": {
  174. "method": "POST",
  175. "pathIncludes": "/messages",
  176. "bodyIncludes": ["toolu_E2E_TTREAD_A4_MCS"],
  177. "bodyExcludes": [
  178. "Generate a concise title",
  179. "CRITICAL: Respond with TEXT ONLY",
  180. "E2E_TT_A_PARTIAL_MCS"
  181. ]
  182. },
  183. "response": {
  184. "statusCode": 200,
  185. "statusMessage": "OK",
  186. "headers": {
  187. "cache-control": "no-cache",
  188. "content-type": "text/event-stream; charset=utf-8"
  189. },
  190. "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"tt-a5-mcs\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":3050,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0}}}\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"E2E_TT_A_PARTIAL_MCS\"}}\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"max_tokens\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":3050,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":8}}\n\nevent: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  191. }
  192. },
  193. {
  194. "id": "tt-a6-mcs",
  195. "description": "A MCS 输出续写:文字收尾,usage 3100/3。",
  196. "metadata": {
  197. "kind": "main",
  198. "timingPolicy": "fast-text",
  199. "source": "synthetic",
  200. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  201. },
  202. "maxMatches": 1,
  203. "match": {
  204. "method": "POST",
  205. "pathIncludes": "/messages",
  206. "lastUserMessageIncludes": ["Output token limit hit"],
  207. "bodyIncludes": ["E2E_TT_A_PARTIAL_MCS"],
  208. "bodyExcludes": [
  209. "Generate a concise title",
  210. "CRITICAL: Respond with TEXT ONLY",
  211. "E2E_TT_A3_MCS"
  212. ]
  213. },
  214. "response": {
  215. "statusCode": 200,
  216. "text": {
  217. "id": "tt-a6-mcs",
  218. "inputTokens": 3100,
  219. "outputTokens": 3,
  220. "text": "TT_A2_DONE_MCS"
  221. }
  222. }
  223. },
  224. {
  225. "id": "tt-a7-mcs",
  226. "description": "A MCS 冷恢复后第三轮首个请求:Read,usage 3300/4。",
  227. "metadata": {
  228. "kind": "main",
  229. "timingPolicy": "fast-text",
  230. "source": "synthetic",
  231. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  232. },
  233. "maxMatches": 1,
  234. "match": {
  235. "method": "POST",
  236. "pathIncludes": "/messages",
  237. "lastUserMessageIncludes": ["E2E_TT_A3_MCS"],
  238. "bodyExcludes": [
  239. "Generate a concise title",
  240. "CRITICAL: Respond with TEXT ONLY",
  241. "toolu_E2E_TTREAD_A7_MCS"
  242. ]
  243. },
  244. "response": {
  245. "statusCode": 200,
  246. "toolUse": {
  247. "id": "toolu_E2E_TTREAD_A7_MCS",
  248. "messageId": "msg_toolu_E2E_TTREAD_A7_MCS",
  249. "name": "Read",
  250. "input": {
  251. "file_path": "{{e2eRuntimeRoot}}/shared/readonly-tool.txt"
  252. },
  253. "inputTokens": 3300,
  254. "outputTokens": 4
  255. }
  256. }
  257. },
  258. {
  259. "id": "tt-a8-mcs",
  260. "description": "A MCS 冷恢复后的工具批次之后:文字收尾,usage 3400/6。",
  261. "metadata": {
  262. "kind": "main",
  263. "timingPolicy": "fast-text",
  264. "source": "synthetic",
  265. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  266. },
  267. "maxMatches": 1,
  268. "match": {
  269. "method": "POST",
  270. "pathIncludes": "/messages",
  271. "bodyIncludes": ["toolu_E2E_TTREAD_A7_MCS"],
  272. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  273. },
  274. "response": {
  275. "statusCode": 200,
  276. "text": {
  277. "id": "tt-a8-mcs",
  278. "inputTokens": 3400,
  279. "outputTokens": 6,
  280. "text": "TT_A3_DONE_MCS"
  281. }
  282. }
  283. },
  284. {
  285. "id": "tt-title-a-plain",
  286. "description": "a-plain 首发的确定性标题响应。",
  287. "metadata": {
  288. "kind": "common",
  289. "timingPolicy": "fast-text",
  290. "source": "synthetic",
  291. "syntheticReason": "首发会异步触发 title sidecar;用首轮 marker 隔离并固定标题响应。"
  292. },
  293. "maxMatches": 1,
  294. "match": {
  295. "method": "POST",
  296. "pathIncludes": "/messages",
  297. "bodyIncludes": ["Generate a concise title", "E2E_TT_A1_PLAIN"]
  298. },
  299. "response": {
  300. "statusCode": 200,
  301. "text": {
  302. "id": "tt-title-a-plain",
  303. "inputTokens": 64,
  304. "outputTokens": 8,
  305. "text": "{\"title\": \"Total Tokens a-plain\"}"
  306. }
  307. }
  308. },
  309. {
  310. "id": "tt-a1-plain",
  311. "description": "A PLAIN 第一轮首个请求:Read,usage 1000/5。",
  312. "metadata": {
  313. "kind": "main",
  314. "timingPolicy": "fast-text",
  315. "source": "synthetic",
  316. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  317. },
  318. "maxMatches": 1,
  319. "match": {
  320. "method": "POST",
  321. "pathIncludes": "/messages",
  322. "lastUserMessageIncludes": ["E2E_TT_A1_PLAIN"],
  323. "bodyExcludes": [
  324. "Generate a concise title",
  325. "CRITICAL: Respond with TEXT ONLY",
  326. "toolu_E2E_TTREAD_A1_PLAIN"
  327. ]
  328. },
  329. "response": {
  330. "statusCode": 200,
  331. "toolUse": {
  332. "id": "toolu_E2E_TTREAD_A1_PLAIN",
  333. "messageId": "msg_toolu_E2E_TTREAD_A1_PLAIN",
  334. "name": "Read",
  335. "input": {
  336. "file_path": "{{e2eRuntimeRoot}}/shared/readonly-tool.txt"
  337. },
  338. "inputTokens": 1000,
  339. "outputTokens": 5
  340. }
  341. }
  342. },
  343. {
  344. "id": "tt-a2-plain",
  345. "description": "A PLAIN 第一个工具批次之后:Read,usage 2400/7。",
  346. "metadata": {
  347. "kind": "main",
  348. "timingPolicy": "fast-text",
  349. "source": "synthetic",
  350. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  351. },
  352. "maxMatches": 1,
  353. "match": {
  354. "method": "POST",
  355. "pathIncludes": "/messages",
  356. "bodyIncludes": ["toolu_E2E_TTREAD_A1_PLAIN"],
  357. "bodyExcludes": [
  358. "Generate a concise title",
  359. "CRITICAL: Respond with TEXT ONLY",
  360. "toolu_E2E_TTREAD_A2_PLAIN"
  361. ]
  362. },
  363. "response": {
  364. "statusCode": 200,
  365. "toolUse": {
  366. "id": "toolu_E2E_TTREAD_A2_PLAIN",
  367. "messageId": "msg_toolu_E2E_TTREAD_A2_PLAIN",
  368. "name": "Read",
  369. "input": {
  370. "file_path": "{{e2eRuntimeRoot}}/shared/readonly-tool.txt"
  371. },
  372. "inputTokens": 2400,
  373. "outputTokens": 7
  374. }
  375. }
  376. },
  377. {
  378. "id": "tt-a3-plain",
  379. "description": "A PLAIN 第二个工具批次之后:文字收尾,usage 2600/9。",
  380. "metadata": {
  381. "kind": "main",
  382. "timingPolicy": "fast-text",
  383. "source": "synthetic",
  384. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  385. },
  386. "maxMatches": 1,
  387. "match": {
  388. "method": "POST",
  389. "pathIncludes": "/messages",
  390. "bodyIncludes": ["toolu_E2E_TTREAD_A2_PLAIN"],
  391. "bodyExcludes": [
  392. "Generate a concise title",
  393. "CRITICAL: Respond with TEXT ONLY",
  394. "E2E_TT_A2_PLAIN"
  395. ]
  396. },
  397. "response": {
  398. "statusCode": 200,
  399. "text": {
  400. "id": "tt-a3-plain",
  401. "inputTokens": 2600,
  402. "outputTokens": 9,
  403. "text": "TT_A1_DONE_PLAIN"
  404. }
  405. }
  406. },
  407. {
  408. "id": "tt-a4-plain",
  409. "description": "A PLAIN 第二轮首个请求:Read,usage 3000/10。",
  410. "metadata": {
  411. "kind": "main",
  412. "timingPolicy": "fast-text",
  413. "source": "synthetic",
  414. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  415. },
  416. "maxMatches": 1,
  417. "match": {
  418. "method": "POST",
  419. "pathIncludes": "/messages",
  420. "lastUserMessageIncludes": ["E2E_TT_A2_PLAIN"],
  421. "bodyExcludes": [
  422. "Generate a concise title",
  423. "CRITICAL: Respond with TEXT ONLY",
  424. "toolu_E2E_TTREAD_A4_PLAIN"
  425. ]
  426. },
  427. "response": {
  428. "statusCode": 200,
  429. "toolUse": {
  430. "id": "toolu_E2E_TTREAD_A4_PLAIN",
  431. "messageId": "msg_toolu_E2E_TTREAD_A4_PLAIN",
  432. "name": "Read",
  433. "input": {
  434. "file_path": "{{e2eRuntimeRoot}}/shared/readonly-tool.txt"
  435. },
  436. "inputTokens": 3000,
  437. "outputTokens": 10
  438. }
  439. }
  440. },
  441. {
  442. "id": "tt-a5-plain",
  443. "description": "A PLAIN 工具批次之后:文字因输出上限停止,usage 3050/8。",
  444. "metadata": {
  445. "kind": "main",
  446. "timingPolicy": "fast-text",
  447. "source": "synthetic",
  448. "syntheticReason": "固定一次因 max_tokens 停止的文字回复,触发输出续写;续写请求同样没有提醒。"
  449. },
  450. "maxMatches": 1,
  451. "match": {
  452. "method": "POST",
  453. "pathIncludes": "/messages",
  454. "bodyIncludes": ["toolu_E2E_TTREAD_A4_PLAIN"],
  455. "bodyExcludes": [
  456. "Generate a concise title",
  457. "CRITICAL: Respond with TEXT ONLY",
  458. "E2E_TT_A_PARTIAL_PLAIN"
  459. ]
  460. },
  461. "response": {
  462. "statusCode": 200,
  463. "statusMessage": "OK",
  464. "headers": {
  465. "cache-control": "no-cache",
  466. "content-type": "text/event-stream; charset=utf-8"
  467. },
  468. "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"tt-a5-plain\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":3050,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0}}}\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"E2E_TT_A_PARTIAL_PLAIN\"}}\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"max_tokens\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":3050,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":8}}\n\nevent: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  469. }
  470. },
  471. {
  472. "id": "tt-a6-plain",
  473. "description": "A PLAIN 输出续写:文字收尾,usage 3100/3。",
  474. "metadata": {
  475. "kind": "main",
  476. "timingPolicy": "fast-text",
  477. "source": "synthetic",
  478. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  479. },
  480. "maxMatches": 1,
  481. "match": {
  482. "method": "POST",
  483. "pathIncludes": "/messages",
  484. "lastUserMessageIncludes": ["Output token limit hit"],
  485. "bodyIncludes": ["E2E_TT_A_PARTIAL_PLAIN"],
  486. "bodyExcludes": [
  487. "Generate a concise title",
  488. "CRITICAL: Respond with TEXT ONLY",
  489. "E2E_TT_A3_PLAIN"
  490. ]
  491. },
  492. "response": {
  493. "statusCode": 200,
  494. "text": {
  495. "id": "tt-a6-plain",
  496. "inputTokens": 3100,
  497. "outputTokens": 3,
  498. "text": "TT_A2_DONE_PLAIN"
  499. }
  500. }
  501. },
  502. {
  503. "id": "tt-a7-plain",
  504. "description": "A PLAIN 冷恢复后第三轮首个请求:Read,usage 3300/4。",
  505. "metadata": {
  506. "kind": "main",
  507. "timingPolicy": "fast-text",
  508. "source": "synthetic",
  509. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  510. },
  511. "maxMatches": 1,
  512. "match": {
  513. "method": "POST",
  514. "pathIncludes": "/messages",
  515. "lastUserMessageIncludes": ["E2E_TT_A3_PLAIN"],
  516. "bodyExcludes": [
  517. "Generate a concise title",
  518. "CRITICAL: Respond with TEXT ONLY",
  519. "toolu_E2E_TTREAD_A7_PLAIN"
  520. ]
  521. },
  522. "response": {
  523. "statusCode": 200,
  524. "toolUse": {
  525. "id": "toolu_E2E_TTREAD_A7_PLAIN",
  526. "messageId": "msg_toolu_E2E_TTREAD_A7_PLAIN",
  527. "name": "Read",
  528. "input": {
  529. "file_path": "{{e2eRuntimeRoot}}/shared/readonly-tool.txt"
  530. },
  531. "inputTokens": 3300,
  532. "outputTokens": 4
  533. }
  534. }
  535. },
  536. {
  537. "id": "tt-a8-plain",
  538. "description": "A PLAIN 冷恢复后的工具批次之后:文字收尾,usage 3400/6。",
  539. "metadata": {
  540. "kind": "main",
  541. "timingPolicy": "fast-text",
  542. "source": "synthetic",
  543. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  544. },
  545. "maxMatches": 1,
  546. "match": {
  547. "method": "POST",
  548. "pathIncludes": "/messages",
  549. "bodyIncludes": ["toolu_E2E_TTREAD_A7_PLAIN"],
  550. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  551. },
  552. "response": {
  553. "statusCode": 200,
  554. "text": {
  555. "id": "tt-a8-plain",
  556. "inputTokens": 3400,
  557. "outputTokens": 6,
  558. "text": "TT_A3_DONE_PLAIN"
  559. }
  560. }
  561. },
  562. {
  563. "id": "tt-title-c",
  564. "description": "c 首发的确定性标题响应。",
  565. "metadata": {
  566. "kind": "common",
  567. "timingPolicy": "fast-text",
  568. "source": "synthetic",
  569. "syntheticReason": "首发会异步触发 title sidecar;用首轮 marker 隔离并固定标题响应。"
  570. },
  571. "maxMatches": 1,
  572. "match": {
  573. "method": "POST",
  574. "pathIncludes": "/messages",
  575. "bodyIncludes": ["Generate a concise title", "E2E_TT_C1"]
  576. },
  577. "response": {
  578. "statusCode": 200,
  579. "text": {
  580. "id": "tt-title-c",
  581. "inputTokens": 64,
  582. "outputTokens": 8,
  583. "text": "{\"title\": \"Total Tokens c\"}"
  584. }
  585. }
  586. },
  587. {
  588. "id": "tt-c1",
  589. "description": "C 第一轮首个请求:Read,usage 1000/5。",
  590. "metadata": {
  591. "kind": "main",
  592. "timingPolicy": "fast-text",
  593. "source": "synthetic",
  594. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  595. },
  596. "maxMatches": 1,
  597. "match": {
  598. "method": "POST",
  599. "pathIncludes": "/messages",
  600. "lastUserMessageIncludes": ["E2E_TT_C1"],
  601. "bodyExcludes": [
  602. "Generate a concise title",
  603. "CRITICAL: Respond with TEXT ONLY",
  604. "toolu_E2E_TTREAD_C1"
  605. ]
  606. },
  607. "response": {
  608. "statusCode": 200,
  609. "toolUse": {
  610. "id": "toolu_E2E_TTREAD_C1",
  611. "messageId": "msg_toolu_E2E_TTREAD_C1",
  612. "name": "Read",
  613. "input": {
  614. "file_path": "{{e2eRuntimeRoot}}/shared/readonly-tool.txt"
  615. },
  616. "inputTokens": 1000,
  617. "outputTokens": 5
  618. }
  619. }
  620. },
  621. {
  622. "id": "tt-c2",
  623. "description": "C 第一个工具批次之后:Read,usage 975000/7,超过 1000000 窗口的自动压缩阈值。",
  624. "metadata": {
  625. "kind": "main",
  626. "timingPolicy": "fast-text",
  627. "source": "synthetic",
  628. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  629. },
  630. "maxMatches": 1,
  631. "match": {
  632. "method": "POST",
  633. "pathIncludes": "/messages",
  634. "bodyIncludes": ["toolu_E2E_TTREAD_C1"],
  635. "bodyExcludes": [
  636. "Generate a concise title",
  637. "CRITICAL: Respond with TEXT ONLY",
  638. "toolu_E2E_TTREAD_C2"
  639. ]
  640. },
  641. "response": {
  642. "statusCode": 200,
  643. "toolUse": {
  644. "id": "toolu_E2E_TTREAD_C2",
  645. "messageId": "msg_toolu_E2E_TTREAD_C2",
  646. "name": "Read",
  647. "input": {
  648. "file_path": "{{e2eRuntimeRoot}}/shared/readonly-tool.txt"
  649. },
  650. "inputTokens": 975000,
  651. "outputTokens": 7
  652. }
  653. }
  654. },
  655. {
  656. "id": "tt-c-auto-summary",
  657. "description": "C 自动压缩的摘要请求。",
  658. "metadata": {
  659. "kind": "main",
  660. "timingPolicy": "fast-text",
  661. "source": "synthetic",
  662. "syntheticReason": "固定自动压缩的摘要响应,usage 写死。"
  663. },
  664. "maxMatches": 1,
  665. "match": {
  666. "method": "POST",
  667. "pathIncludes": "/messages",
  668. "bodyIncludes": ["CRITICAL: Respond with TEXT ONLY", "E2E_TT_C1"],
  669. "bodyExcludes": ["Generate a concise title", "E2E_TT_C_AUTO_SUMMARY"]
  670. },
  671. "response": {
  672. "statusCode": 200,
  673. "text": {
  674. "id": "tt-c-auto-summary",
  675. "inputTokens": 2000,
  676. "outputTokens": 20,
  677. "text": "<analysis>The user ran readonly tool calls.</analysis>\n\n<summary>1. Primary Request and Intent:\n E2E_TT_C_AUTO_SUMMARY: keep running the readonly tool steps.\n</summary>"
  678. }
  679. }
  680. },
  681. {
  682. "id": "tt-c3",
  683. "description": "C 自动压缩后的首个请求:Read,usage 3000/10。",
  684. "metadata": {
  685. "kind": "main",
  686. "timingPolicy": "fast-text",
  687. "source": "synthetic",
  688. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  689. },
  690. "maxMatches": 1,
  691. "match": {
  692. "method": "POST",
  693. "pathIncludes": "/messages",
  694. "bodyIncludes": ["E2E_TT_C_AUTO_SUMMARY"],
  695. "bodyExcludes": [
  696. "Generate a concise title",
  697. "CRITICAL: Respond with TEXT ONLY",
  698. "toolu_E2E_TTREAD_C3"
  699. ]
  700. },
  701. "response": {
  702. "statusCode": 200,
  703. "toolUse": {
  704. "id": "toolu_E2E_TTREAD_C3",
  705. "messageId": "msg_toolu_E2E_TTREAD_C3",
  706. "name": "Read",
  707. "input": {
  708. "file_path": "{{e2eRuntimeRoot}}/shared/readonly-tool.txt"
  709. },
  710. "inputTokens": 3000,
  711. "outputTokens": 10
  712. }
  713. }
  714. },
  715. {
  716. "id": "tt-c4",
  717. "description": "C 压缩后的工具批次之后:文字收尾,usage 3100/3。",
  718. "metadata": {
  719. "kind": "main",
  720. "timingPolicy": "fast-text",
  721. "source": "synthetic",
  722. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  723. },
  724. "maxMatches": 1,
  725. "match": {
  726. "method": "POST",
  727. "pathIncludes": "/messages",
  728. "bodyIncludes": ["toolu_E2E_TTREAD_C3"],
  729. "bodyExcludes": [
  730. "Generate a concise title",
  731. "CRITICAL: Respond with TEXT ONLY",
  732. "E2E_TT_C2"
  733. ]
  734. },
  735. "response": {
  736. "statusCode": 200,
  737. "text": {
  738. "id": "tt-c4",
  739. "inputTokens": 3100,
  740. "outputTokens": 3,
  741. "text": "TT_C1_DONE"
  742. }
  743. }
  744. },
  745. {
  746. "id": "tt-c-manual-summary",
  747. "description": "C 手动 /compact 的摘要请求。",
  748. "metadata": {
  749. "kind": "main",
  750. "timingPolicy": "fast-text",
  751. "source": "synthetic",
  752. "syntheticReason": "固定手动压缩的摘要响应,usage 写死。"
  753. },
  754. "maxMatches": 1,
  755. "match": {
  756. "method": "POST",
  757. "pathIncludes": "/messages",
  758. "bodyIncludes": ["CRITICAL: Respond with TEXT ONLY", "E2E_TT_C_AUTO_SUMMARY"],
  759. "bodyExcludes": ["Generate a concise title", "E2E_TT_C_MANUAL_SUMMARY"]
  760. },
  761. "response": {
  762. "statusCode": 200,
  763. "text": {
  764. "id": "tt-c-manual-summary",
  765. "inputTokens": 2000,
  766. "outputTokens": 20,
  767. "text": "<analysis>The user ran readonly tool calls.</analysis>\n\n<summary>1. Primary Request and Intent:\n E2E_TT_C_MANUAL_SUMMARY: keep running the readonly tool steps.\n</summary>"
  768. }
  769. }
  770. },
  771. {
  772. "id": "tt-c5",
  773. "description": "C 手动压缩后的第二轮首个请求:Read,usage 3300/4。",
  774. "metadata": {
  775. "kind": "main",
  776. "timingPolicy": "fast-text",
  777. "source": "synthetic",
  778. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  779. },
  780. "maxMatches": 1,
  781. "match": {
  782. "method": "POST",
  783. "pathIncludes": "/messages",
  784. "lastUserMessageIncludes": ["E2E_TT_C2"],
  785. "bodyExcludes": [
  786. "Generate a concise title",
  787. "CRITICAL: Respond with TEXT ONLY",
  788. "toolu_E2E_TTREAD_C5"
  789. ]
  790. },
  791. "response": {
  792. "statusCode": 200,
  793. "toolUse": {
  794. "id": "toolu_E2E_TTREAD_C5",
  795. "messageId": "msg_toolu_E2E_TTREAD_C5",
  796. "name": "Read",
  797. "input": {
  798. "file_path": "{{e2eRuntimeRoot}}/shared/readonly-tool.txt"
  799. },
  800. "inputTokens": 3300,
  801. "outputTokens": 4
  802. }
  803. }
  804. },
  805. {
  806. "id": "tt-c6",
  807. "description": "C 第二轮工具批次之后:文字收尾,usage 3400/6。",
  808. "metadata": {
  809. "kind": "main",
  810. "timingPolicy": "fast-text",
  811. "source": "synthetic",
  812. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  813. },
  814. "maxMatches": 1,
  815. "match": {
  816. "method": "POST",
  817. "pathIncludes": "/messages",
  818. "bodyIncludes": ["toolu_E2E_TTREAD_C5"],
  819. "bodyExcludes": [
  820. "Generate a concise title",
  821. "CRITICAL: Respond with TEXT ONLY",
  822. "E2E_TT_C3"
  823. ]
  824. },
  825. "response": {
  826. "statusCode": 200,
  827. "text": {
  828. "id": "tt-c6",
  829. "inputTokens": 3400,
  830. "outputTokens": 6,
  831. "text": "TT_C2_DONE"
  832. }
  833. }
  834. },
  835. {
  836. "id": "tt-c7",
  837. "description": "C 第三轮首个请求:Read,usage 3500/5。",
  838. "metadata": {
  839. "kind": "main",
  840. "timingPolicy": "fast-text",
  841. "source": "synthetic",
  842. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  843. },
  844. "maxMatches": 1,
  845. "match": {
  846. "method": "POST",
  847. "pathIncludes": "/messages",
  848. "lastUserMessageIncludes": ["E2E_TT_C3"],
  849. "bodyExcludes": [
  850. "Generate a concise title",
  851. "CRITICAL: Respond with TEXT ONLY",
  852. "toolu_E2E_TTREAD_C7"
  853. ]
  854. },
  855. "response": {
  856. "statusCode": 200,
  857. "toolUse": {
  858. "id": "toolu_E2E_TTREAD_C7",
  859. "messageId": "msg_toolu_E2E_TTREAD_C7",
  860. "name": "Read",
  861. "input": {
  862. "file_path": "{{e2eRuntimeRoot}}/shared/readonly-tool.txt"
  863. },
  864. "inputTokens": 3500,
  865. "outputTokens": 5
  866. }
  867. }
  868. },
  869. {
  870. "id": "tt-c8-too-long",
  871. "description": "C 第三轮工具批次之后:上游返回 prompt is too long,触发 reactive compaction。",
  872. "metadata": {
  873. "kind": "main",
  874. "timingPolicy": "fault-stream",
  875. "source": "synthetic",
  876. "syntheticReason": "注入一次上下文超限错误,触发 reactive compaction;错误响应没有 usage。"
  877. },
  878. "maxMatches": 1,
  879. "match": {
  880. "method": "POST",
  881. "pathIncludes": "/messages",
  882. "bodyIncludes": ["toolu_E2E_TTREAD_C7"],
  883. "bodyExcludes": [
  884. "Generate a concise title",
  885. "CRITICAL: Respond with TEXT ONLY",
  886. "E2E_TT_C_REACTIVE_SUMMARY"
  887. ]
  888. },
  889. "response": {
  890. "statusCode": 400,
  891. "headers": {
  892. "content-type": "application/json"
  893. },
  894. "body": "{\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 250000 tokens > 200000 maximum\"}}"
  895. }
  896. },
  897. {
  898. "id": "tt-c-reactive-summary",
  899. "description": "C reactive compaction 的摘要请求。",
  900. "metadata": {
  901. "kind": "main",
  902. "timingPolicy": "fast-text",
  903. "source": "synthetic",
  904. "syntheticReason": "固定 reactive 压缩的摘要响应,usage 写死。"
  905. },
  906. "maxMatches": 1,
  907. "match": {
  908. "method": "POST",
  909. "pathIncludes": "/messages",
  910. "bodyIncludes": ["CRITICAL: Respond with TEXT ONLY", "E2E_TT_C_MANUAL_SUMMARY"],
  911. "bodyExcludes": ["Generate a concise title", "E2E_TT_C_REACTIVE_SUMMARY"]
  912. },
  913. "response": {
  914. "statusCode": 200,
  915. "text": {
  916. "id": "tt-c-reactive-summary",
  917. "inputTokens": 2000,
  918. "outputTokens": 20,
  919. "text": "<analysis>The user ran readonly tool calls.</analysis>\n\n<summary>1. Primary Request and Intent:\n E2E_TT_C_REACTIVE_SUMMARY: keep running the readonly tool steps.\n</summary>"
  920. }
  921. }
  922. },
  923. {
  924. "id": "tt-c9",
  925. "description": "C reactive compaction 后的重试:Read,usage 3700/6。",
  926. "metadata": {
  927. "kind": "main",
  928. "timingPolicy": "fast-text",
  929. "source": "synthetic",
  930. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  931. },
  932. "maxMatches": 1,
  933. "match": {
  934. "method": "POST",
  935. "pathIncludes": "/messages",
  936. "bodyIncludes": ["E2E_TT_C_REACTIVE_SUMMARY"],
  937. "bodyExcludes": [
  938. "Generate a concise title",
  939. "CRITICAL: Respond with TEXT ONLY",
  940. "toolu_E2E_TTREAD_C9"
  941. ]
  942. },
  943. "response": {
  944. "statusCode": 200,
  945. "toolUse": {
  946. "id": "toolu_E2E_TTREAD_C9",
  947. "messageId": "msg_toolu_E2E_TTREAD_C9",
  948. "name": "Read",
  949. "input": {
  950. "file_path": "{{e2eRuntimeRoot}}/shared/readonly-tool.txt"
  951. },
  952. "inputTokens": 3700,
  953. "outputTokens": 6
  954. }
  955. }
  956. },
  957. {
  958. "id": "tt-c10",
  959. "description": "C 重试后的工具批次之后:文字收尾,usage 3800/2。",
  960. "metadata": {
  961. "kind": "main",
  962. "timingPolicy": "fast-text",
  963. "source": "synthetic",
  964. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  965. },
  966. "maxMatches": 1,
  967. "match": {
  968. "method": "POST",
  969. "pathIncludes": "/messages",
  970. "bodyIncludes": ["toolu_E2E_TTREAD_C9"],
  971. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  972. },
  973. "response": {
  974. "statusCode": 200,
  975. "text": {
  976. "id": "tt-c10",
  977. "inputTokens": 3800,
  978. "outputTokens": 2,
  979. "text": "TT_C3_DONE"
  980. }
  981. }
  982. },
  983. {
  984. "id": "tt-title-s",
  985. "description": "s 首发的确定性标题响应。",
  986. "metadata": {
  987. "kind": "common",
  988. "timingPolicy": "fast-text",
  989. "source": "synthetic",
  990. "syntheticReason": "首发会异步触发 title sidecar;用首轮 marker 隔离并固定标题响应。"
  991. },
  992. "maxMatches": 1,
  993. "match": {
  994. "method": "POST",
  995. "pathIncludes": "/messages",
  996. "bodyIncludes": ["Generate a concise title", "E2E_TT_S_PARENT"]
  997. },
  998. "response": {
  999. "statusCode": 200,
  1000. "text": {
  1001. "id": "tt-title-s",
  1002. "inputTokens": 64,
  1003. "outputTokens": 8,
  1004. "text": "{\"title\": \"Total Tokens s\"}"
  1005. }
  1006. }
  1007. },
  1008. {
  1009. "id": "tt-s-parent-agent",
  1010. "description": "S 父会话首个请求:启动 Explore 子 agent,usage 1000/5。",
  1011. "metadata": {
  1012. "kind": "main",
  1013. "timingPolicy": "fast-text",
  1014. "source": "synthetic",
  1015. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  1016. },
  1017. "maxMatches": 1,
  1018. "match": {
  1019. "method": "POST",
  1020. "pathIncludes": "/messages",
  1021. "lastUserMessageIncludes": ["E2E_TT_S_PARENT"],
  1022. "bodyExcludes": [
  1023. "Generate a concise title",
  1024. "CRITICAL: Respond with TEXT ONLY",
  1025. "toolu_E2E_TTREAD_S_agent"
  1026. ]
  1027. },
  1028. "response": {
  1029. "statusCode": 200,
  1030. "toolUse": {
  1031. "id": "toolu_E2E_TTREAD_S_agent",
  1032. "messageId": "msg_toolu_E2E_TTREAD_S_agent",
  1033. "name": "Agent",
  1034. "input": {
  1035. "description": "TT explore",
  1036. "prompt": "E2E_TT_S_CHILD: Read the readonly fixture, then reply.",
  1037. "subagent_type": "Explore",
  1038. "run_in_background": true
  1039. },
  1040. "inputTokens": 1000,
  1041. "outputTokens": 5
  1042. }
  1043. }
  1044. },
  1045. {
  1046. "id": "tt-s-child-1",
  1047. "description": "S 子 agent 首个请求:Read,usage 1000/5。",
  1048. "metadata": {
  1049. "kind": "main",
  1050. "timingPolicy": "fast-text",
  1051. "source": "synthetic",
  1052. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  1053. },
  1054. "maxMatches": 1,
  1055. "match": {
  1056. "method": "POST",
  1057. "pathIncludes": "/messages",
  1058. "bodyIncludes": ["E2E_TT_S_CHILD"],
  1059. "bodyExcludes": [
  1060. "Generate a concise title",
  1061. "CRITICAL: Respond with TEXT ONLY",
  1062. "toolu_E2E_TTREAD_S_agent",
  1063. "toolu_E2E_TTREAD_S_c1"
  1064. ]
  1065. },
  1066. "response": {
  1067. "statusCode": 200,
  1068. "toolUse": {
  1069. "id": "toolu_E2E_TTREAD_S_c1",
  1070. "messageId": "msg_toolu_E2E_TTREAD_S_c1",
  1071. "name": "Read",
  1072. "input": {
  1073. "file_path": "{{e2eRuntimeRoot}}/shared/readonly-tool.txt"
  1074. },
  1075. "inputTokens": 1000,
  1076. "outputTokens": 5
  1077. }
  1078. }
  1079. },
  1080. {
  1081. "id": "tt-s-child-2",
  1082. "description": "S 子 agent 工具批次之后:文字收尾,usage 2400/7。",
  1083. "metadata": {
  1084. "kind": "main",
  1085. "timingPolicy": "fast-text",
  1086. "source": "synthetic",
  1087. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  1088. },
  1089. "maxMatches": 1,
  1090. "match": {
  1091. "method": "POST",
  1092. "pathIncludes": "/messages",
  1093. "bodyIncludes": ["toolu_E2E_TTREAD_S_c1"],
  1094. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  1095. },
  1096. "response": {
  1097. "statusCode": 200,
  1098. "text": {
  1099. "id": "tt-s-child-2",
  1100. "inputTokens": 2400,
  1101. "outputTokens": 7,
  1102. "text": "E2E_TT_S_CHILD_DONE"
  1103. }
  1104. }
  1105. },
  1106. {
  1107. "id": "tt-s-parent-launched",
  1108. "description": "S 父会话 Agent 结果之后:文字,usage 2600/9。",
  1109. "metadata": {
  1110. "kind": "main",
  1111. "timingPolicy": "fast-text",
  1112. "source": "synthetic",
  1113. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  1114. },
  1115. "maxMatches": 1,
  1116. "match": {
  1117. "method": "POST",
  1118. "pathIncludes": "/messages",
  1119. "bodyIncludes": ["toolu_E2E_TTREAD_S_agent", "Async agent launched successfully"],
  1120. "lastUserMessageExcludes": ["<task-notification>"],
  1121. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  1122. },
  1123. "response": {
  1124. "statusCode": 200,
  1125. "text": {
  1126. "id": "tt-s-parent-launched",
  1127. "inputTokens": 2600,
  1128. "outputTokens": 9,
  1129. "text": "TT_S_PARENT_WAITING"
  1130. }
  1131. }
  1132. },
  1133. {
  1134. "id": "tt-s-parent-notified",
  1135. "description": "S 父会话的通知轮:文字收尾,usage 2700/4。",
  1136. "metadata": {
  1137. "kind": "main",
  1138. "timingPolicy": "fast-text",
  1139. "source": "synthetic",
  1140. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  1141. },
  1142. "maxMatches": 1,
  1143. "match": {
  1144. "method": "POST",
  1145. "pathIncludes": "/messages",
  1146. "lastUserMessageIncludes": ["<task-notification>", "E2E_TT_S_CHILD_DONE"],
  1147. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  1148. },
  1149. "response": {
  1150. "statusCode": 200,
  1151. "text": {
  1152. "id": "tt-s-parent-notified",
  1153. "inputTokens": 2700,
  1154. "outputTokens": 4,
  1155. "text": "TT_S_PARENT_DONE"
  1156. }
  1157. }
  1158. },
  1159. {
  1160. "id": "tt-title-n",
  1161. "description": "n 首发的确定性标题响应。",
  1162. "metadata": {
  1163. "kind": "common",
  1164. "timingPolicy": "fast-text",
  1165. "source": "synthetic",
  1166. "syntheticReason": "首发会异步触发 title sidecar;用首轮 marker 隔离并固定标题响应。"
  1167. },
  1168. "maxMatches": 1,
  1169. "match": {
  1170. "method": "POST",
  1171. "pathIncludes": "/messages",
  1172. "bodyIncludes": ["Generate a concise title", "E2E_TT_N1"]
  1173. },
  1174. "response": {
  1175. "statusCode": 200,
  1176. "text": {
  1177. "id": "tt-title-n",
  1178. "inputTokens": 64,
  1179. "outputTokens": 8,
  1180. "text": "{\"title\": \"Total Tokens n\"}"
  1181. }
  1182. }
  1183. },
  1184. {
  1185. "id": "tt-n1",
  1186. "description": "N 首轮:文字,usage 1000/5。",
  1187. "metadata": {
  1188. "kind": "main",
  1189. "timingPolicy": "fast-text",
  1190. "source": "synthetic",
  1191. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  1192. },
  1193. "maxMatches": 1,
  1194. "match": {
  1195. "method": "POST",
  1196. "pathIncludes": "/messages",
  1197. "lastUserMessageIncludes": ["E2E_TT_N1"],
  1198. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  1199. },
  1200. "response": {
  1201. "statusCode": 200,
  1202. "text": {
  1203. "id": "tt-n1",
  1204. "inputTokens": 1000,
  1205. "outputTokens": 5,
  1206. "text": "TT_N1_DONE"
  1207. }
  1208. }
  1209. },
  1210. {
  1211. "id": "tt-n2",
  1212. "description": "N 快照补上预算行并冷恢复后的第二轮:文字,usage 1200/6。",
  1213. "metadata": {
  1214. "kind": "main",
  1215. "timingPolicy": "fast-text",
  1216. "source": "synthetic",
  1217. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  1218. },
  1219. "maxMatches": 1,
  1220. "match": {
  1221. "method": "POST",
  1222. "pathIncludes": "/messages",
  1223. "lastUserMessageIncludes": ["E2E_TT_N2"],
  1224. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  1225. },
  1226. "response": {
  1227. "statusCode": 200,
  1228. "text": {
  1229. "id": "tt-n2",
  1230. "inputTokens": 1200,
  1231. "outputTokens": 6,
  1232. "text": "TT_N2_DONE"
  1233. }
  1234. }
  1235. },
  1236. {
  1237. "id": "tt-n-summary",
  1238. "description": "N 手动 /compact 的摘要请求。",
  1239. "metadata": {
  1240. "kind": "main",
  1241. "timingPolicy": "fast-text",
  1242. "source": "synthetic",
  1243. "syntheticReason": "固定手动压缩的摘要;压缩后 system 按当前代码重建。"
  1244. },
  1245. "maxMatches": 1,
  1246. "match": {
  1247. "method": "POST",
  1248. "pathIncludes": "/messages",
  1249. "bodyIncludes": ["CRITICAL: Respond with TEXT ONLY", "E2E_TT_N2"],
  1250. "bodyExcludes": ["Generate a concise title", "E2E_TT_N_SUMMARY"]
  1251. },
  1252. "response": {
  1253. "statusCode": 200,
  1254. "text": {
  1255. "id": "tt-n-summary",
  1256. "inputTokens": 2000,
  1257. "outputTokens": 20,
  1258. "text": "<analysis>The user sent two greetings.</analysis>\n\n<summary>1. Primary Request and Intent:\n E2E_TT_N_SUMMARY: greet again.\n</summary>"
  1259. }
  1260. }
  1261. },
  1262. {
  1263. "id": "tt-n3",
  1264. "description": "N 压缩后的第三轮:文字,usage 1300/4。",
  1265. "metadata": {
  1266. "kind": "main",
  1267. "timingPolicy": "fast-text",
  1268. "source": "synthetic",
  1269. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  1270. },
  1271. "maxMatches": 1,
  1272. "match": {
  1273. "method": "POST",
  1274. "pathIncludes": "/messages",
  1275. "lastUserMessageIncludes": ["E2E_TT_N3"],
  1276. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  1277. },
  1278. "response": {
  1279. "statusCode": 200,
  1280. "text": {
  1281. "id": "tt-n3",
  1282. "inputTokens": 1300,
  1283. "outputTokens": 4,
  1284. "text": "TT_N3_DONE"
  1285. }
  1286. }
  1287. },
  1288. {
  1289. "id": "tt-title-o",
  1290. "description": "O 首发的确定性标题响应。",
  1291. "metadata": {
  1292. "kind": "common",
  1293. "timingPolicy": "fast-text",
  1294. "source": "synthetic",
  1295. "syntheticReason": "首发会异步触发 title sidecar;用首轮 marker 隔离并固定标题响应。"
  1296. },
  1297. "maxMatches": 1,
  1298. "match": {
  1299. "method": "POST",
  1300. "pathIncludes": "/chat/completions",
  1301. "bodyIncludes": ["Generate a concise title", "E2E_TT_O1"]
  1302. },
  1303. "response": {
  1304. "statusCode": 200,
  1305. "statusMessage": "OK",
  1306. "headers": {
  1307. "content-type": "text/event-stream; charset=utf-8"
  1308. },
  1309. "body": "data: {\"id\":\"tt-title-o\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-tt-openai-model\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"tt-title-o\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-tt-openai-model\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"{\\\"title\\\": \\\"Total Tokens OpenAI\\\"}\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"tt-title-o\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-tt-openai-model\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":64,\"completion_tokens\":8,\"total_tokens\":72}}\n\ndata: [DONE]\n\n"
  1310. }
  1311. },
  1312. {
  1313. "id": "tt-o1",
  1314. "description": "O 第一轮首个请求:Read,usage 1000/5。",
  1315. "metadata": {
  1316. "kind": "main",
  1317. "timingPolicy": "fast-text",
  1318. "source": "synthetic",
  1319. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  1320. },
  1321. "maxMatches": 1,
  1322. "match": {
  1323. "method": "POST",
  1324. "pathIncludes": "/chat/completions",
  1325. "lastUserMessageIncludes": ["E2E_TT_O1"],
  1326. "bodyExcludes": [
  1327. "Generate a concise title",
  1328. "CRITICAL: Respond with TEXT ONLY",
  1329. "call_E2E_TTREAD_O1"
  1330. ]
  1331. },
  1332. "response": {
  1333. "statusCode": 200,
  1334. "statusMessage": "OK",
  1335. "headers": {
  1336. "content-type": "text/event-stream; charset=utf-8"
  1337. },
  1338. "body": "data: {\"id\":\"tt-o1\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-tt-openai-model\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"tt-o1\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-tt-openai-model\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"id\":\"call_E2E_TTREAD_O1\",\"type\":\"function\",\"function\":{\"name\":\"Read\",\"arguments\":\"{\\\"file_path\\\":\\\"{{e2eRuntimeRoot}}/shared/readonly-tool.txt\\\"}\"}}]},\"finish_reason\":null}]}\n\ndata: {\"id\":\"tt-o1\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-tt-openai-model\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"tool_calls\"}],\"usage\":{\"prompt_tokens\":1000,\"completion_tokens\":5,\"total_tokens\":1005}}\n\ndata: [DONE]\n\n"
  1339. }
  1340. },
  1341. {
  1342. "id": "tt-o2",
  1343. "description": "O 工具批次之后:文字收尾,usage 2400/7。",
  1344. "metadata": {
  1345. "kind": "main",
  1346. "timingPolicy": "fast-text",
  1347. "source": "synthetic",
  1348. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  1349. },
  1350. "maxMatches": 1,
  1351. "match": {
  1352. "method": "POST",
  1353. "pathIncludes": "/chat/completions",
  1354. "bodyIncludes": ["call_E2E_TTREAD_O1"],
  1355. "bodyExcludes": [
  1356. "Generate a concise title",
  1357. "CRITICAL: Respond with TEXT ONLY",
  1358. "E2E_TT_O2"
  1359. ]
  1360. },
  1361. "response": {
  1362. "statusCode": 200,
  1363. "statusMessage": "OK",
  1364. "headers": {
  1365. "content-type": "text/event-stream; charset=utf-8"
  1366. },
  1367. "body": "data: {\"id\":\"tt-o2\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-tt-openai-model\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"tt-o2\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-tt-openai-model\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"TT_O1_DONE\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"tt-o2\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-tt-openai-model\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":2400,\"completion_tokens\":7,\"total_tokens\":2407}}\n\ndata: [DONE]\n\n"
  1368. }
  1369. },
  1370. {
  1371. "id": "tt-o3",
  1372. "description": "O 第二轮:文字,usage 2600/9。",
  1373. "metadata": {
  1374. "kind": "main",
  1375. "timingPolicy": "fast-text",
  1376. "source": "synthetic",
  1377. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言没有 token 预算提醒。"
  1378. },
  1379. "maxMatches": 1,
  1380. "match": {
  1381. "method": "POST",
  1382. "pathIncludes": "/chat/completions",
  1383. "lastUserMessageIncludes": ["E2E_TT_O2"],
  1384. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  1385. },
  1386. "response": {
  1387. "statusCode": 200,
  1388. "statusMessage": "OK",
  1389. "headers": {
  1390. "content-type": "text/event-stream; charset=utf-8"
  1391. },
  1392. "body": "data: {\"id\":\"tt-o3\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-tt-openai-model\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"tt-o3\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-tt-openai-model\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"TT_O2_DONE\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"tt-o3\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-tt-openai-model\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":2600,\"completion_tokens\":9,\"total_tokens\":2609}}\n\ndata: [DONE]\n\n"
  1393. }
  1394. }
  1395. ]
  1396. }