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

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