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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-same-model-draft-provider-identity",
  4. "spec": "./test/e2e/conversation-session/models/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": "application/json; charset=utf-8"
  25. },
  26. "body": "{\"id\":\"chatcmpl-same-model-provider-title\",\"object\":\"chat.completion\",\"created\":0,\"model\":\"glm-5.2\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"{\\\"title\\\":\\\"Provider Identity\\\"}\"},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":64,\"completion_tokens\":8,\"total_tokens\":72}}"
  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": ["E2E_GLM52_PROVIDER_IDENTITY_PRIMARY", "upstream-e2e-ok", "glm-5.2"],
  44. "bodyExcludes": ["Generate a concise title"]
  45. },
  46. "response": {
  47. "statusCode": 200,
  48. "statusMessage": "OK",
  49. "headers": {
  50. "content-type": "text/event-stream; charset=utf-8"
  51. },
  52. "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"
  53. }
  54. },
  55. {
  56. "id": "same-model-provider-identity-glm52-alternate-main",
  57. "description": "I22 切到 alternate provider 下同名 glm-5.2 后发送,验证真实请求 URL 命中 alternate provider Base URL。",
  58. "metadata": {
  59. "kind": "main",
  60. "timingPolicy": "fast-text",
  61. "source": "synthetic",
  62. "syntheticReason": "GLM-5.2 alternate 发送用于验证真实请求 URL 命中 alternate provider Base URL;响应只需稳定完成。"
  63. },
  64. "maxMatches": 1,
  65. "match": {
  66. "method": "POST",
  67. "pathIncludes": "/chat/completions",
  68. "lastUserMessageIncludes": ["E2E_GLM52_PROVIDER_IDENTITY_ALTERNATE"],
  69. "bodyIncludes": ["E2E_GLM52_PROVIDER_IDENTITY_ALTERNATE", "upstream-e2e-ok", "glm-5.2"],
  70. "bodyExcludes": ["Generate a concise title"]
  71. },
  72. "response": {
  73. "statusCode": 200,
  74. "statusMessage": "OK",
  75. "headers": {
  76. "content-type": "text/event-stream; charset=utf-8"
  77. },
  78. "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"
  79. }
  80. },
  81. {
  82. "id": "same-model-provider-identity-upstream-flash-primary-main",
  83. "description": "I22 先用 primary provider 下 deepseek-v4-flash 建立 active session,为后续空草稿切 alternate provider 的 workspace default 回包竞态提供非 GLM 前置状态。",
  84. "metadata": {
  85. "kind": "main",
  86. "timingPolicy": "fast-text",
  87. "source": "synthetic",
  88. "syntheticReason": "核心断言在 deepseek-v4-flash primary active session 存在后,workspace default 回包和后续请求不能把同名模型拉回旧 provider;seed 响应只需稳定完成。"
  89. },
  90. "maxMatches": 1,
  91. "match": {
  92. "method": "POST",
  93. "pathIncludes": "/chat/completions",
  94. "lastUserMessageIncludes": ["E2E_UPSTREAM_FLASH_PROVIDER_IDENTITY_PRIMARY"],
  95. "bodyIncludes": [
  96. "E2E_UPSTREAM_FLASH_PROVIDER_IDENTITY_PRIMARY",
  97. "upstream-e2e-ok",
  98. "deepseek-v4-flash"
  99. ],
  100. "bodyExcludes": ["Generate a concise title"]
  101. },
  102. "response": {
  103. "statusCode": 200,
  104. "statusMessage": "OK",
  105. "headers": {
  106. "content-type": "text/event-stream; charset=utf-8"
  107. },
  108. "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"
  109. }
  110. },
  111. {
  112. "id": "same-model-provider-identity-upstream-flash-alternate-main",
  113. "description": "I22 切到 alternate provider 下同名 deepseek-v4-flash 后发送,验证真实请求 URL 命中 alternate provider Base URL。",
  114. "metadata": {
  115. "kind": "main",
  116. "timingPolicy": "fast-text",
  117. "source": "synthetic",
  118. "syntheticReason": "deepseek-v4-flash alternate 发送用于验证真实请求 URL 命中 alternate provider Base URL;响应只需稳定完成。"
  119. },
  120. "maxMatches": 1,
  121. "match": {
  122. "method": "POST",
  123. "pathIncludes": "/chat/completions",
  124. "lastUserMessageIncludes": ["E2E_UPSTREAM_FLASH_PROVIDER_IDENTITY_ALTERNATE"],
  125. "bodyIncludes": [
  126. "E2E_UPSTREAM_FLASH_PROVIDER_IDENTITY_ALTERNATE",
  127. "upstream-e2e-ok",
  128. "deepseek-v4-flash"
  129. ],
  130. "bodyExcludes": ["Generate a concise title"]
  131. },
  132. "response": {
  133. "statusCode": 200,
  134. "statusMessage": "OK",
  135. "headers": {
  136. "content-type": "text/event-stream; charset=utf-8"
  137. },
  138. "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"
  139. }
  140. }
  141. ]
  142. }