conversation-session-first-send.json 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-first-send",
  4. "spec": "./test/e2e/conversation-session/composer/conversation-session-first-send.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "first-send-title",
  8. "metadata": {
  9. "kind": "common",
  10. "source": "synthetic",
  11. "timingPolicy": "fast-text",
  12. "syntheticReason": "固定模型回复用于验证真实发送、附件提交和会话完成路径;不模拟应用状态。"
  13. },
  14. "match": {
  15. "method": "POST",
  16. "pathIncludes": "/messages",
  17. "bodyIncludes": ["Generate a concise title", "E2E_FIRST_SEND_"]
  18. },
  19. "response": {
  20. "statusCode": 200,
  21. "headers": {
  22. "content-type": "application/json; charset=utf-8"
  23. },
  24. "body": "{\"id\":\"msg_upstream_e2e_text\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"First send E2E\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":128,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":12,\"service_tier\":\"standard\"}}"
  25. }
  26. },
  27. {
  28. "id": "upstream-conversation-readonly-first-send-final",
  29. "description": "首发 case 的 Read tool_result 后最终回复。",
  30. "maxMatches": 1,
  31. "match": {
  32. "method": "POST",
  33. "pathIncludes": "/messages",
  34. "bodyIncludes": ["E2E_FIRST_SEND", "E2E_READONLY_TOOL_FILE_CONTENT"],
  35. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  36. },
  37. "response": {
  38. "statusCode": 200,
  39. "statusMessage": "OK",
  40. "headers": {
  41. "cache-control": "no-cache",
  42. "content-type": "text/event-stream; charset=utf-8"
  43. },
  44. "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"upstream-e2e-conversation-readonly-first-send-final\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":190,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"upstream-e2e-ok\"}}\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":190,\"output_tokens\":12,\"service_tier\":\"standard\"}}\n\nevent: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  45. },
  46. "metadata": {
  47. "kind": "main",
  48. "source": "synthetic",
  49. "timingPolicy": "fast-text",
  50. "syntheticReason": "保留旧共享回放的 Read 后响应,使首发用例在 case-local 回放中仍执行真实只读工具。"
  51. }
  52. },
  53. {
  54. "id": "first-send-second-turn",
  55. "metadata": {
  56. "kind": "main",
  57. "source": "synthetic",
  58. "timingPolicy": "fast-text",
  59. "syntheticReason": "固定模型回复用于验证真实发送、附件提交和会话完成路径;不模拟应用状态。"
  60. },
  61. "match": {
  62. "method": "POST",
  63. "pathIncludes": "/messages",
  64. "lastUserMessageIncludes": ["E2E_SECOND_TURN_"],
  65. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  66. },
  67. "response": {
  68. "statusCode": 200,
  69. "text": "upstream-e2e-ok"
  70. }
  71. }
  72. ]
  73. }