conversation-session-model-availability-fallback.json 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-model-availability-fallback",
  4. "spec": "./test/e2e/conversation-session/models/conversation-session-model-availability-fallback.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "model-availability-fallback-title",
  8. "description": "模型可用性 fallback case 的标题生成固定响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "标题生成不属于模型 fallback 语义,只需稳定完成,避免误命中主流程 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-model-availability-fallback-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Model Availability Fallback\\\"}\"}],\"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": "model-availability-fallback-seed",
  31. "description": "I56 使用 source provider 建立 idle session 的固定回复。",
  32. "metadata": {
  33. "kind": "main",
  34. "timingPolicy": "fast-text",
  35. "source": "synthetic",
  36. "syntheticReason": "核心断言从已完成的 source session 禁用 provider 后开始;首轮响应只需稳定完成。"
  37. },
  38. "maxMatches": 1,
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/messages",
  42. "lastUserMessageIncludes": ["E2E_MODEL_FALLBACK_SEED"],
  43. "bodyIncludes": ["E2E_MODEL_FALLBACK_SEED", "upstream-e2e-ok"],
  44. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  45. },
  46. "response": {
  47. "statusCode": 200,
  48. "statusMessage": "OK",
  49. "text": {
  50. "id": "upstream-e2e-model-availability-fallback-seed",
  51. "inputTokens": 128,
  52. "outputTokens": 12,
  53. "text": "upstream-e2e-ok"
  54. }
  55. }
  56. },
  57. {
  58. "id": "model-availability-fallback-target",
  59. "description": "I56 Agent fallback 后 target provider 续发的固定回复。",
  60. "metadata": {
  61. "kind": "main",
  62. "timingPolicy": "fast-text",
  63. "source": "synthetic",
  64. "syntheticReason": "核心断言在真实续发请求的 target provider/model 与 UI 投影;响应只需稳定完成。"
  65. },
  66. "maxMatches": 1,
  67. "match": {
  68. "method": "POST",
  69. "pathIncludes": "/messages",
  70. "lastUserMessageIncludes": ["E2E_MODEL_FALLBACK_TARGET"],
  71. "bodyIncludes": ["E2E_MODEL_FALLBACK_TARGET", "upstream-e2e-ok"],
  72. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  73. },
  74. "response": {
  75. "statusCode": 200,
  76. "statusMessage": "OK",
  77. "text": {
  78. "id": "upstream-e2e-model-availability-fallback-target",
  79. "inputTokens": 156,
  80. "outputTokens": 12,
  81. "text": "upstream-e2e-ok"
  82. }
  83. }
  84. },
  85. {
  86. "id": "model-availability-fallback-draft-target",
  87. "description": "I61 未发送 prewarm fallback 后首次发送到 target provider 的固定回复。",
  88. "metadata": {
  89. "kind": "main",
  90. "timingPolicy": "fast-text",
  91. "source": "synthetic",
  92. "syntheticReason": "I61 核心断言是未发送 prewarm fallback 后的首次真实请求继续使用 target provider/model;响应文本只需稳定完成。"
  93. },
  94. "maxMatches": 1,
  95. "match": {
  96. "method": "POST",
  97. "pathIncludes": "/messages",
  98. "lastUserMessageIncludes": ["E2E_MODEL_FALLBACK_DRAFT_TARGET"],
  99. "bodyIncludes": ["E2E_MODEL_FALLBACK_DRAFT_TARGET", "upstream-e2e-ok"],
  100. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  101. },
  102. "response": {
  103. "statusCode": 200,
  104. "statusMessage": "OK",
  105. "text": {
  106. "id": "upstream-e2e-model-availability-fallback-draft-target",
  107. "inputTokens": 148,
  108. "outputTokens": 12,
  109. "text": "upstream-e2e-ok"
  110. }
  111. }
  112. }
  113. ]
  114. }