conversation-session-r3-connectivity-test.json 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-r3-connectivity-test",
  4. "spec": "./test/e2e/conversation-session/remote/connection/conversation-session-r3-connectivity-test.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "r3-conn-connectivity",
  8. "description": "设置页“测试模型”连通性请求(本机回放 anthropic 路径)",
  9. "metadata": {
  10. "kind": "main",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "连通性测试只需 finish"
  14. },
  15. "maxMatches": 6,
  16. "match": {
  17. "method": "POST",
  18. "pathIncludes": "/messages",
  19. "bodyIncludes": ["You are ZCode connectivity probe."]
  20. },
  21. "response": {
  22. "statusCode": 200,
  23. "text": {
  24. "id": "r3-conn-connectivity",
  25. "inputTokens": 8,
  26. "outputTokens": 4,
  27. "text": "R3_CONNECTIVITY_OK"
  28. }
  29. }
  30. },
  31. {
  32. "id": "r3-conn-reconnect-title",
  33. "description": "R3 connectivity test task 标题辅助响应。",
  34. "metadata": {
  35. "kind": "common",
  36. "timingPolicy": "fast-text",
  37. "source": "synthetic",
  38. "syntheticReason": "标题不属于冷恢复断言。"
  39. },
  40. "maxMatches": 4,
  41. "match": {
  42. "method": "POST",
  43. "pathIncludes": "/chat/completions",
  44. "bodyIncludes": ["Generate a concise title", "E2E_R3_CONNECTIVITY_TEST"]
  45. },
  46. "response": {
  47. "statusCode": 200,
  48. "headers": {
  49. "content-type": "text/event-stream; charset=utf-8"
  50. },
  51. "body": "data: {\"id\":\"r3-conn-title\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-ssh-remote-lifecycle-model\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"{\\\"title\\\":\\\"R3 connectivity test\"}\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"r3-conn-title\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-ssh-remote-lifecycle-model\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n"
  52. }
  53. },
  54. {
  55. "id": "r3-conn-reconnect-main",
  56. "description": "R3 connectivity test 首发和续发的通用响应。",
  57. "metadata": {
  58. "kind": "main",
  59. "timingPolicy": "slow-stream",
  60. "source": "synthetic",
  61. "syntheticReason": "首发与冷恢复续发都只需要稳定完成,用 task history 断言路由。"
  62. },
  63. "maxMatches": 10,
  64. "match": {
  65. "method": "POST",
  66. "pathIncludes": "/chat/completions",
  67. "bodyIncludes": ["E2E_R3_CONNECTIVITY_TEST_"],
  68. "bodyExcludes": ["Generate a concise title"]
  69. },
  70. "response": {
  71. "statusCode": 200,
  72. "delayMs": 1200,
  73. "headers": {
  74. "content-type": "text/event-stream; charset=utf-8"
  75. },
  76. "body": "data: {\"id\":\"r3-conn-main\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-ssh-remote-lifecycle-model\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"R3_CONNECTIVITY_TEST_REPLY\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"r3-conn-main\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"e2e-ssh-remote-lifecycle-model\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n"
  77. }
  78. }
  79. ]
  80. }