{ "version": 1, "caseName": "conversation-session-deepseek-v4-reasoning-request-shape", "spec": "./test/e2e/conversation-session/models/conversation-session-deepseek-v4-reasoning-request-shape.test.ts", "fixtures": [ { "id": "upstream-v4-reasoning-request-shape-title", "description": "DeepSeek V4 OpenAI-compatible 思考档位 case 内的标题生成固定响应,避免严格 case-local replay 依赖其他 case。", "metadata": { "kind": "common", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "标题生成不是本 case 的产品语义,只需要稳定返回,防止标题请求误命中 high/max 业务 fixture。" }, "match": { "method": "POST", "pathIncludes": "/chat/completions", "bodyIncludes": ["Generate a concise title"] }, "response": { "statusCode": 200, "statusMessage": "OK", "headers": { "content-type": "application/json; charset=utf-8" }, "body": "{\"id\":\"chatcmpl-upstream-v4-reasoning-title\",\"object\":\"chat.completion\",\"created\":0,\"model\":\"deepseek-v4-flash\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"{\\\"title\\\":\\\"DeepSeek V4 Reasoning\\\"}\"},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":64,\"completion_tokens\":8,\"total_tokens\":72}}" } }, { "id": "upstream-v4-reasoning-high-main", "description": "I15 DeepSeek V4 默认 max 首发完成后,在会话内切到 high 的固定最终回复,配合抓包断言 OpenAI-compatible 请求字段。", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "核心断言在会话内切换 high 后的 provider/model 身份、OpenAI-compatible transport 和请求 body;响应只需稳定完成并包含约定文本。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/chat/completions", "lastUserMessageIncludes": ["E2E_UPSTREAM_V4_REASONING_HIGH"], "bodyIncludes": ["E2E_UPSTREAM_V4_REASONING_HIGH", "upstream-e2e-ok", "deepseek-v4-flash"], "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-upstream-v4-reasoning-high\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-v4-flash\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-upstream-v4-reasoning-high\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-v4-flash\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"upstream-e2e-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-upstream-v4-reasoning-high\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-v4-flash\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":128,\"completion_tokens\":12,\"total_tokens\":140,\"completion_tokens_details\":{\"reasoning_tokens\":0}}}\n\ndata: [DONE]\n\n" } }, { "id": "upstream-v4-reasoning-max-main", "description": "I15 DeepSeek V4 使用 Agent resolver 默认 max 首发普通文本的固定最终回复,配合抓包断言默认档位请求字段。", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "核心断言在 custom provider 只保存 model ID 时,Agent resolver 默认 max 的 DeepSeek V4 请求 body;响应只需稳定完成并包含约定文本。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/chat/completions", "lastUserMessageIncludes": ["E2E_UPSTREAM_V4_REASONING_MAX"], "bodyIncludes": ["E2E_UPSTREAM_V4_REASONING_MAX", "upstream-e2e-ok", "deepseek-v4-flash"], "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-upstream-v4-reasoning-max\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-v4-flash\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-upstream-v4-reasoning-max\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-v4-flash\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"upstream-e2e-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-upstream-v4-reasoning-max\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-v4-flash\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":132,\"completion_tokens\":12,\"total_tokens\":144,\"completion_tokens_details\":{\"reasoning_tokens\":0}}}\n\ndata: [DONE]\n\n" } } ] }