conversation-session-model-switch-edit-fork.json 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-model-switch-edit-fork",
  4. "spec": "./test/e2e/conversation-session/conversation-session-model-switch-edit-fork.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "model-switch-edit-fork-title",
  8. "description": "P0-10 completed 后 edit/fork 切模型 case 内的标题生成固定响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "标题生成不是本 case 产品语义,只需要稳定返回,防止标题请求误命中业务 fixture。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "statusMessage": "OK",
  23. "headers": {
  24. "content-type": "application/json; charset=utf-8"
  25. },
  26. "body": "{\"id\":\"upstream-e2e-model-switch-edit-fork-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-pro\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Model Switch Edit Fork\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":125,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":24,\"service_tier\":\"standard\"}}"
  27. }
  28. },
  29. {
  30. "id": "model-switch-edit-source-primary",
  31. "description": "P0-10 edit 分支 source turn,以 primary 配置建立 completed 历史。",
  32. "metadata": {
  33. "kind": "main",
  34. "timingPolicy": "fast-text",
  35. "source": "synthetic",
  36. "syntheticReason": "核心断言在请求 capture 的 primary model/thought 和后续 edit 重跑配置;响应只需稳定完成。"
  37. },
  38. "maxMatches": 1,
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/messages",
  42. "lastUserMessageIncludes": ["E2E_MODEL_SWITCH_EDIT_SOURCE"],
  43. "bodyIncludes": ["E2E_MODEL_SWITCH_EDIT_SOURCE", "upstream-e2e-ok"],
  44. "bodyExcludes": [
  45. "Generate a concise title",
  46. "CRITICAL: Respond with TEXT ONLY"
  47. ]
  48. },
  49. "response": {
  50. "statusCode": 200,
  51. "statusMessage": "OK",
  52. "text": {
  53. "id": "upstream-e2e-model-switch-edit-source-primary",
  54. "inputTokens": 128,
  55. "outputTokens": 12,
  56. "text": "upstream-e2e-ok"
  57. }
  58. }
  59. },
  60. {
  61. "id": "model-switch-edit-rerun-secondary",
  62. "description": "P0-10 edit 分支 completed 后切 secondary 再重跑的固定回复。",
  63. "metadata": {
  64. "kind": "main",
  65. "timingPolicy": "fast-text",
  66. "source": "synthetic",
  67. "syntheticReason": "核心断言在 edit rerun 请求 capture 的 secondary model/thought,响应只需稳定完成。"
  68. },
  69. "maxMatches": 1,
  70. "match": {
  71. "method": "POST",
  72. "pathIncludes": "/messages",
  73. "lastUserMessageIncludes": ["E2E_MODEL_SWITCH_EDIT_RERUN"],
  74. "bodyIncludes": ["E2E_MODEL_SWITCH_EDIT_RERUN", "upstream-e2e-ok"],
  75. "bodyExcludes": [
  76. "Generate a concise title",
  77. "CRITICAL: Respond with TEXT ONLY"
  78. ]
  79. },
  80. "response": {
  81. "statusCode": 200,
  82. "statusMessage": "OK",
  83. "text": {
  84. "id": "upstream-e2e-model-switch-edit-rerun-secondary",
  85. "inputTokens": 128,
  86. "outputTokens": 12,
  87. "text": "upstream-e2e-ok"
  88. }
  89. }
  90. },
  91. {
  92. "id": "model-switch-fork-source-primary",
  93. "description": "P0-10 fork 分支 source turn,以 primary 配置建立可 fork 的 completed assistant message。",
  94. "metadata": {
  95. "kind": "main",
  96. "timingPolicy": "fast-text",
  97. "source": "synthetic",
  98. "syntheticReason": "核心断言在 fork 前 source 请求和后续派生 session 配置;响应只需稳定完成并展示 fork 入口。"
  99. },
  100. "maxMatches": 1,
  101. "match": {
  102. "method": "POST",
  103. "pathIncludes": "/messages",
  104. "lastUserMessageIncludes": ["E2E_MODEL_SWITCH_FORK_SOURCE"],
  105. "bodyIncludes": ["E2E_MODEL_SWITCH_FORK_SOURCE", "upstream-e2e-ok"],
  106. "bodyExcludes": [
  107. "Generate a concise title",
  108. "CRITICAL: Respond with TEXT ONLY"
  109. ]
  110. },
  111. "response": {
  112. "statusCode": 200,
  113. "statusMessage": "OK",
  114. "text": {
  115. "id": "upstream-e2e-model-switch-fork-source-primary",
  116. "inputTokens": 128,
  117. "outputTokens": 12,
  118. "text": "upstream-e2e-ok"
  119. }
  120. }
  121. },
  122. {
  123. "id": "model-switch-fork-followup-secondary",
  124. "description": "P0-10 fork 分支派生 session follow-up 的固定回复。",
  125. "metadata": {
  126. "kind": "main",
  127. "timingPolicy": "fast-text",
  128. "source": "synthetic",
  129. "syntheticReason": "核心断言在 fork follow-up 请求 capture 的 secondary model/thought,响应只需稳定完成。"
  130. },
  131. "maxMatches": 1,
  132. "match": {
  133. "method": "POST",
  134. "pathIncludes": "/messages",
  135. "lastUserMessageIncludes": ["E2E_MODEL_SWITCH_FORK_FOLLOWUP"],
  136. "bodyIncludes": ["E2E_MODEL_SWITCH_FORK_FOLLOWUP", "upstream-e2e-ok"],
  137. "bodyExcludes": [
  138. "Generate a concise title",
  139. "CRITICAL: Respond with TEXT ONLY"
  140. ]
  141. },
  142. "response": {
  143. "statusCode": 200,
  144. "statusMessage": "OK",
  145. "text": {
  146. "id": "upstream-e2e-model-switch-fork-followup-secondary",
  147. "inputTokens": 128,
  148. "outputTokens": 12,
  149. "text": "upstream-e2e-ok"
  150. }
  151. }
  152. }
  153. ]
  154. }