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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-model-switch-edit-fork",
  4. "spec": "./test/e2e/conversation-session/models/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": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  45. },
  46. "response": {
  47. "statusCode": 200,
  48. "statusMessage": "OK",
  49. "text": {
  50. "id": "upstream-e2e-model-switch-edit-source-primary",
  51. "inputTokens": 128,
  52. "outputTokens": 12,
  53. "text": "upstream-e2e-ok"
  54. }
  55. }
  56. },
  57. {
  58. "id": "model-switch-edit-rerun-secondary",
  59. "description": "P0-10 edit 分支 completed 后切 secondary 再重跑的固定回复。",
  60. "metadata": {
  61. "kind": "main",
  62. "timingPolicy": "fast-text",
  63. "source": "synthetic",
  64. "syntheticReason": "核心断言在 edit rerun 请求 capture 的 secondary model/thought,响应只需稳定完成。"
  65. },
  66. "maxMatches": 1,
  67. "match": {
  68. "method": "POST",
  69. "pathIncludes": "/messages",
  70. "lastUserMessageIncludes": ["E2E_MODEL_SWITCH_EDIT_RERUN"],
  71. "bodyIncludes": ["E2E_MODEL_SWITCH_EDIT_RERUN", "upstream-e2e-ok"],
  72. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  73. },
  74. "response": {
  75. "statusCode": 200,
  76. "statusMessage": "OK",
  77. "text": {
  78. "id": "upstream-e2e-model-switch-edit-rerun-secondary",
  79. "inputTokens": 128,
  80. "outputTokens": 12,
  81. "text": "upstream-e2e-ok"
  82. }
  83. }
  84. },
  85. {
  86. "id": "model-switch-fork-source-primary",
  87. "description": "P0-10 fork 分支 source turn,以 primary 配置建立可 fork 的 completed assistant message。",
  88. "metadata": {
  89. "kind": "main",
  90. "timingPolicy": "fast-text",
  91. "source": "synthetic",
  92. "syntheticReason": "核心断言在 fork 前 source 请求和后续派生 session 配置;响应只需稳定完成并展示 fork 入口。"
  93. },
  94. "maxMatches": 1,
  95. "match": {
  96. "method": "POST",
  97. "pathIncludes": "/messages",
  98. "lastUserMessageIncludes": ["E2E_MODEL_SWITCH_FORK_SOURCE"],
  99. "bodyIncludes": ["E2E_MODEL_SWITCH_FORK_SOURCE", "upstream-e2e-ok"],
  100. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  101. },
  102. "response": {
  103. "statusCode": 200,
  104. "statusMessage": "OK",
  105. "text": {
  106. "id": "upstream-e2e-model-switch-fork-source-primary",
  107. "inputTokens": 128,
  108. "outputTokens": 12,
  109. "text": "upstream-e2e-ok"
  110. }
  111. }
  112. },
  113. {
  114. "id": "model-switch-fork-followup-secondary",
  115. "description": "P0-10 fork 分支派生 session follow-up 的固定回复。",
  116. "metadata": {
  117. "kind": "main",
  118. "timingPolicy": "fast-text",
  119. "source": "synthetic",
  120. "syntheticReason": "核心断言在 fork follow-up 请求 capture 的 secondary model/thought,响应只需稳定完成。"
  121. },
  122. "maxMatches": 1,
  123. "match": {
  124. "method": "POST",
  125. "pathIncludes": "/messages",
  126. "lastUserMessageIncludes": ["E2E_MODEL_SWITCH_FORK_FOLLOWUP"],
  127. "bodyIncludes": ["E2E_MODEL_SWITCH_FORK_FOLLOWUP", "upstream-e2e-ok"],
  128. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  129. },
  130. "response": {
  131. "statusCode": 200,
  132. "statusMessage": "OK",
  133. "text": {
  134. "id": "upstream-e2e-model-switch-fork-followup-secondary",
  135. "inputTokens": 128,
  136. "outputTokens": 12,
  137. "text": "upstream-e2e-ok"
  138. }
  139. }
  140. }
  141. ]
  142. }