conversation-session-active-model-context.json 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-active-model-context",
  4. "spec": "./test/e2e/conversation-session/conversation-session-active-model-context.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "active-model-title",
  8. "description": "标题固定响应,不参与切模断言。",
  9. "metadata": {
  10. "kind": "common",
  11. "source": "synthetic",
  12. "timingPolicy": "fast-text",
  13. "syntheticReason": "只验证每次切换后的首请求身份,不验证生成质量;固定快速文本响应避免外部模型依赖。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/chat/completions",
  18. "bodyIncludes": [
  19. "Generate a concise title"
  20. ]
  21. },
  22. "response": {
  23. "statusCode": 200,
  24. "headers": {
  25. "content-type": "text/event-stream"
  26. },
  27. "body": "data: {\"id\":\"active-model\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"{\\\"title\\\":\\\"Active Model\\\"}\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"active-model\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":100,\"completion_tokens\":10,\"total_tokens\":110}}\n\ndata: [DONE]\n\n"
  28. }
  29. },
  30. {
  31. "id": "active-model-step-0",
  32. "description": "同一会话第 1 条请求,核对目标 URL 与 Context 身份。",
  33. "metadata": {
  34. "kind": "main",
  35. "source": "synthetic",
  36. "timingPolicy": "fast-text",
  37. "syntheticReason": "只验证每次切换后的首请求身份,不验证生成质量;固定快速文本响应避免外部模型依赖。"
  38. },
  39. "maxMatches": 1,
  40. "match": {
  41. "method": "POST",
  42. "pathIncludes": "/chat/completions",
  43. "lastUserMessageIncludes": [
  44. "E2E_ACTIVE_MODEL_CONTEXT_STEP_0"
  45. ],
  46. "bodyExcludes": [
  47. "Generate a concise title"
  48. ]
  49. },
  50. "response": {
  51. "statusCode": 200,
  52. "headers": {
  53. "content-type": "text/event-stream"
  54. },
  55. "body": "data: {\"id\":\"active-model\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"active-model-context-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"active-model\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":100,\"completion_tokens\":10,\"total_tokens\":110}}\n\ndata: [DONE]\n\n"
  56. }
  57. },
  58. {
  59. "id": "active-model-step-1",
  60. "description": "同一会话第 2 条请求,核对目标 URL 与 Context 身份。",
  61. "metadata": {
  62. "kind": "main",
  63. "source": "synthetic",
  64. "timingPolicy": "fast-text",
  65. "syntheticReason": "只验证每次切换后的首请求身份,不验证生成质量;固定快速文本响应避免外部模型依赖。"
  66. },
  67. "maxMatches": 1,
  68. "match": {
  69. "method": "POST",
  70. "pathIncludes": "/chat/completions",
  71. "lastUserMessageIncludes": [
  72. "E2E_ACTIVE_MODEL_CONTEXT_STEP_1"
  73. ],
  74. "bodyExcludes": [
  75. "Generate a concise title"
  76. ]
  77. },
  78. "response": {
  79. "statusCode": 200,
  80. "headers": {
  81. "content-type": "text/event-stream"
  82. },
  83. "body": "data: {\"id\":\"active-model\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"active-model-context-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"active-model\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":100,\"completion_tokens\":10,\"total_tokens\":110}}\n\ndata: [DONE]\n\n"
  84. }
  85. },
  86. {
  87. "id": "active-model-step-2",
  88. "description": "同一会话第 3 条请求,核对目标 URL 与 Context 身份。",
  89. "metadata": {
  90. "kind": "main",
  91. "source": "synthetic",
  92. "timingPolicy": "fast-text",
  93. "syntheticReason": "只验证每次切换后的首请求身份,不验证生成质量;固定快速文本响应避免外部模型依赖。"
  94. },
  95. "maxMatches": 1,
  96. "match": {
  97. "method": "POST",
  98. "pathIncludes": "/chat/completions",
  99. "lastUserMessageIncludes": [
  100. "E2E_ACTIVE_MODEL_CONTEXT_STEP_2"
  101. ],
  102. "bodyExcludes": [
  103. "Generate a concise title"
  104. ]
  105. },
  106. "response": {
  107. "statusCode": 200,
  108. "headers": {
  109. "content-type": "text/event-stream"
  110. },
  111. "body": "data: {\"id\":\"active-model\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"active-model-context-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"active-model\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":100,\"completion_tokens\":10,\"total_tokens\":110}}\n\ndata: [DONE]\n\n"
  112. }
  113. },
  114. {
  115. "id": "active-model-step-3",
  116. "description": "同一会话第 4 条请求,核对目标 URL 与 Context 身份。",
  117. "metadata": {
  118. "kind": "main",
  119. "source": "synthetic",
  120. "timingPolicy": "fast-text",
  121. "syntheticReason": "只验证每次切换后的首请求身份,不验证生成质量;固定快速文本响应避免外部模型依赖。"
  122. },
  123. "maxMatches": 1,
  124. "match": {
  125. "method": "POST",
  126. "pathIncludes": "/chat/completions",
  127. "lastUserMessageIncludes": [
  128. "E2E_ACTIVE_MODEL_CONTEXT_STEP_3"
  129. ],
  130. "bodyExcludes": [
  131. "Generate a concise title"
  132. ]
  133. },
  134. "response": {
  135. "statusCode": 200,
  136. "headers": {
  137. "content-type": "text/event-stream"
  138. },
  139. "body": "data: {\"id\":\"active-model\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"active-model-context-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"active-model\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":100,\"completion_tokens\":10,\"total_tokens\":110}}\n\ndata: [DONE]\n\n"
  140. }
  141. }
  142. ]
  143. }