conversation-session-draft-model-switch-first-send.json 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-draft-model-switch-first-send",
  4. "spec": "./test/e2e/conversation-session/models/conversation-session-draft-model-switch-first-send.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "draft-model-switch-first-send-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-draft-model-switch-first-send-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-pro\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Draft Model Switch\\\"}\"}],\"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": "draft-model-switch-first-send-main",
  31. "description": "I10 空草稿切换到 secondary 模型后首发普通文本的固定最终回复。",
  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_DRAFT_MODEL_SWITCH_FIRST_SEND"],
  43. "bodyIncludes": ["E2E_DRAFT_MODEL_SWITCH_FIRST_SEND", "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-draft-model-switch-first-send-main",
  51. "inputTokens": 128,
  52. "outputTokens": 12,
  53. "text": "upstream-e2e-ok"
  54. }
  55. }
  56. }
  57. ]
  58. }