| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- {
- "version": 1,
- "caseName": "conversation-session-model-switch-image-strip",
- "spec": "./test/e2e/conversation-session/models/conversation-session-model-switch-image-strip.test.ts",
- "fixtures": [
- {
- "id": "model-switch-image-strip-title",
- "description": "N08 图片历史模型切换 case 内的标题生成固定响应,避免严格 case-local replay 依赖 legacy provider-basic。",
- "metadata": {
- "kind": "common",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "标题生成不是本 case 的产品语义,只需要稳定返回,防止标题请求误命中图片历史或 GLM follow-up 业务 fixture。"
- },
- "match": {
- "method": "POST",
- "pathIncludes": "/chat/completions",
- "bodyIncludes": ["Generate a concise title", "E2E_MODEL_SWITCH_IMAGE_SEED"]
- },
- "response": {
- "statusCode": 200,
- "statusMessage": "OK",
- "headers": {
- "content-type": "text/event-stream; charset=utf-8"
- },
- "body": "data: {\"id\":\"chatcmpl-model-switch-image-strip-title\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-v4-flash\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-model-switch-image-strip-title\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-v4-flash\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"{\\\"title\\\":\\\"Image Strip Switch\\\"}\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-model-switch-image-strip-title\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-v4-flash\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":64,\"completion_tokens\":8,\"total_tokens\":72}}\n\ndata: [DONE]\n\n"
- }
- },
- {
- "id": "model-switch-image-strip-seed",
- "description": "N08 首轮带真实 local path 图片的固定最终回复,用于把图片历史持久化到 completed session,并固定 image + 普通 path text 的 provider wire。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "核心断言发生在后续切到第三方 GLM 的 provider-visible 请求;首轮响应只需稳定完成并保留含 image + local path 的 user 历史。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/chat/completions",
- "lastUserMessageIncludes": ["E2E_MODEL_SWITCH_IMAGE_SEED"],
- "bodyIncludes": [
- "E2E_MODEL_SWITCH_IMAGE_SEED",
- "upstream-e2e-ok",
- "e2e-vision-seed-model",
- "[Image: source:",
- "model-switch-image-strip-"
- ],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "statusMessage": "OK",
- "headers": {
- "content-type": "text/event-stream; charset=utf-8"
- },
- "body": "data: {\"id\":\"chatcmpl-model-switch-image-strip-seed\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-vision-seed-model\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-model-switch-image-strip-seed\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-vision-seed-model\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"upstream-e2e-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-model-switch-image-strip-seed\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-vision-seed-model\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":156,\"completion_tokens\":12,\"total_tokens\":168}}\n\ndata: [DONE]\n\n"
- }
- },
- {
- "id": "model-switch-image-strip-glm-followup",
- "description": "N08 切到第三方 GLM-5.2 后续发普通文本的固定最终回复,配合抓包断言历史图片变为 omitted 文本但仍保留原 absolute path。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "核心断言在第三方 GLM provider-visible request 不再包含历史 image block/data URL,而是包含不支持图片输入的 omitted 文本和普通 path text;响应只需稳定完成并包含约定文本。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/chat/completions",
- "lastUserMessageIncludes": ["E2E_MODEL_SWITCH_IMAGE_FOLLOWUP"],
- "bodyIncludes": [
- "E2E_MODEL_SWITCH_IMAGE_FOLLOWUP",
- "GLM-5.2",
- "[Attached image/png:",
- "model-switch-image-strip-",
- "Media omitted from provider request because the selected model does not support image input.",
- "[Image: source:"
- ],
- "bodyExcludes": [
- "data:image",
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY"
- ]
- },
- "response": {
- "statusCode": 200,
- "statusMessage": "OK",
- "headers": {
- "content-type": "text/event-stream; charset=utf-8"
- },
- "body": "data: {\"id\":\"chatcmpl-model-switch-image-strip-glm-followup\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"GLM-5.2\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-model-switch-image-strip-glm-followup\",\"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-model-switch-image-strip-glm-followup\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"GLM-5.2\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":168,\"completion_tokens\":12,\"total_tokens\":180}}\n\ndata: [DONE]\n\n"
- }
- }
- ]
- }
|