conversation-session-thought-level-cold-resume.json 4.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-thought-level-cold-resume",
  4. "spec": "./test/e2e/conversation-session/models/conversation-session-thought-level-cold-resume.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "conversation-session-thought-level-cold-resume-title-sidecar",
  8. "description": "本例标题旁路响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "source": "synthetic",
  12. "timingPolicy": "fast-text",
  13. "syntheticReason": "真实抓包确认标题经 GLM-5.2 的 Chat Completions 端点发送;按该非流式协议固定响应,不能套用 Messages 的 matcher 或响应体。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/chat/completions",
  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\":\"chatcmpl-cold-resume-title\",\"object\":\"chat.completion\",\"created\":0,\"model\":\"GLM-5.2\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"{\\\"title\\\":\\\"Upstream E2E Fixture\\\"}\"},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":125,\"completion_tokens\":24,\"total_tokens\":149}}"
  27. }
  28. },
  29. {
  30. "id": "thought-cold-resume-seed-main",
  31. "description": "I63 冷重启前创建 completed GLM-5.2 max session 的稳定回复。",
  32. "metadata": {
  33. "kind": "main",
  34. "timingPolicy": "fast-text",
  35. "source": "synthetic",
  36. "syntheticReason": "核心断言是 completed task 的 task-local thought 冷恢复;响应只需稳定结束首轮。"
  37. },
  38. "maxMatches": 1,
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/chat/completions",
  42. "lastUserMessageIncludes": ["E2E_THOUGHT_COLD_RESUME_SEED"],
  43. "bodyIncludes": ["E2E_THOUGHT_COLD_RESUME_SEED", "GLM-5.2", "upstream-e2e-ok"],
  44. "bodyExcludes": ["Generate a concise title", "extra_body"]
  45. },
  46. "response": {
  47. "statusCode": 200,
  48. "statusMessage": "OK",
  49. "headers": {
  50. "content-type": "text/event-stream; charset=utf-8"
  51. },
  52. "body": "data: {\"id\":\"chatcmpl-thought-cold-seed\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"GLM-5.2\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-thought-cold-seed\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"GLM-5.2\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"upstream-e2e-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-thought-cold-seed\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"GLM-5.2\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":128,\"completion_tokens\":12,\"total_tokens\":140}}\n\ndata: [DONE]\n\n"
  53. }
  54. },
  55. {
  56. "id": "thought-cold-resume-follow-main",
  57. "description": "I63 冷重启后同一 task 续发时验证 GLM-5.2 max 请求的稳定回复。",
  58. "metadata": {
  59. "kind": "main",
  60. "timingPolicy": "fast-text",
  61. "source": "synthetic",
  62. "syntheticReason": "响应正文不是产品变量;续发 request body 的 max 配置才是核心证据。"
  63. },
  64. "maxMatches": 1,
  65. "match": {
  66. "method": "POST",
  67. "pathIncludes": "/chat/completions",
  68. "lastUserMessageIncludes": ["E2E_THOUGHT_COLD_RESUME_FOLLOW"],
  69. "bodyIncludes": ["E2E_THOUGHT_COLD_RESUME_FOLLOW", "GLM-5.2", "upstream-e2e-ok"],
  70. "bodyExcludes": ["Generate a concise title", "extra_body"]
  71. },
  72. "response": {
  73. "statusCode": 200,
  74. "statusMessage": "OK",
  75. "headers": {
  76. "content-type": "text/event-stream; charset=utf-8"
  77. },
  78. "body": "data: {\"id\":\"chatcmpl-thought-cold-follow\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"GLM-5.2\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-thought-cold-follow\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"GLM-5.2\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"upstream-e2e-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-thought-cold-follow\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"GLM-5.2\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":144,\"completion_tokens\":12,\"total_tokens\":156}}\n\ndata: [DONE]\n\n"
  79. }
  80. }
  81. ]
  82. }