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

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