conversation-session-v4-sendnow.json 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-v4-sendnow",
  4. "spec": "./test/e2e/conversation-session/queue/conversation-session-v4-sendnow.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "v4-sendnow-title",
  8. "description": "E2E_V4_SENDNOW_SLOW 首发的 case-local 标题生成响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "E2E_V4_SENDNOW_SLOW 首发会触发默认 title sidecar;固定 case-local 标题响应,避免 default replay 回退 legacy provider-basic,并用该首发 marker 隔离跨 case 匹配。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title", "E2E_V4_SENDNOW_SLOW"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "text": {
  23. "id": "v4-sendnow-title",
  24. "inputTokens": 64,
  25. "outputTokens": 8,
  26. "text": "{\"title\":\"V4 Send Now E2E\"}"
  27. }
  28. }
  29. },
  30. {
  31. "id": "v4-sendnow-slow-turn",
  32. "description": "M4 sendQueuedNow 门禁:可控慢流首轮,保持 running 以便入队 + send now。",
  33. "metadata": {
  34. "kind": "main",
  35. "timingPolicy": "controlled-stream",
  36. "source": "synthetic",
  37. "syntheticReason": "sendQueuedNow 需 running 窗口入队,再 stop 当前 + 消费该项。"
  38. },
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/messages",
  42. "lastUserMessageIncludes": ["E2E_V4_SENDNOW_SLOW"],
  43. "lastUserMessageExcludes": ["E2E_V4_SENDNOW_ITEM"],
  44. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  45. },
  46. "response": {
  47. "statusCode": 200,
  48. "statusMessage": "OK",
  49. "headers": {
  50. "cache-control": "no-cache",
  51. "content-type": "text/event-stream; charset=utf-8"
  52. },
  53. "chunks": [
  54. {
  55. "offsetMs": 0,
  56. "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"v4-sendnow-slow\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":80,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\n"
  57. },
  58. {
  59. "offsetMs": 250,
  60. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n"
  61. },
  62. {
  63. "offsetMs": 500,
  64. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"V4_SENDNOW_STREAMING \"}}\n\n"
  65. },
  66. {
  67. "offsetMs": 45000,
  68. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
  69. },
  70. {
  71. "offsetMs": 45100,
  72. "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":80,\"output_tokens\":4,\"service_tier\":\"standard\"}}\n\n"
  73. },
  74. {
  75. "offsetMs": 45200,
  76. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  77. }
  78. ],
  79. "text": {
  80. "id": "v4-sendnow-slow",
  81. "inputTokens": 80,
  82. "outputTokens": 4,
  83. "text": "V4_SENDNOW_STREAMING"
  84. }
  85. }
  86. },
  87. {
  88. "id": "v4-sendnow-item-reply",
  89. "description": "M4 sendQueuedNow 门禁:被立即发送的队列项的回复。",
  90. "metadata": {
  91. "kind": "main",
  92. "timingPolicy": "fast-text",
  93. "source": "synthetic",
  94. "syntheticReason": "sendQueuedNow stop 当前后以原文重发该队列项,模型给出回复。"
  95. },
  96. "match": {
  97. "method": "POST",
  98. "pathIncludes": "/messages",
  99. "lastUserMessageIncludes": ["E2E_V4_SENDNOW_ITEM"],
  100. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  101. },
  102. "response": {
  103. "statusCode": 200,
  104. "text": {
  105. "id": "v4-sendnow-item",
  106. "inputTokens": 60,
  107. "outputTokens": 5,
  108. "text": "V4_SENDNOW_ITEM_REPLY"
  109. }
  110. }
  111. }
  112. ]
  113. }