conversation-session-pasted-image-path-edge-cases.json 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-pasted-image-path-edge-cases",
  4. "spec": "./test/e2e/conversation-session/attachments/conversation-session-pasted-image-path-edge-cases.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "pasted-image-edge-title",
  8. "description": "T16-T17 首轮的固定标题响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "标题内容不属于 T16-T17 语义;只需隔离 title sidecar 与 provider-visible 功能请求。"
  14. },
  15. "maxMatches": 2,
  16. "match": {
  17. "method": "POST",
  18. "pathIncludes": "/chat/completions",
  19. "bodyIncludes": ["Generate a concise title", "E2E_PASTED_IMAGE_EDGE_"]
  20. },
  21. "response": {
  22. "statusCode": 200,
  23. "statusMessage": "OK",
  24. "headers": {
  25. "content-type": "text/event-stream; charset=utf-8"
  26. },
  27. "body": "data: {\"id\":\"chatcmpl-pasted-image-edge-title\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-v4-flash\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-pasted-image-edge-title\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-v4-flash\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"{\\\"title\\\":\\\"Image Edge\\\"}\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-pasted-image-edge-title\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-v4-flash\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n"
  28. }
  29. },
  30. {
  31. "id": "pasted-image-edge-failure-seed",
  32. "description": "T16 删除 artifact 前建立 completed image 历史。",
  33. "metadata": {
  34. "kind": "main",
  35. "timingPolicy": "fast-text",
  36. "source": "synthetic",
  37. "syntheticReason": "首轮响应只建立含 durable image 与派生 path 的 completed 历史;T16 核心断言发生在删除两类文件后的无 provider follow-up。"
  38. },
  39. "maxMatches": 1,
  40. "match": {
  41. "method": "POST",
  42. "pathIncludes": "/chat/completions",
  43. "lastUserMessageIncludes": ["E2E_PASTED_IMAGE_EDGE_FAILURE_SEED_"],
  44. "bodyIncludes": [
  45. "e2e-image-edge-vision-model",
  46. "data:image/png;base64,",
  47. "[Image: source:"
  48. ],
  49. "bodyExcludes": ["Generate a concise title"]
  50. },
  51. "response": {
  52. "statusCode": 200,
  53. "statusMessage": "OK",
  54. "headers": {
  55. "content-type": "text/event-stream; charset=utf-8"
  56. },
  57. "body": "data: {\"id\":\"chatcmpl-pasted-image-edge-failure-seed\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-image-edge-vision-model\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-pasted-image-edge-failure-seed\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-image-edge-vision-model\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"E2E_PASTED_IMAGE_EDGE_FAILURE_SEED_OK\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-pasted-image-edge-failure-seed\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-image-edge-vision-model\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n"
  58. }
  59. },
  60. {
  61. "id": "pasted-image-edge-bmp-image",
  62. "description": "T17 image-capable 模型接收 BMP 且没有派生 path。",
  63. "metadata": {
  64. "kind": "main",
  65. "timingPolicy": "fast-text",
  66. "source": "synthetic",
  67. "syntheticReason": "响应只负责稳定收口;E2E 抓包固定有效 BMP 在 image-capable 模型中保留 image 且不追加 unsupported cache path。"
  68. },
  69. "maxMatches": 1,
  70. "match": {
  71. "method": "POST",
  72. "pathIncludes": "/chat/completions",
  73. "lastUserMessageIncludes": ["E2E_PASTED_IMAGE_EDGE_BMP_IMAGE_"],
  74. "bodyIncludes": ["e2e-image-edge-vision-model", "data:image/bmp;base64,"],
  75. "bodyExcludes": ["[Image: source:", "Generate a concise title"]
  76. },
  77. "response": {
  78. "statusCode": 200,
  79. "statusMessage": "OK",
  80. "headers": {
  81. "content-type": "text/event-stream; charset=utf-8"
  82. },
  83. "body": "data: {\"id\":\"chatcmpl-pasted-image-edge-bmp-image\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-image-edge-vision-model\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-pasted-image-edge-bmp-image\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-image-edge-vision-model\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"E2E_PASTED_IMAGE_EDGE_BMP_IMAGE_OK\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-pasted-image-edge-bmp-image\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-image-edge-vision-model\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n"
  84. }
  85. },
  86. {
  87. "id": "pasted-image-edge-bmp-text",
  88. "description": "T17 text-only 模型接收 omitted 且没有 BMP/path。",
  89. "metadata": {
  90. "kind": "main",
  91. "timingPolicy": "fast-text",
  92. "source": "synthetic",
  93. "syntheticReason": "响应只负责稳定收口;E2E 抓包固定同一 BMP 历史切到 text-only 后只保留 omitted 文本且没有 image/path。"
  94. },
  95. "maxMatches": 1,
  96. "match": {
  97. "method": "POST",
  98. "pathIncludes": "/chat/completions",
  99. "lastUserMessageIncludes": ["E2E_PASTED_IMAGE_EDGE_BMP_TEXT_"],
  100. "bodyIncludes": [
  101. "deepseek-v4-flash",
  102. "Media omitted from provider request because the selected model does not support image input."
  103. ],
  104. "bodyExcludes": ["data:image", "[Image: source:", "Generate a concise title"]
  105. },
  106. "response": {
  107. "statusCode": 200,
  108. "statusMessage": "OK",
  109. "headers": {
  110. "content-type": "text/event-stream; charset=utf-8"
  111. },
  112. "body": "data: {\"id\":\"chatcmpl-pasted-image-edge-bmp-text\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-v4-flash\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-pasted-image-edge-bmp-text\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-v4-flash\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"E2E_PASTED_IMAGE_EDGE_BMP_TEXT_OK\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-pasted-image-edge-bmp-text\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-v4-flash\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n"
  113. }
  114. }
  115. ]
  116. }