conversation-session-openai-compatible-thinking-toggle-request-shape.json 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-openai-compatible-thinking-toggle-request-shape",
  4. "spec": "./test/e2e/conversation-session/conversation-session-openai-compatible-thinking-toggle-request-shape.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "openai-compatible-thinking-toggle-title",
  8. "description": "I65 首轮请求触发的标题生成固定响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "标题生成不是本 case 的产品语义,只需避免误命中四条 toggle fixture。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/chat/completions",
  18. "bodyIncludes": ["Generate a concise title", "\"enable_thinking\":false"],
  19. "bodyExcludes": ["extra_body", "chat_template_kwargs", "reasoning_effort"]
  20. },
  21. "response": {
  22. "statusCode": 200,
  23. "statusMessage": "OK",
  24. "headers": {
  25. "content-type": "text/event-stream; charset=utf-8"
  26. },
  27. "body": "data: {\"id\":\"chatcmpl-thinking-toggle-title\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"qwen3.5-plus\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-thinking-toggle-title\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"qwen3.5-plus\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"{\\\"title\\\":\\\"Thinking Toggle\\\"}\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-thinking-toggle-title\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"qwen3.5-plus\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":64,\"completion_tokens\":8,\"total_tokens\":72}}\n\ndata: [DONE]\n\n"
  28. }
  29. },
  30. {
  31. "id": "qwen-thinking-enabled-main",
  32. "description": "Qwen enabled direct enable_thinking 请求。",
  33. "metadata": {
  34. "kind": "main",
  35. "timingPolicy": "fast-text",
  36. "source": "synthetic",
  37. "syntheticReason": "核心断言是 replay server 捕获的 provider-visible request body。"
  38. },
  39. "maxMatches": 1,
  40. "match": {
  41. "method": "POST",
  42. "pathIncludes": "/chat/completions",
  43. "lastUserMessageIncludes": ["E2E_QWEN_THINKING_ENABLED"],
  44. "bodyIncludes": ["E2E_QWEN_THINKING_ENABLED", "upstream-e2e-ok", "qwen3.5-plus"],
  45. "bodyExcludes": ["Generate a concise title", "extra_body", "chat_template_kwargs"]
  46. },
  47. "response": {
  48. "statusCode": 200,
  49. "statusMessage": "OK",
  50. "headers": { "content-type": "text/event-stream; charset=utf-8" },
  51. "body": "data: {\"id\":\"chatcmpl-qwen-enabled\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"qwen3.5-plus\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-qwen-enabled\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"qwen3.5-plus\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"upstream-e2e-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-qwen-enabled\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"qwen3.5-plus\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":128,\"completion_tokens\":12,\"total_tokens\":140}}\n\ndata: [DONE]\n\n"
  52. }
  53. },
  54. {
  55. "id": "qwen-thinking-disabled-main",
  56. "description": "Qwen disabled direct enable_thinking 请求。",
  57. "metadata": {
  58. "kind": "main",
  59. "timingPolicy": "fast-text",
  60. "source": "synthetic",
  61. "syntheticReason": "核心断言是 replay server 捕获的 provider-visible request body。"
  62. },
  63. "maxMatches": 1,
  64. "match": {
  65. "method": "POST",
  66. "pathIncludes": "/chat/completions",
  67. "lastUserMessageIncludes": ["E2E_QWEN_THINKING_DISABLED"],
  68. "bodyIncludes": ["E2E_QWEN_THINKING_DISABLED", "upstream-e2e-ok", "qwen3.5-plus"],
  69. "bodyExcludes": ["Generate a concise title", "extra_body", "chat_template_kwargs"]
  70. },
  71. "response": {
  72. "statusCode": 200,
  73. "statusMessage": "OK",
  74. "headers": { "content-type": "text/event-stream; charset=utf-8" },
  75. "body": "data: {\"id\":\"chatcmpl-qwen-disabled\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"qwen3.5-plus\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-qwen-disabled\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"qwen3.5-plus\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"upstream-e2e-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-qwen-disabled\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"qwen3.5-plus\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":132,\"completion_tokens\":12,\"total_tokens\":144}}\n\ndata: [DONE]\n\n"
  76. }
  77. },
  78. {
  79. "id": "kimi-thinking-enabled-main",
  80. "description": "Kimi enabled direct thinking.type 请求。",
  81. "metadata": {
  82. "kind": "main",
  83. "timingPolicy": "fast-text",
  84. "source": "synthetic",
  85. "syntheticReason": "核心断言是 replay server 捕获的 provider-visible request body。"
  86. },
  87. "maxMatches": 1,
  88. "match": {
  89. "method": "POST",
  90. "pathIncludes": "/chat/completions",
  91. "lastUserMessageIncludes": ["E2E_KIMI_THINKING_ENABLED"],
  92. "bodyIncludes": ["E2E_KIMI_THINKING_ENABLED", "upstream-e2e-ok", "kimi-k2.6"],
  93. "bodyExcludes": ["Generate a concise title", "extra_body", "chat_template_kwargs"]
  94. },
  95. "response": {
  96. "statusCode": 200,
  97. "statusMessage": "OK",
  98. "headers": { "content-type": "text/event-stream; charset=utf-8" },
  99. "body": "data: {\"id\":\"chatcmpl-kimi-enabled\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"kimi-k2.6\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-kimi-enabled\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"kimi-k2.6\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"upstream-e2e-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-kimi-enabled\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"kimi-k2.6\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":136,\"completion_tokens\":12,\"total_tokens\":148}}\n\ndata: [DONE]\n\n"
  100. }
  101. },
  102. {
  103. "id": "kimi-thinking-disabled-main",
  104. "description": "Kimi disabled direct thinking.type 请求。",
  105. "metadata": {
  106. "kind": "main",
  107. "timingPolicy": "fast-text",
  108. "source": "synthetic",
  109. "syntheticReason": "核心断言是 replay server 捕获的 provider-visible request body。"
  110. },
  111. "maxMatches": 1,
  112. "match": {
  113. "method": "POST",
  114. "pathIncludes": "/chat/completions",
  115. "lastUserMessageIncludes": ["E2E_KIMI_THINKING_DISABLED"],
  116. "bodyIncludes": ["E2E_KIMI_THINKING_DISABLED", "upstream-e2e-ok", "kimi-k2.6"],
  117. "bodyExcludes": ["Generate a concise title", "extra_body", "chat_template_kwargs"]
  118. },
  119. "response": {
  120. "statusCode": 200,
  121. "statusMessage": "OK",
  122. "headers": { "content-type": "text/event-stream; charset=utf-8" },
  123. "body": "data: {\"id\":\"chatcmpl-kimi-disabled\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"kimi-k2.6\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-kimi-disabled\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"kimi-k2.6\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"upstream-e2e-ok\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-kimi-disabled\",\"object\":\"chat.completion.chunk\",\"created\":0,\"model\":\"kimi-k2.6\",\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":140,\"completion_tokens\":12,\"total_tokens\":152}}\n\ndata: [DONE]\n\n"
  124. }
  125. }
  126. ]
  127. }