conversation-session-draft-model-migration.json 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-draft-model-migration",
  4. "spec": "./test/e2e/conversation-session/models/conversation-session-draft-model-migration.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "draft-model-migration-title",
  8. "description": "草稿模型迁移 case 的标题生成固定响应,避免严格 case-local replay 依赖其他 case。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "标题生成不属于迁移断言,只需要稳定返回。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/chat/completions",
  18. "bodyIncludes": ["Generate a concise title", "E2E_DMM_"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "statusMessage": "OK",
  23. "headers": {
  24. "content-type": "application/json; charset=utf-8"
  25. },
  26. "body": "{\"id\":\"chatcmpl-draft-model-migration-title\",\"object\":\"chat.completion\",\"created\":0,\"model\":\"e2e-dmm-model-b\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"{\\\"title\\\":\\\"Draft Model Migration\\\"}\"},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":64,\"completion_tokens\":8,\"total_tokens\":72}}"
  27. }
  28. },
  29. {
  30. "id": "draft-model-migration-first-send",
  31. "description": "DMM-01 迁移后的首发;断言请求 model 为目标模型。",
  32. "metadata": {
  33. "kind": "main",
  34. "timingPolicy": "fast-text",
  35. "source": "synthetic",
  36. "syntheticReason": "本例验证草稿模型迁移与 Recent 改写;模型回复内容不属于断言。"
  37. },
  38. "match": {
  39. "method": "POST",
  40. "pathIncludes": "/chat/completions",
  41. "bodyIncludes": ["E2E_DMM_FIRST_SEND"],
  42. "bodyExcludes": ["Generate a concise title"]
  43. },
  44. "response": {
  45. "statusCode": 200,
  46. "statusMessage": "OK",
  47. "headers": {
  48. "content-type": "text/event-stream; charset=utf-8"
  49. },
  50. "body": "data: {\"id\":\"chatcmpl-draft-model-migration\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-dmm-model-b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"DRAFT_MODEL_MIGRATION_REPLY\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-draft-model-migration\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-dmm-model-b\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n"
  51. }
  52. },
  53. {
  54. "id": "draft-model-migration-source-send",
  55. "description": "DMM-05 用户改回源模型后的发送;断言请求 model 为源模型。",
  56. "metadata": {
  57. "kind": "main",
  58. "timingPolicy": "fast-text",
  59. "source": "synthetic",
  60. "syntheticReason": "本例验证草稿模型迁移与 Recent 改写;模型回复内容不属于断言。"
  61. },
  62. "match": {
  63. "method": "POST",
  64. "pathIncludes": "/chat/completions",
  65. "bodyIncludes": ["E2E_DMM_SOURCE_SEND"],
  66. "bodyExcludes": ["Generate a concise title"]
  67. },
  68. "response": {
  69. "statusCode": 200,
  70. "statusMessage": "OK",
  71. "headers": {
  72. "content-type": "text/event-stream; charset=utf-8"
  73. },
  74. "body": "data: {\"id\":\"chatcmpl-draft-model-migration\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-dmm-model-b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"DRAFT_MODEL_MIGRATION_REPLY\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-draft-model-migration\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-dmm-model-b\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n"
  75. }
  76. },
  77. {
  78. "id": "draft-model-migration-rule-removed-send",
  79. "description": "DMM-08 删除规则前改回源模型的发送;断言请求 model 为源模型。",
  80. "metadata": {
  81. "kind": "main",
  82. "timingPolicy": "fast-text",
  83. "source": "synthetic",
  84. "syntheticReason": "本例验证草稿模型迁移与 Recent 改写;模型回复内容不属于断言。"
  85. },
  86. "match": {
  87. "method": "POST",
  88. "pathIncludes": "/chat/completions",
  89. "bodyIncludes": ["E2E_DMM_RULE_REMOVED"],
  90. "bodyExcludes": ["Generate a concise title"]
  91. },
  92. "response": {
  93. "statusCode": 200,
  94. "statusMessage": "OK",
  95. "headers": {
  96. "content-type": "text/event-stream; charset=utf-8"
  97. },
  98. "body": "data: {\"id\":\"chatcmpl-draft-model-migration\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-dmm-model-b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"DRAFT_MODEL_MIGRATION_REPLY\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-draft-model-migration\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-dmm-model-b\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n"
  99. }
  100. },
  101. {
  102. "id": "draft-model-migration-inflight-send",
  103. "description": "DMM-11 规则在首发途中才到达;断言请求 model 为源模型。",
  104. "metadata": {
  105. "kind": "main",
  106. "timingPolicy": "fast-text",
  107. "source": "synthetic",
  108. "syntheticReason": "本例验证草稿模型迁移与 Recent 改写;模型回复内容不属于断言。"
  109. },
  110. "match": {
  111. "method": "POST",
  112. "pathIncludes": "/chat/completions",
  113. "bodyIncludes": ["E2E_DMM_INFLIGHT_SEND"],
  114. "bodyExcludes": ["Generate a concise title"]
  115. },
  116. "response": {
  117. "statusCode": 200,
  118. "statusMessage": "OK",
  119. "headers": {
  120. "content-type": "text/event-stream; charset=utf-8"
  121. },
  122. "body": "data: {\"id\":\"chatcmpl-draft-model-migration\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-dmm-model-b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"DRAFT_MODEL_MIGRATION_REPLY\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-draft-model-migration\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-dmm-model-b\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n"
  123. }
  124. }
  125. ]
  126. }