conversation-session-v4-sendnow.json 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-v4-sendnow",
  4. "spec": "./test/e2e/conversation-session/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": [
  19. "Generate a concise title",
  20. "E2E_V4_SENDNOW_SLOW"
  21. ]
  22. },
  23. "response": {
  24. "statusCode": 200,
  25. "text": {
  26. "id": "v4-sendnow-title",
  27. "inputTokens": 64,
  28. "outputTokens": 8,
  29. "text": "{\"title\":\"V4 Send Now E2E\"}"
  30. }
  31. }
  32. },
  33. {
  34. "id": "v4-sendnow-slow-turn",
  35. "description": "M4 sendQueuedNow 门禁:可控慢流首轮,保持 running 以便入队 + send now。",
  36. "metadata": {
  37. "kind": "main",
  38. "timingPolicy": "controlled-stream",
  39. "source": "synthetic",
  40. "syntheticReason": "sendQueuedNow 需 running 窗口入队,再 stop 当前 + 消费该项。"
  41. },
  42. "match": {
  43. "method": "POST",
  44. "pathIncludes": "/messages",
  45. "lastUserMessageIncludes": ["E2E_V4_SENDNOW_SLOW"],
  46. "lastUserMessageExcludes": ["E2E_V4_SENDNOW_ITEM"],
  47. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  48. },
  49. "response": {
  50. "statusCode": 200,
  51. "statusMessage": "OK",
  52. "headers": {
  53. "cache-control": "no-cache",
  54. "content-type": "text/event-stream; charset=utf-8"
  55. },
  56. "chunks": [
  57. {
  58. "offsetMs": 0,
  59. "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"
  60. },
  61. {
  62. "offsetMs": 250,
  63. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n"
  64. },
  65. {
  66. "offsetMs": 500,
  67. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"V4_SENDNOW_STREAMING \"}}\n\n"
  68. },
  69. {
  70. "offsetMs": 45000,
  71. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
  72. },
  73. {
  74. "offsetMs": 45100,
  75. "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"
  76. },
  77. {
  78. "offsetMs": 45200,
  79. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  80. }
  81. ],
  82. "text": {
  83. "id": "v4-sendnow-slow",
  84. "inputTokens": 80,
  85. "outputTokens": 4,
  86. "text": "V4_SENDNOW_STREAMING"
  87. }
  88. }
  89. },
  90. {
  91. "id": "v4-sendnow-item-reply",
  92. "description": "M4 sendQueuedNow 门禁:被立即发送的队列项的回复。",
  93. "metadata": {
  94. "kind": "main",
  95. "timingPolicy": "fast-text",
  96. "source": "synthetic",
  97. "syntheticReason": "sendQueuedNow stop 当前后以原文重发该队列项,模型给出回复。"
  98. },
  99. "match": {
  100. "method": "POST",
  101. "pathIncludes": "/messages",
  102. "lastUserMessageIncludes": ["E2E_V4_SENDNOW_ITEM"],
  103. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  104. },
  105. "response": {
  106. "statusCode": 200,
  107. "text": {
  108. "id": "v4-sendnow-item",
  109. "inputTokens": 60,
  110. "outputTokens": 5,
  111. "text": "V4_SENDNOW_ITEM_REPLY"
  112. }
  113. }
  114. }
  115. ]
  116. }