conversation-session-r3-model-switch.json 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-r3-model-switch",
  4. "spec": "./test/e2e/conversation-session/conversation-session-r3-model-switch.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "r3-switch-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_MODEL_SWITCH"]
  20. },
  21. "response": {
  22. "statusCode": 200,
  23. "text": {
  24. "id": "r3-switch-title",
  25. "inputTokens": 64,
  26. "outputTokens": 8,
  27. "text": "{\"title\":\"R3 model switch\"}"
  28. }
  29. }
  30. },
  31. {
  32. "id": "r3-switch-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_MODEL_SWITCH_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-switch-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_SWITCH_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-switch-model-b",
  91. "description": "请求体为 Model B 的回合",
  92. "metadata": {
  93. "kind": "main",
  94. "timingPolicy": "fast-text",
  95. "source": "synthetic",
  96. "syntheticReason": "观察请求体 model 字段"
  97. },
  98. "maxMatches": 6,
  99. "match": {
  100. "method": "POST",
  101. "pathIncludes": "/messages",
  102. "bodyIncludes": ["e2e-r3-model-b"],
  103. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  104. },
  105. "response": {
  106. "statusCode": 200,
  107. "text": {
  108. "id": "r3-switch-b",
  109. "inputTokens": 64,
  110. "outputTokens": 8,
  111. "text": "R3_MODEL_B_REPLY"
  112. }
  113. }
  114. },
  115. {
  116. "id": "r3-switch-main",
  117. "description": "其它",
  118. "metadata": {
  119. "kind": "main",
  120. "timingPolicy": "fast-text",
  121. "source": "synthetic",
  122. "syntheticReason": "首发/fork/edit"
  123. },
  124. "maxMatches": 12,
  125. "match": {
  126. "method": "POST",
  127. "pathIncludes": "/messages",
  128. "bodyIncludes": ["E2E_R3_MODEL_SWITCH_"],
  129. "bodyExcludes": [
  130. "Generate a concise title",
  131. "CRITICAL: Respond with TEXT ONLY",
  132. "E2E_R3_MODEL_SWITCH_SLOW"
  133. ]
  134. },
  135. "response": {
  136. "statusCode": 200,
  137. "text": {
  138. "id": "r3-switch-main",
  139. "inputTokens": 64,
  140. "outputTokens": 8,
  141. "text": "R3_MODEL_SWITCH_REPLY"
  142. }
  143. }
  144. }
  145. ]
  146. }