conversation-session-new-session-inherits-model.json 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-new-session-inherits-model",
  4. "spec": "./test/e2e/conversation-session/conversation-session-new-session-inherits-model.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "new-session-inherits-model-title",
  8. "description": "新建会话继承模型 case 内的标题生成固定响应,避免严格 case-local replay 依赖 legacy provider-basic。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "标题生成不是本 case 的产品语义,只需要稳定返回,防止标题请求误命中首发业务 fixture。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  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\":\"upstream-e2e-new-session-inherits-model-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-pro\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Model Inheritance\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":125,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":24,\"service_tier\":\"standard\"}}"
  27. }
  28. },
  29. {
  30. "id": "new-session-inherits-model-main-a",
  31. "description": "I11 继承源会话使用 secondary provider/model 首发的固定最终回复。",
  32. "metadata": {
  33. "kind": "main",
  34. "timingPolicy": "fast-text",
  35. "source": "synthetic",
  36. "syntheticReason": "核心断言在继承源请求 body/model/thought 和 UI 回复;响应只需稳定完成并包含约定文本。"
  37. },
  38. "maxMatches": 1,
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/messages",
  42. "lastUserMessageIncludes": ["E2E_NEW_SESSION_INHERITS_MODEL_A"],
  43. "bodyIncludes": ["E2E_NEW_SESSION_INHERITS_MODEL_A", "upstream-e2e-ok"],
  44. "bodyExcludes": [
  45. "Generate a concise title",
  46. "CRITICAL: Respond with TEXT ONLY"
  47. ]
  48. },
  49. "response": {
  50. "statusCode": 200,
  51. "statusMessage": "OK",
  52. "text": {
  53. "id": "upstream-e2e-new-session-inherits-model-main-a",
  54. "inputTokens": 128,
  55. "outputTokens": 12,
  56. "text": "upstream-e2e-ok"
  57. }
  58. }
  59. },
  60. {
  61. "id": "new-session-inherits-model-main-b",
  62. "description": "I11 新建空草稿继承 secondary provider/model 后直接首发的固定最终回复。",
  63. "metadata": {
  64. "kind": "main",
  65. "timingPolicy": "fast-text",
  66. "source": "synthetic",
  67. "syntheticReason": "核心断言在新建草稿工具栏继承、请求 body/model/thought 和 UI 回复;响应只需稳定完成并包含约定文本。"
  68. },
  69. "maxMatches": 1,
  70. "match": {
  71. "method": "POST",
  72. "pathIncludes": "/messages",
  73. "lastUserMessageIncludes": ["E2E_NEW_SESSION_INHERITS_MODEL_B"],
  74. "bodyIncludes": ["E2E_NEW_SESSION_INHERITS_MODEL_B", "upstream-e2e-ok"],
  75. "bodyExcludes": [
  76. "Generate a concise title",
  77. "CRITICAL: Respond with TEXT ONLY"
  78. ]
  79. },
  80. "response": {
  81. "statusCode": 200,
  82. "statusMessage": "OK",
  83. "text": {
  84. "id": "upstream-e2e-new-session-inherits-model-main-b",
  85. "inputTokens": 128,
  86. "outputTokens": 12,
  87. "text": "upstream-e2e-ok"
  88. }
  89. }
  90. }
  91. ]
  92. }