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

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