conversation-session-total-tokens-reminder-setting.json 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-total-tokens-reminder-setting",
  4. "spec": "./test/e2e/conversation-session/goals/conversation-session-total-tokens-reminder-setting.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "tt-title-k-a",
  8. "description": "a 首发的确定性标题响应。",
  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_K1"]
  20. },
  21. "response": {
  22. "statusCode": 200,
  23. "text": {
  24. "id": "tt-title-k-a",
  25. "inputTokens": 64,
  26. "outputTokens": 8,
  27. "text": "{\"title\": \"Total Tokens Setting a\"}"
  28. }
  29. }
  30. },
  31. {
  32. "id": "tt-k1",
  33. "description": "A 开关打开后的首个请求: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_K1"],
  45. "bodyExcludes": [
  46. "Generate a concise title",
  47. "CRITICAL: Respond with TEXT ONLY",
  48. "toolu_E2E_TTK_READ1"
  49. ]
  50. },
  51. "response": {
  52. "statusCode": 200,
  53. "toolUse": {
  54. "id": "toolu_E2E_TTK_READ1",
  55. "messageId": "msg_toolu_E2E_TTK_READ1",
  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-k2",
  67. "description": "A 工具批次之后:文字收尾,usage 1100/2。",
  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_TTK_READ1"],
  79. "bodyExcludes": [
  80. "Generate a concise title",
  81. "CRITICAL: Respond with TEXT ONLY",
  82. "E2E_TT_K3"
  83. ]
  84. },
  85. "response": {
  86. "statusCode": 200,
  87. "text": {
  88. "id": "tt-k2",
  89. "inputTokens": 1100,
  90. "outputTokens": 2,
  91. "text": "TT_K1_DONE"
  92. }
  93. }
  94. },
  95. {
  96. "id": "tt-k3",
  97. "description": "A 开关关闭后的下一轮:Read,usage 2000/5。",
  98. "metadata": {
  99. "kind": "main",
  100. "timingPolicy": "fast-text",
  101. "source": "synthetic",
  102. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言 token 预算行和倒数提醒。"
  103. },
  104. "maxMatches": 1,
  105. "match": {
  106. "method": "POST",
  107. "pathIncludes": "/messages",
  108. "lastUserMessageIncludes": ["E2E_TT_K3"],
  109. "bodyExcludes": [
  110. "Generate a concise title",
  111. "CRITICAL: Respond with TEXT ONLY",
  112. "toolu_E2E_TTK_READ3"
  113. ]
  114. },
  115. "response": {
  116. "statusCode": 200,
  117. "toolUse": {
  118. "id": "toolu_E2E_TTK_READ3",
  119. "messageId": "msg_toolu_E2E_TTK_READ3",
  120. "name": "Read",
  121. "input": {
  122. "file_path": "{{e2eRuntimeRoot}}/shared/readonly-tool.txt"
  123. },
  124. "inputTokens": 2000,
  125. "outputTokens": 5
  126. }
  127. }
  128. },
  129. {
  130. "id": "tt-k4",
  131. "description": "A 第二个工具批次之后:文字收尾,usage 2100/2。",
  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. "bodyIncludes": ["toolu_E2E_TTK_READ3"],
  143. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  144. },
  145. "response": {
  146. "statusCode": 200,
  147. "text": {
  148. "id": "tt-k4",
  149. "inputTokens": 2100,
  150. "outputTokens": 2,
  151. "text": "TT_K3_DONE"
  152. }
  153. }
  154. },
  155. {
  156. "id": "tt-title-k-b",
  157. "description": "b 首发的确定性标题响应。",
  158. "metadata": {
  159. "kind": "common",
  160. "timingPolicy": "fast-text",
  161. "source": "synthetic",
  162. "syntheticReason": "首发会异步触发 title sidecar;用首轮 marker 隔离并固定标题响应。"
  163. },
  164. "maxMatches": 1,
  165. "match": {
  166. "method": "POST",
  167. "pathIncludes": "/messages",
  168. "bodyIncludes": ["Generate a concise title", "E2E_TT_K5"]
  169. },
  170. "response": {
  171. "statusCode": 200,
  172. "text": {
  173. "id": "tt-title-k-b",
  174. "inputTokens": 64,
  175. "outputTokens": 8,
  176. "text": "{\"title\": \"Total Tokens Setting b\"}"
  177. }
  178. }
  179. },
  180. {
  181. "id": "tt-k5",
  182. "description": "B 开关关闭后新建:文字,usage 1000/5。",
  183. "metadata": {
  184. "kind": "main",
  185. "timingPolicy": "fast-text",
  186. "source": "synthetic",
  187. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言 token 预算行和倒数提醒。"
  188. },
  189. "maxMatches": 1,
  190. "match": {
  191. "method": "POST",
  192. "pathIncludes": "/messages",
  193. "lastUserMessageIncludes": ["E2E_TT_K5"],
  194. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  195. },
  196. "response": {
  197. "statusCode": 200,
  198. "text": {
  199. "id": "tt-k5",
  200. "inputTokens": 1000,
  201. "outputTokens": 5,
  202. "text": "TT_K5_DONE"
  203. }
  204. }
  205. },
  206. {
  207. "id": "tt-k6",
  208. "description": "B 打开状态下重启后冷恢复:文字,usage 1200/5。",
  209. "metadata": {
  210. "kind": "main",
  211. "timingPolicy": "fast-text",
  212. "source": "synthetic",
  213. "syntheticReason": "按上一步的工具调用 id 串成固定顺序;spec 读取请求体,断言 token 预算行和倒数提醒。"
  214. },
  215. "maxMatches": 1,
  216. "match": {
  217. "method": "POST",
  218. "pathIncludes": "/messages",
  219. "lastUserMessageIncludes": ["E2E_TT_K6"],
  220. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  221. },
  222. "response": {
  223. "statusCode": 200,
  224. "text": {
  225. "id": "tt-k6",
  226. "inputTokens": 1200,
  227. "outputTokens": 5,
  228. "text": "TT_K6_DONE"
  229. }
  230. }
  231. }
  232. ]
  233. }