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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-openai-compatible-thinking-toggle-request-shape",
  4. "spec": "./test/e2e/conversation-session/models/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": "application/json; charset=utf-8"
  26. },
  27. "body": "{\"id\":\"chatcmpl-thinking-toggle-title\",\"object\":\"chat.completion\",\"created\":0,\"model\":\"qwen3.5-plus\",\"choices\":[{\"index\":0,\"message\":{\"role\":\"assistant\",\"content\":\"{\\\"title\\\":\\\"Thinking Toggle\\\"}\"},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":64,\"completion_tokens\":8,\"total_tokens\":72}}"
  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": {
  51. "content-type": "text/event-stream; charset=utf-8"
  52. },
  53. "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"
  54. }
  55. },
  56. {
  57. "id": "qwen-thinking-disabled-main",
  58. "description": "Qwen disabled direct enable_thinking 请求。",
  59. "metadata": {
  60. "kind": "main",
  61. "timingPolicy": "fast-text",
  62. "source": "synthetic",
  63. "syntheticReason": "核心断言是 replay server 捕获的 provider-visible request body。"
  64. },
  65. "maxMatches": 1,
  66. "match": {
  67. "method": "POST",
  68. "pathIncludes": "/chat/completions",
  69. "lastUserMessageIncludes": ["E2E_QWEN_THINKING_DISABLED"],
  70. "bodyIncludes": ["E2E_QWEN_THINKING_DISABLED", "upstream-e2e-ok", "qwen3.5-plus"],
  71. "bodyExcludes": ["Generate a concise title", "extra_body", "chat_template_kwargs"]
  72. },
  73. "response": {
  74. "statusCode": 200,
  75. "statusMessage": "OK",
  76. "headers": {
  77. "content-type": "text/event-stream; charset=utf-8"
  78. },
  79. "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"
  80. }
  81. },
  82. {
  83. "id": "kimi-thinking-enabled-main",
  84. "description": "Kimi enabled direct thinking.type 请求。",
  85. "metadata": {
  86. "kind": "main",
  87. "timingPolicy": "fast-text",
  88. "source": "synthetic",
  89. "syntheticReason": "核心断言是 replay server 捕获的 provider-visible request body。"
  90. },
  91. "maxMatches": 1,
  92. "match": {
  93. "method": "POST",
  94. "pathIncludes": "/chat/completions",
  95. "lastUserMessageIncludes": ["E2E_KIMI_THINKING_ENABLED"],
  96. "bodyIncludes": ["E2E_KIMI_THINKING_ENABLED", "upstream-e2e-ok", "kimi-k2.6"],
  97. "bodyExcludes": ["Generate a concise title", "extra_body", "chat_template_kwargs"]
  98. },
  99. "response": {
  100. "statusCode": 200,
  101. "statusMessage": "OK",
  102. "headers": {
  103. "content-type": "text/event-stream; charset=utf-8"
  104. },
  105. "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"
  106. }
  107. },
  108. {
  109. "id": "kimi-thinking-disabled-main",
  110. "description": "Kimi disabled direct thinking.type 请求。",
  111. "metadata": {
  112. "kind": "main",
  113. "timingPolicy": "fast-text",
  114. "source": "synthetic",
  115. "syntheticReason": "核心断言是 replay server 捕获的 provider-visible request body。"
  116. },
  117. "maxMatches": 1,
  118. "match": {
  119. "method": "POST",
  120. "pathIncludes": "/chat/completions",
  121. "lastUserMessageIncludes": ["E2E_KIMI_THINKING_DISABLED"],
  122. "bodyIncludes": ["E2E_KIMI_THINKING_DISABLED", "upstream-e2e-ok", "kimi-k2.6"],
  123. "bodyExcludes": ["Generate a concise title", "extra_body", "chat_template_kwargs"]
  124. },
  125. "response": {
  126. "statusCode": 200,
  127. "statusMessage": "OK",
  128. "headers": {
  129. "content-type": "text/event-stream; charset=utf-8"
  130. },
  131. "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"
  132. }
  133. }
  134. ]
  135. }