conversation-session-model-provider-add-send.json 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-model-provider-add-send",
  4. "spec": "./test/e2e/conversation-session/models/conversation-session-model-provider-add-send.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "model-provider-add-send-title",
  8. "description": "设置页新增 provider 首发 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": "/chat/completions",
  18. "bodyIncludes": ["Generate a concise title"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "statusMessage": "OK",
  23. "headers": {
  24. "content-type": "text/event-stream; charset=utf-8"
  25. },
  26. "body": "data: {\"id\":\"chatcmpl-model-provider-add-send-title\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-flash\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"{\\\"title\\\":\\\"Provider Add Send\\\"}\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-model-provider-add-send-title\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-flash\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}]}\n\ndata: [DONE]\n\n"
  27. }
  28. },
  29. {
  30. "id": "model-provider-add-send-first-send",
  31. "description": "I08 设置页从 上游 Template 创建两个 Provider 实例、编辑目标实例输出预算并显式选择 high 后首发普通文本的固定最终回复,配合 UI、落盘和抓包断言实例身份、继承隔离、请求模型、high 思考深度与 max_completion_tokens。",
  32. "metadata": {
  33. "kind": "main",
  34. "timingPolicy": "fast-text",
  35. "source": "synthetic",
  36. "syntheticReason": "核心断言在设置页模型高级配置、provider 落盘、模型 currentValue provider 身份、显式选择 high 后的请求 body/model/thought/max_tokens 和 UI 回复;响应只需稳定完成并包含约定文本。"
  37. },
  38. "maxMatches": 1,
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/chat/completions",
  42. "lastUserMessageIncludes": ["E2E_MODEL_PROVIDER_ADD_SEND"],
  43. "bodyIncludes": ["E2E_MODEL_PROVIDER_ADD_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. "headers": {
  50. "content-type": "text/event-stream; charset=utf-8"
  51. },
  52. "body": "data: {\"id\":\"chatcmpl-model-provider-add-send-first-send\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-flash\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"upstream-e2e-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-model-provider-add-send-first-send\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"deepseek-flash\",\"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. }