conversation-session-readstate-model-isolation.json 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-readstate-model-isolation",
  4. "spec": "./test/e2e/conversation-session/models/conversation-session-readstate-model-isolation.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "readstate-model-isolation-title",
  8. "description": "readState 模型隔离 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-readstate-model-isolation-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-pro\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"ReadState Model Isolation\\\"}\"}],\"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": "readstate-model-isolation-first",
  31. "description": "I67 历史 session 使用 secondary / provider 非首项模型完成首轮普通发送。",
  32. "metadata": {
  33. "kind": "main",
  34. "timingPolicy": "fast-text",
  35. "source": "synthetic",
  36. "syntheticReason": "核心断言在历史 session 首轮请求使用 provider 下非首个模型;响应只需稳定完成并包含约定文本。"
  37. },
  38. "maxMatches": 1,
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/messages",
  42. "lastUserMessageIncludes": ["E2E_READSTATE_MODEL_ISOLATION_FIRST"],
  43. "bodyIncludes": ["E2E_READSTATE_MODEL_ISOLATION_FIRST", "upstream-e2e-ok"],
  44. "bodyExcludes": [
  45. "Generate a concise title",
  46. "CRITICAL: Respond with TEXT ONLY",
  47. "E2E_READSTATE_MODEL_ISOLATION_FOLLOW"
  48. ]
  49. },
  50. "response": {
  51. "statusCode": 200,
  52. "statusMessage": "OK",
  53. "text": {
  54. "id": "upstream-e2e-readstate-model-isolation-first",
  55. "inputTokens": 128,
  56. "outputTokens": 12,
  57. "text": "upstream-e2e-ok"
  58. }
  59. }
  60. },
  61. {
  62. "id": "readstate-model-isolation-follow",
  63. "description": "I67 新建草稿触发 readState 后切回旧 session,follow-up 仍使用 secondary / provider 非首项模型。",
  64. "metadata": {
  65. "kind": "main",
  66. "timingPolicy": "fast-text",
  67. "source": "synthetic",
  68. "syntheticReason": "核心断言在新建草稿 readState 水合并切回旧 session 后,follow-up 请求仍使用旧 session 的非首个模型。"
  69. },
  70. "maxMatches": 1,
  71. "match": {
  72. "method": "POST",
  73. "pathIncludes": "/messages",
  74. "lastUserMessageIncludes": ["E2E_READSTATE_MODEL_ISOLATION_FOLLOW"],
  75. "bodyIncludes": ["E2E_READSTATE_MODEL_ISOLATION_FOLLOW", "upstream-e2e-ok"],
  76. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  77. },
  78. "response": {
  79. "statusCode": 200,
  80. "statusMessage": "OK",
  81. "text": {
  82. "id": "upstream-e2e-readstate-model-isolation-follow",
  83. "inputTokens": 128,
  84. "outputTokens": 12,
  85. "text": "upstream-e2e-ok"
  86. }
  87. }
  88. }
  89. ]
  90. }