| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- {
- "version": 1,
- "caseName": "conversation-session-glm52-reasoning-request-shape",
- "spec": "./test/e2e/conversation-session/conversation-session-glm52-reasoning-request-shape.test.ts",
- "fixtures": [
- {
- "id": "glm52-reasoning-request-shape-title",
- "description": "GLM-5.2 OpenAI-compatible 思考档位 case 内的标题生成固定响应,避免严格 case-local replay 依赖其他 case。",
- "metadata": {
- "kind": "common",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "固定响应同时守住 title sidecar 的 GLM-5.2 关闭思考请求字段,防止重新继承 max。"
- },
- "match": {
- "method": "POST",
- "pathIncludes": "/chat/completions",
- "bodyIncludes": ["Generate a concise title", "\"reasoning_effort\":\"none\""],
- "bodyExcludes": ["extra_body", "chat_template_kwargs", "\"thinking\""]
- },
- "response": {
- "statusCode": 200,
- "statusMessage": "OK",
- "headers": {
- "content-type": "text/event-stream; charset=utf-8"
- },
- "body": "data: {\"id\":\"chatcmpl-glm52-reasoning-title\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"GLM-5.2\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-glm52-reasoning-title\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"GLM-5.2\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"{\\\"title\\\":\\\"GLM Reasoning\\\"}\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-glm52-reasoning-title\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"GLM-5.2\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":64,\"completion_tokens\":8,\"total_tokens\":72}}\n\ndata: [DONE]\n\n"
- }
- },
- {
- "id": "glm52-reasoning-max-main",
- "description": "I14 GLM-5.2 选择 max 思考档位后首发普通文本的固定最终回复,配合抓包断言 OpenAI-compatible 请求字段。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "核心断言在 provider/model 身份、OpenAI-compatible transport 和 GLM-5.2 max 请求 body;响应只需稳定完成并包含约定文本。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/chat/completions",
- "lastUserMessageIncludes": ["E2E_GLM52_REASONING_MAX"],
- "bodyIncludes": ["E2E_GLM52_REASONING_MAX", "upstream-e2e-ok", "GLM-5.2"],
- "bodyExcludes": ["Generate a concise title", "extra_body", "chat_template_kwargs"]
- },
- "response": {
- "statusCode": 200,
- "statusMessage": "OK",
- "headers": {
- "content-type": "text/event-stream; charset=utf-8"
- },
- "body": "data: {\"id\":\"chatcmpl-glm52-reasoning-max\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"GLM-5.2\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-glm52-reasoning-max\",\"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-glm52-reasoning-max\",\"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"
- }
- },
- {
- "id": "glm52-reasoning-nothink-main",
- "description": "I14 GLM-5.2 从 max 切到 nothink 后续发普通文本的固定最终回复,配合抓包断言关闭思考请求字段。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "核心断言在同一 provider/model 下后续请求切换 nothink 后的 GLM-5.2 专属请求 body;响应只需稳定完成并包含约定文本。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/chat/completions",
- "lastUserMessageIncludes": ["E2E_GLM52_REASONING_NOTHINK"],
- "bodyIncludes": ["E2E_GLM52_REASONING_NOTHINK", "upstream-e2e-ok", "GLM-5.2"],
- "bodyExcludes": ["Generate a concise title", "extra_body", "chat_template_kwargs"]
- },
- "response": {
- "statusCode": 200,
- "statusMessage": "OK",
- "headers": {
- "content-type": "text/event-stream; charset=utf-8"
- },
- "body": "data: {\"id\":\"chatcmpl-glm52-reasoning-nothink\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"GLM-5.2\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-glm52-reasoning-nothink\",\"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-glm52-reasoning-nothink\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"GLM-5.2\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":132,\"completion_tokens\":12,\"total_tokens\":144}}\n\ndata: [DONE]\n\n"
- }
- }
- ]
- }
|