conversation-session-same-model-draft-provider-identity.json 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-same-model-draft-provider-identity",
  4. "spec": "./test/e2e/conversation-session/conversation-session-same-model-draft-provider-identity.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "same-model-provider-identity-title",
  8. "description": "同名模型跨 provider 身份 case 内的标题生成固定响应,避免严格 case-local replay 依赖其他 case。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "标题生成不是本 case 的产品语义,只需要稳定返回,防止标题请求误命中业务 fixture。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/chat/completions",
  18. "bodyIncludes": ["Generate a concise title"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "statusMessage": "OK",
  23. "headers": {
  24. "content-type": "text/event-stream; charset=utf-8"
  25. },
  26. "body": "data: {\"id\":\"chatcmpl-same-model-provider-title\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-same-model-provider-title\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"{\\\"title\\\":\\\"Provider Identity\\\"}\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-same-model-provider-title\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":64,\"completion_tokens\":8,\"total_tokens\":72}}\n\ndata: [DONE]\n\n"
  27. }
  28. },
  29. {
  30. "id": "same-model-provider-identity-glm52-primary-main",
  31. "description": "I22 先用 primary provider 下 glm-5.2 建立 active session,为后续空草稿切 alternate provider 的 workspace default 回包竞态提供前置状态。",
  32. "metadata": {
  33. "kind": "main",
  34. "timingPolicy": "fast-text",
  35. "source": "synthetic",
  36. "syntheticReason": "核心断言在 GLM-5.2 primary active session 存在后,workspace default 回包和后续请求不能把同名模型拉回旧 provider;seed 响应只需稳定完成。"
  37. },
  38. "maxMatches": 1,
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/chat/completions",
  42. "lastUserMessageIncludes": ["E2E_GLM52_PROVIDER_IDENTITY_PRIMARY"],
  43. "bodyIncludes": [
  44. "E2E_GLM52_PROVIDER_IDENTITY_PRIMARY",
  45. "upstream-e2e-ok",
  46. "glm-5.2"
  47. ],
  48. "bodyExcludes": ["Generate a concise title"]
  49. },
  50. "response": {
  51. "statusCode": 200,
  52. "statusMessage": "OK",
  53. "headers": {
  54. "content-type": "text/event-stream; charset=utf-8"
  55. },
  56. "body": "data: {\"id\":\"chatcmpl-same-model-glm52-primary\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-same-model-glm52-primary\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"upstream-e2e-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-same-model-glm52-primary\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":128,\"completion_tokens\":12,\"total_tokens\":140}}\n\ndata: [DONE]\n\n"
  57. }
  58. },
  59. {
  60. "id": "same-model-provider-identity-glm52-alternate-main",
  61. "description": "I22 切到 alternate provider 下同名 glm-5.2 后发送,验证真实请求 URL 命中 alternate provider Base URL。",
  62. "metadata": {
  63. "kind": "main",
  64. "timingPolicy": "fast-text",
  65. "source": "synthetic",
  66. "syntheticReason": "GLM-5.2 alternate 发送用于验证真实请求 URL 命中 alternate provider Base URL;响应只需稳定完成。"
  67. },
  68. "maxMatches": 1,
  69. "match": {
  70. "method": "POST",
  71. "pathIncludes": "/chat/completions",
  72. "lastUserMessageIncludes": ["E2E_GLM52_PROVIDER_IDENTITY_ALTERNATE"],
  73. "bodyIncludes": [
  74. "E2E_GLM52_PROVIDER_IDENTITY_ALTERNATE",
  75. "upstream-e2e-ok",
  76. "glm-5.2"
  77. ],
  78. "bodyExcludes": ["Generate a concise title"]
  79. },
  80. "response": {
  81. "statusCode": 200,
  82. "statusMessage": "OK",
  83. "headers": {
  84. "content-type": "text/event-stream; charset=utf-8"
  85. },
  86. "body": "data: {\"id\":\"chatcmpl-same-model-glm52-alternate\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-same-model-glm52-alternate\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"upstream-e2e-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-same-model-glm52-alternate\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":128,\"completion_tokens\":12,\"total_tokens\":140}}\n\ndata: [DONE]\n\n"
  87. }
  88. },
  89. {
  90. "id": "same-model-provider-identity-upstream-flash-primary-main",
  91. "description": "I22 先用 primary provider 下 deepseek-v4-flash 建立 active session,为后续空草稿切 alternate provider 的 workspace default 回包竞态提供非 GLM 前置状态。",
  92. "metadata": {
  93. "kind": "main",
  94. "timingPolicy": "fast-text",
  95. "source": "synthetic",
  96. "syntheticReason": "核心断言在 deepseek-v4-flash primary active session 存在后,workspace default 回包和后续请求不能把同名模型拉回旧 provider;seed 响应只需稳定完成。"
  97. },
  98. "maxMatches": 1,
  99. "match": {
  100. "method": "POST",
  101. "pathIncludes": "/chat/completions",
  102. "lastUserMessageIncludes": ["E2E_UPSTREAM_FLASH_PROVIDER_IDENTITY_PRIMARY"],
  103. "bodyIncludes": [
  104. "E2E_UPSTREAM_FLASH_PROVIDER_IDENTITY_PRIMARY",
  105. "upstream-e2e-ok",
  106. "deepseek-v4-flash"
  107. ],
  108. "bodyExcludes": ["Generate a concise title"]
  109. },
  110. "response": {
  111. "statusCode": 200,
  112. "statusMessage": "OK",
  113. "headers": {
  114. "content-type": "text/event-stream; charset=utf-8"
  115. },
  116. "body": "data: {\"id\":\"chatcmpl-same-model-upstream-primary\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-v4-flash\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-same-model-upstream-primary\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-v4-flash\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"upstream-e2e-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-same-model-upstream-primary\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-v4-flash\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":128,\"completion_tokens\":12,\"total_tokens\":140}}\n\ndata: [DONE]\n\n"
  117. }
  118. },
  119. {
  120. "id": "same-model-provider-identity-upstream-flash-alternate-main",
  121. "description": "I22 切到 alternate provider 下同名 deepseek-v4-flash 后发送,验证真实请求 URL 命中 alternate provider Base URL。",
  122. "metadata": {
  123. "kind": "main",
  124. "timingPolicy": "fast-text",
  125. "source": "synthetic",
  126. "syntheticReason": "deepseek-v4-flash alternate 发送用于验证真实请求 URL 命中 alternate provider Base URL;响应只需稳定完成。"
  127. },
  128. "maxMatches": 1,
  129. "match": {
  130. "method": "POST",
  131. "pathIncludes": "/chat/completions",
  132. "lastUserMessageIncludes": ["E2E_UPSTREAM_FLASH_PROVIDER_IDENTITY_ALTERNATE"],
  133. "bodyIncludes": [
  134. "E2E_UPSTREAM_FLASH_PROVIDER_IDENTITY_ALTERNATE",
  135. "upstream-e2e-ok",
  136. "deepseek-v4-flash"
  137. ],
  138. "bodyExcludes": ["Generate a concise title"]
  139. },
  140. "response": {
  141. "statusCode": 200,
  142. "statusMessage": "OK",
  143. "headers": {
  144. "content-type": "text/event-stream; charset=utf-8"
  145. },
  146. "body": "data: {\"id\":\"chatcmpl-same-model-upstream-alternate\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-v4-flash\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-same-model-upstream-alternate\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-v4-flash\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"upstream-e2e-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-same-model-upstream-alternate\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-v4-flash\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":128,\"completion_tokens\":12,\"total_tokens\":140}}\n\ndata: [DONE]\n\n"
  147. }
  148. }
  149. ]
  150. }