conversation-session-r3-queue-selection.json 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-r3-queue-selection",
  4. "spec": "./test/e2e/conversation-session/conversation-session-r3-queue-selection.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "r3-queue-title",
  8. "description": "标题",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "标题不属于断言"
  14. },
  15. "maxMatches": 8,
  16. "match": {
  17. "method": "POST",
  18. "pathIncludes": "/messages",
  19. "bodyIncludes": ["Generate a concise title", "E2E_R3_QUEUE_SELECTION"]
  20. },
  21. "response": {
  22. "statusCode": 200,
  23. "text": {
  24. "id": "r3-queue-title",
  25. "inputTokens": 64,
  26. "outputTokens": 8,
  27. "text": "{\"title\":\"R3 queue selection\"}"
  28. }
  29. }
  30. },
  31. {
  32. "id": "r3-queue-slow",
  33. "description": "Model A 慢回合",
  34. "metadata": {
  35. "kind": "main",
  36. "timingPolicy": "controlled-stream",
  37. "source": "synthetic",
  38. "syntheticReason": "切换需要 running 窗口"
  39. },
  40. "maxMatches": 2,
  41. "match": {
  42. "method": "POST",
  43. "pathIncludes": "/messages",
  44. "lastUserMessageIncludes": ["E2E_R3_QUEUE_SELECTION_SLOW"],
  45. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  46. },
  47. "response": {
  48. "statusCode": 200,
  49. "statusMessage": "OK",
  50. "headers": {
  51. "cache-control": "no-cache",
  52. "content-type": "text/event-stream; charset=utf-8"
  53. },
  54. "chunks": [
  55. {
  56. "offsetMs": 0,
  57. "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"r3-queue-slow\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":80,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\n"
  58. },
  59. {
  60. "offsetMs": 250,
  61. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n"
  62. },
  63. {
  64. "offsetMs": 500,
  65. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"R3_QUEUE_STREAMING \"}}\n\n"
  66. },
  67. {
  68. "offsetMs": 45000,
  69. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
  70. },
  71. {
  72. "offsetMs": 45100,
  73. "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":80,\"output_tokens\":4,\"service_tier\":\"standard\"}}\n\n"
  74. },
  75. {
  76. "offsetMs": 45200,
  77. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  78. }
  79. ],
  80. "text": {
  81. "id": "v4-queue-slow",
  82. "inputTokens": 80,
  83. "outputTokens": 4,
  84. "text": "V4_QUEUE_STREAMING"
  85. },
  86. "releaseAfterChunks": 3
  87. }
  88. },
  89. {
  90. "id": "r3-queue-drained",
  91. "description": "队列消息 drain 回合",
  92. "metadata": {
  93. "kind": "main",
  94. "timingPolicy": "fast-text",
  95. "source": "synthetic",
  96. "syntheticReason": "drain 结果只需可见"
  97. },
  98. "maxMatches": 2,
  99. "match": {
  100. "method": "POST",
  101. "pathIncludes": "/messages",
  102. "lastUserMessageIncludes": ["E2E_R3_QUEUE_SELECTION_QUEUED"],
  103. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  104. },
  105. "response": {
  106. "statusCode": 200,
  107. "text": {
  108. "id": "r3-queue-drained",
  109. "inputTokens": 80,
  110. "outputTokens": 6,
  111. "text": "R3_QUEUE_DRAINED"
  112. }
  113. }
  114. },
  115. {
  116. "id": "r3-queue-model-b",
  117. "description": "请求体为 Model B 的回合",
  118. "metadata": {
  119. "kind": "main",
  120. "timingPolicy": "fast-text",
  121. "source": "synthetic",
  122. "syntheticReason": "观察请求体 model 字段"
  123. },
  124. "maxMatches": 6,
  125. "match": {
  126. "method": "POST",
  127. "pathIncludes": "/messages",
  128. "bodyIncludes": ["e2e-r3-queue-model-b"],
  129. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  130. },
  131. "response": {
  132. "statusCode": 200,
  133. "text": {
  134. "id": "r3-queue-b",
  135. "inputTokens": 64,
  136. "outputTokens": 8,
  137. "text": "R3_QUEUE_MODEL_B_REPLY"
  138. }
  139. }
  140. },
  141. {
  142. "id": "r3-queue-main",
  143. "description": "其它",
  144. "metadata": {
  145. "kind": "main",
  146. "timingPolicy": "fast-text",
  147. "source": "synthetic",
  148. "syntheticReason": "首发/fork/edit"
  149. },
  150. "maxMatches": 12,
  151. "match": {
  152. "method": "POST",
  153. "pathIncludes": "/messages",
  154. "bodyIncludes": ["E2E_R3_QUEUE_SELECTION_"],
  155. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  156. "lastUserMessageIncludes": ["E2E_R3_QUEUE_SELECTION_A_FIRST_PROMPT"]
  157. },
  158. "response": {
  159. "statusCode": 200,
  160. "text": {
  161. "id": "r3-queue-main",
  162. "inputTokens": 64,
  163. "outputTokens": 8,
  164. "text": "R3_QUEUE_SELECTION_REPLY"
  165. }
  166. }
  167. }
  168. ]
  169. }