conversation-session-running-queue.json 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-running-queue",
  4. "spec": "./test/e2e/conversation-session/conversation-session-running-queue.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "upstream-running-queue-first-slow-stream",
  8. "description": "A03-A08 running queue 首轮慢流,稳定制造 running 窗口。",
  9. "metadata": {
  10. "kind": "main",
  11. "timingPolicy": "controlled-stream",
  12. "source": "synthetic",
  13. "syntheticReason": "running queue 需要 active turn 保持 streaming,真实模型可能过快完成。"
  14. },
  15. "maxMatches": 1,
  16. "match": {
  17. "method": "POST",
  18. "pathIncludes": "/messages",
  19. "bodyIncludes": [
  20. "E2E_SLOW_STREAM",
  21. "E2E_RUNNING_QUEUE_FIRST"
  22. ],
  23. "bodyExcludes": [
  24. "Generate a concise title",
  25. "CRITICAL: Respond with TEXT ONLY"
  26. ],
  27. "lastUserMessageIncludes": [
  28. "E2E_RUNNING_QUEUE_FIRST"
  29. ]
  30. },
  31. "response": {
  32. "statusCode": 200,
  33. "statusMessage": "OK",
  34. "headers": {
  35. "cache-control": "no-cache",
  36. "content-type": "text/event-stream; charset=utf-8"
  37. },
  38. "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"upstream-e2e-running-queue-first-slow-stream\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":120,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\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\":\"deep\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"seek\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"-e2e-ok\"}}\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":120,\"output_tokens\":12,\"service_tier\":\"standard\"}}\n\nevent: message_stop\ndata: {\"type\":\"message_stop\"}\n\n",
  39. "events": [
  40. {
  41. "sequence": 0,
  42. "offsetMs": 0,
  43. "byteLength": 333,
  44. "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"upstream-e2e-running-queue-first-slow-stream\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":120,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\n"
  45. },
  46. {
  47. "sequence": 1,
  48. "offsetMs": 250,
  49. "byteLength": 120,
  50. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n"
  51. },
  52. {
  53. "sequence": 2,
  54. "offsetMs": 8000,
  55. "byteLength": 118,
  56. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"deep\"}}\n\n"
  57. },
  58. {
  59. "sequence": 3,
  60. "offsetMs": 16000,
  61. "byteLength": 118,
  62. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"seek\"}}\n\n"
  63. },
  64. {
  65. "sequence": 4,
  66. "offsetMs": 24000,
  67. "byteLength": 122,
  68. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"-e2e-ok\"}}\n\n"
  69. },
  70. {
  71. "sequence": 5,
  72. "offsetMs": 90000,
  73. "byteLength": 49,
  74. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
  75. },
  76. {
  77. "sequence": 6,
  78. "offsetMs": 90100,
  79. "byteLength": 179,
  80. "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":120,\"output_tokens\":12,\"service_tier\":\"standard\"}}\n\n"
  81. },
  82. {
  83. "sequence": 7,
  84. "offsetMs": 90200,
  85. "byteLength": 42,
  86. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  87. }
  88. ]
  89. }
  90. },
  91. {
  92. "id": "upstream-running-queue-second-queued-contract",
  93. "description": "A03-A06 second queued marker 合同占位;running 中不应立即发 provider。",
  94. "metadata": {
  95. "kind": "main",
  96. "timingPolicy": "fast-text",
  97. "source": "synthetic",
  98. "syntheticReason": "该 queued text 的产品语义是不打断当前轮且暂不发送;fixture 只覆盖 marker 合同。"
  99. },
  100. "maxMatches": 0,
  101. "match": {
  102. "method": "POST",
  103. "pathIncludes": "/messages",
  104. "bodyIncludes": [
  105. "E2E_RUNNING_QUEUE_SECOND"
  106. ],
  107. "bodyExcludes": [
  108. "Generate a concise title",
  109. "CRITICAL: Respond with TEXT ONLY"
  110. ],
  111. "lastUserMessageIncludes": [
  112. "E2E_RUNNING_QUEUE_SECOND"
  113. ]
  114. },
  115. "response": {
  116. "statusCode": 200,
  117. "text": {
  118. "id": "upstream-e2e-running-queue-second-should-not-send",
  119. "inputTokens": 128,
  120. "outputTokens": 12,
  121. "text": "upstream-e2e-ok"
  122. }
  123. }
  124. },
  125. {
  126. "id": "upstream-running-queue-third-queued-contract",
  127. "description": "A03-A06 third queued marker 合同占位;running 中不应立即发 provider。",
  128. "metadata": {
  129. "kind": "main",
  130. "timingPolicy": "fast-text",
  131. "source": "synthetic",
  132. "syntheticReason": "该 queued text 的产品语义是不打断当前轮且暂不发送;fixture 只覆盖 marker 合同。"
  133. },
  134. "maxMatches": 0,
  135. "match": {
  136. "method": "POST",
  137. "pathIncludes": "/messages",
  138. "bodyIncludes": [
  139. "E2E_RUNNING_QUEUE_THIRD"
  140. ],
  141. "bodyExcludes": [
  142. "Generate a concise title",
  143. "CRITICAL: Respond with TEXT ONLY"
  144. ],
  145. "lastUserMessageIncludes": [
  146. "E2E_RUNNING_QUEUE_THIRD"
  147. ]
  148. },
  149. "response": {
  150. "statusCode": 200,
  151. "text": {
  152. "id": "upstream-e2e-running-queue-third-should-not-send",
  153. "inputTokens": 128,
  154. "outputTokens": 12,
  155. "text": "upstream-e2e-ok"
  156. }
  157. }
  158. },
  159. {
  160. "id": "upstream-running-queue-fourth-queued-contract",
  161. "description": "A03-A06 fourth queued marker 合同占位;running 中不应立即发 provider。",
  162. "metadata": {
  163. "kind": "main",
  164. "timingPolicy": "fast-text",
  165. "source": "synthetic",
  166. "syntheticReason": "该 queued text 的产品语义是不打断当前轮且暂不发送;fixture 只覆盖 marker 合同。"
  167. },
  168. "maxMatches": 0,
  169. "match": {
  170. "method": "POST",
  171. "pathIncludes": "/messages",
  172. "bodyIncludes": [
  173. "E2E_RUNNING_QUEUE_FOURTH"
  174. ],
  175. "bodyExcludes": [
  176. "Generate a concise title",
  177. "CRITICAL: Respond with TEXT ONLY"
  178. ],
  179. "lastUserMessageIncludes": [
  180. "E2E_RUNNING_QUEUE_FOURTH"
  181. ]
  182. },
  183. "response": {
  184. "statusCode": 200,
  185. "text": {
  186. "id": "upstream-e2e-running-queue-fourth-should-not-send",
  187. "inputTokens": 128,
  188. "outputTokens": 12,
  189. "text": "upstream-e2e-ok"
  190. }
  191. }
  192. },
  193. {
  194. "id": "upstream-running-queue-fifth-queued-contract",
  195. "description": "A03-A06 fifth queued marker 合同占位;running 中不应立即发 provider。",
  196. "metadata": {
  197. "kind": "main",
  198. "timingPolicy": "fast-text",
  199. "source": "synthetic",
  200. "syntheticReason": "该 queued text 的产品语义是不打断当前轮且暂不发送;fixture 只覆盖 marker 合同。"
  201. },
  202. "maxMatches": 0,
  203. "match": {
  204. "method": "POST",
  205. "pathIncludes": "/messages",
  206. "bodyIncludes": [
  207. "E2E_RUNNING_QUEUE_FIFTH"
  208. ],
  209. "bodyExcludes": [
  210. "Generate a concise title",
  211. "CRITICAL: Respond with TEXT ONLY"
  212. ],
  213. "lastUserMessageIncludes": [
  214. "E2E_RUNNING_QUEUE_FIFTH"
  215. ]
  216. },
  217. "response": {
  218. "statusCode": 200,
  219. "text": {
  220. "id": "upstream-e2e-running-queue-fifth-should-not-send",
  221. "inputTokens": 128,
  222. "outputTokens": 12,
  223. "text": "upstream-e2e-ok"
  224. }
  225. }
  226. },
  227. {
  228. "id": "upstream-running-queue-goal-queued-contract",
  229. "description": "A07 running 中 /goal 入队合同占位;不应立即发 provider。",
  230. "metadata": {
  231. "kind": "main",
  232. "timingPolicy": "fast-text",
  233. "source": "synthetic",
  234. "syntheticReason": "running 中 /goal 只进入本地 queue,不能立即触发 provider 请求。"
  235. },
  236. "maxMatches": 0,
  237. "match": {
  238. "method": "POST",
  239. "pathIncludes": "/messages",
  240. "bodyIncludes": [
  241. "E2E_RUNNING_QUEUE_GOAL"
  242. ],
  243. "bodyExcludes": [
  244. "Generate a concise title",
  245. "CRITICAL: Respond with TEXT ONLY"
  246. ],
  247. "lastUserMessageIncludes": [
  248. "E2E_RUNNING_QUEUE_GOAL"
  249. ]
  250. },
  251. "response": {
  252. "statusCode": 200,
  253. "text": {
  254. "id": "upstream-e2e-running-queue-goal-should-not-send",
  255. "inputTokens": 128,
  256. "outputTokens": 12,
  257. "text": "upstream-e2e-ok"
  258. }
  259. }
  260. }
  261. ]
  262. }