conversation-session-toolsearch-local.json 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-toolsearch-local",
  4. "spec": "./test/e2e/conversation-session/tools/conversation-session-toolsearch-local.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "conversation-session-toolsearch-local-anthropic-search-json",
  8. "stage": "anthropic-search-json",
  9. "description": "anthropic-search-json",
  10. "metadata": {
  11. "kind": "main",
  12. "source": "synthetic",
  13. "timingPolicy": "fast-text",
  14. "syntheticReason": "Local search and wrapper lifecycle contract response; actual CLI and HTTP adapter execute the tools."
  15. },
  16. "match": {
  17. "method": "POST",
  18. "pathIncludes": "/messages",
  19. "bodyIncludes": ["E2E_TOOLSEARCH_LOCAL"]
  20. },
  21. "response": {
  22. "statusCode": 200,
  23. "headers": {
  24. "content-type": "application/json"
  25. },
  26. "body": "{\"id\": \"msg_local\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"test-toolsearch\", \"content\": [{\"type\": \"tool_use\", \"id\": \"local_search\", \"name\": \"LocalToolSearch\", \"input\": {\"query\": \"select:TodoRead,TaskOutput\", \"max_results\": 5}}], \"stop_reason\": \"tool_use\", \"stop_sequence\": null, \"usage\": {\"input_tokens\": 100, \"output_tokens\": 30}}"
  27. }
  28. },
  29. {
  30. "id": "conversation-session-toolsearch-local-anthropic-search-stream",
  31. "stage": "anthropic-search-stream",
  32. "description": "anthropic-search-stream",
  33. "metadata": {
  34. "kind": "main",
  35. "source": "synthetic",
  36. "timingPolicy": "fast-text",
  37. "syntheticReason": "Local search and wrapper lifecycle contract response; actual CLI and HTTP adapter execute the tools."
  38. },
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/messages",
  42. "bodyIncludes": ["E2E_TOOLSEARCH_LOCAL"]
  43. },
  44. "response": {
  45. "statusCode": 200,
  46. "headers": {
  47. "content-type": "text/event-stream"
  48. },
  49. "body": "event: message_start\ndata: {\"type\": \"message_start\", \"message\": {\"id\": \"msg_local\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"test-toolsearch\", \"content\": [], \"stop_reason\": null, \"stop_sequence\": null, \"usage\": {\"input_tokens\": 100, \"output_tokens\": 30}}}\n\nevent: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"tool_use\", \"id\": \"local_search\", \"name\": \"LocalToolSearch\", \"input\": {}}}\n\nevent: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"input_json_delta\", \"partial_json\": \"{\\\"query\\\": \\\"select:TodoRead,TaskOutput\\\", \\\"max_results\\\": 5}\"}}\n\nevent: content_block_stop\ndata: {\"type\": \"content_block_stop\", \"index\": 0}\n\nevent: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"tool_use\", \"stop_sequence\": null}, \"usage\": {\"output_tokens\": 30}}\n\nevent: message_stop\ndata: {\"type\": \"message_stop\"}\n\n"
  50. }
  51. },
  52. {
  53. "id": "conversation-session-toolsearch-local-anthropic-bad-json",
  54. "stage": "anthropic-bad-json",
  55. "description": "anthropic-bad-json",
  56. "metadata": {
  57. "kind": "main",
  58. "source": "synthetic",
  59. "timingPolicy": "fast-text",
  60. "syntheticReason": "Local search and wrapper lifecycle contract response; actual CLI and HTTP adapter execute the tools."
  61. },
  62. "match": {
  63. "method": "POST",
  64. "pathIncludes": "/messages",
  65. "bodyIncludes": ["E2E_TOOLSEARCH_LOCAL"]
  66. },
  67. "response": {
  68. "statusCode": 200,
  69. "headers": {
  70. "content-type": "application/json"
  71. },
  72. "body": "{\"id\": \"msg_local\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"test-toolsearch\", \"content\": [{\"type\": \"tool_use\", \"id\": \"local_bad\", \"name\": \"DeferredToolCall\", \"input\": {\"name\": \"TodoRead\", \"input\": {\"todos\": \"invalid\"}}}], \"stop_reason\": \"tool_use\", \"stop_sequence\": null, \"usage\": {\"input_tokens\": 100, \"output_tokens\": 30}}"
  73. }
  74. },
  75. {
  76. "id": "conversation-session-toolsearch-local-anthropic-bad-stream",
  77. "stage": "anthropic-bad-stream",
  78. "description": "anthropic-bad-stream",
  79. "metadata": {
  80. "kind": "main",
  81. "source": "synthetic",
  82. "timingPolicy": "fast-text",
  83. "syntheticReason": "Local search and wrapper lifecycle contract response; actual CLI and HTTP adapter execute the tools."
  84. },
  85. "match": {
  86. "method": "POST",
  87. "pathIncludes": "/messages",
  88. "bodyIncludes": ["E2E_TOOLSEARCH_LOCAL"]
  89. },
  90. "response": {
  91. "statusCode": 200,
  92. "headers": {
  93. "content-type": "text/event-stream"
  94. },
  95. "body": "event: message_start\ndata: {\"type\": \"message_start\", \"message\": {\"id\": \"msg_local\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"test-toolsearch\", \"content\": [], \"stop_reason\": null, \"stop_sequence\": null, \"usage\": {\"input_tokens\": 100, \"output_tokens\": 30}}}\n\nevent: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"tool_use\", \"id\": \"local_bad\", \"name\": \"DeferredToolCall\", \"input\": {}}}\n\nevent: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"input_json_delta\", \"partial_json\": \"{\\\"name\\\": \\\"TodoRead\\\", \\\"input\\\": {\\\"todos\\\": \\\"invalid\\\"}}\"}}\n\nevent: content_block_stop\ndata: {\"type\": \"content_block_stop\", \"index\": 0}\n\nevent: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"tool_use\", \"stop_sequence\": null}, \"usage\": {\"output_tokens\": 30}}\n\nevent: message_stop\ndata: {\"type\": \"message_stop\"}\n\n"
  96. }
  97. },
  98. {
  99. "id": "conversation-session-toolsearch-local-anthropic-good-json",
  100. "stage": "anthropic-good-json",
  101. "description": "anthropic-good-json",
  102. "metadata": {
  103. "kind": "main",
  104. "source": "synthetic",
  105. "timingPolicy": "fast-text",
  106. "syntheticReason": "Local search and wrapper lifecycle contract response; actual CLI and HTTP adapter execute the tools."
  107. },
  108. "match": {
  109. "method": "POST",
  110. "pathIncludes": "/messages",
  111. "bodyIncludes": ["E2E_TOOLSEARCH_LOCAL"]
  112. },
  113. "response": {
  114. "statusCode": 200,
  115. "headers": {
  116. "content-type": "application/json"
  117. },
  118. "body": "{\"id\": \"msg_local\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"test-toolsearch\", \"content\": [{\"type\": \"tool_use\", \"id\": \"local_good\", \"name\": \"DeferredToolCall\", \"input\": {\"name\": \"TodoRead\", \"input\": {}}}], \"stop_reason\": \"tool_use\", \"stop_sequence\": null, \"usage\": {\"input_tokens\": 100, \"output_tokens\": 30}}"
  119. }
  120. },
  121. {
  122. "id": "conversation-session-toolsearch-local-anthropic-good-stream",
  123. "stage": "anthropic-good-stream",
  124. "description": "anthropic-good-stream",
  125. "metadata": {
  126. "kind": "main",
  127. "source": "synthetic",
  128. "timingPolicy": "fast-text",
  129. "syntheticReason": "Local search and wrapper lifecycle contract response; actual CLI and HTTP adapter execute the tools."
  130. },
  131. "match": {
  132. "method": "POST",
  133. "pathIncludes": "/messages",
  134. "bodyIncludes": ["E2E_TOOLSEARCH_LOCAL"]
  135. },
  136. "response": {
  137. "statusCode": 200,
  138. "headers": {
  139. "content-type": "text/event-stream"
  140. },
  141. "body": "event: message_start\ndata: {\"type\": \"message_start\", \"message\": {\"id\": \"msg_local\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"test-toolsearch\", \"content\": [], \"stop_reason\": null, \"stop_sequence\": null, \"usage\": {\"input_tokens\": 100, \"output_tokens\": 30}}}\n\nevent: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"tool_use\", \"id\": \"local_good\", \"name\": \"DeferredToolCall\", \"input\": {}}}\n\nevent: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"input_json_delta\", \"partial_json\": \"{\\\"name\\\": \\\"TodoRead\\\", \\\"input\\\": {}}\"}}\n\nevent: content_block_stop\ndata: {\"type\": \"content_block_stop\", \"index\": 0}\n\nevent: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"tool_use\", \"stop_sequence\": null}, \"usage\": {\"output_tokens\": 30}}\n\nevent: message_stop\ndata: {\"type\": \"message_stop\"}\n\n"
  142. }
  143. },
  144. {
  145. "id": "conversation-session-toolsearch-local-anthropic-done-json",
  146. "stage": "anthropic-done-json",
  147. "description": "anthropic-done-json",
  148. "metadata": {
  149. "kind": "main",
  150. "source": "synthetic",
  151. "timingPolicy": "fast-text",
  152. "syntheticReason": "Local search and wrapper lifecycle contract response; actual CLI and HTTP adapter execute the tools."
  153. },
  154. "match": {
  155. "method": "POST",
  156. "pathIncludes": "/messages",
  157. "bodyIncludes": ["E2E_TOOLSEARCH_LOCAL"]
  158. },
  159. "response": {
  160. "statusCode": 200,
  161. "headers": {
  162. "content-type": "application/json"
  163. },
  164. "body": "{\"id\": \"msg_local\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"test-toolsearch\", \"content\": [{\"type\": \"text\", \"text\": \"E2E_TOOLSEARCH_LOCAL_DONE\"}], \"stop_reason\": \"end_turn\", \"stop_sequence\": null, \"usage\": {\"input_tokens\": 100, \"output_tokens\": 30}}"
  165. }
  166. },
  167. {
  168. "id": "conversation-session-toolsearch-local-anthropic-done-stream",
  169. "stage": "anthropic-done-stream",
  170. "description": "anthropic-done-stream",
  171. "metadata": {
  172. "kind": "main",
  173. "source": "synthetic",
  174. "timingPolicy": "fast-text",
  175. "syntheticReason": "Local search and wrapper lifecycle contract response; actual CLI and HTTP adapter execute the tools."
  176. },
  177. "match": {
  178. "method": "POST",
  179. "pathIncludes": "/messages",
  180. "bodyIncludes": ["E2E_TOOLSEARCH_LOCAL"]
  181. },
  182. "response": {
  183. "statusCode": 200,
  184. "headers": {
  185. "content-type": "text/event-stream"
  186. },
  187. "body": "event: message_start\ndata: {\"type\": \"message_start\", \"message\": {\"id\": \"msg_local\", \"type\": \"message\", \"role\": \"assistant\", \"model\": \"test-toolsearch\", \"content\": [], \"stop_reason\": null, \"stop_sequence\": null, \"usage\": {\"input_tokens\": 100, \"output_tokens\": 30}}}\n\nevent: content_block_start\ndata: {\"type\": \"content_block_start\", \"index\": 0, \"content_block\": {\"type\": \"text\", \"text\": \"\"}}\n\nevent: content_block_delta\ndata: {\"type\": \"content_block_delta\", \"index\": 0, \"delta\": {\"type\": \"text_delta\", \"text\": \"E2E_TOOLSEARCH_LOCAL_DONE\"}}\n\nevent: content_block_stop\ndata: {\"type\": \"content_block_stop\", \"index\": 0}\n\nevent: message_delta\ndata: {\"type\": \"message_delta\", \"delta\": {\"stop_reason\": \"end_turn\", \"stop_sequence\": null}, \"usage\": {\"output_tokens\": 30}}\n\nevent: message_stop\ndata: {\"type\": \"message_stop\"}\n\n"
  188. }
  189. },
  190. {
  191. "id": "conversation-session-toolsearch-local-openai-search-json",
  192. "stage": "openai-search-json",
  193. "description": "openai-search-json",
  194. "metadata": {
  195. "kind": "main",
  196. "source": "synthetic",
  197. "timingPolicy": "fast-text",
  198. "syntheticReason": "Local search and wrapper lifecycle contract response; actual CLI and HTTP adapter execute the tools."
  199. },
  200. "match": {
  201. "method": "POST",
  202. "pathIncludes": "/chat/completions",
  203. "bodyIncludes": ["E2E_TOOLSEARCH_LOCAL"]
  204. },
  205. "response": {
  206. "statusCode": 200,
  207. "headers": {
  208. "content-type": "application/json"
  209. },
  210. "body": "{\"id\": \"chatcmpl_local\", \"object\": \"chat.completion\", \"created\": 1, \"model\": \"test-toolsearch\", \"choices\": [{\"index\": 0, \"message\": {\"role\": \"assistant\", \"content\": null, \"tool_calls\": [{\"id\": \"local_search\", \"type\": \"function\", \"function\": {\"name\": \"LocalToolSearch\", \"arguments\": \"{\\\"query\\\": \\\"select:TodoRead,TaskOutput\\\", \\\"max_results\\\": 5}\"}}]}, \"finish_reason\": \"tool_calls\"}], \"usage\": {\"prompt_tokens\": 100, \"completion_tokens\": 30, \"total_tokens\": 130}}"
  211. }
  212. },
  213. {
  214. "id": "conversation-session-toolsearch-local-openai-search-stream",
  215. "stage": "openai-search-stream",
  216. "description": "openai-search-stream",
  217. "metadata": {
  218. "kind": "main",
  219. "source": "synthetic",
  220. "timingPolicy": "fast-text",
  221. "syntheticReason": "Local search and wrapper lifecycle contract response; actual CLI and HTTP adapter execute the tools."
  222. },
  223. "match": {
  224. "method": "POST",
  225. "pathIncludes": "/chat/completions",
  226. "bodyIncludes": ["E2E_TOOLSEARCH_LOCAL"]
  227. },
  228. "response": {
  229. "statusCode": 200,
  230. "headers": {
  231. "content-type": "text/event-stream"
  232. },
  233. "body": "data: {\"id\": \"chatcmpl_local\", \"object\": \"chat.completion.chunk\", \"created\": 1, \"model\": \"test-toolsearch\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": null, \"tool_calls\": [{\"id\": \"local_search\", \"type\": \"function\", \"function\": {\"name\": \"LocalToolSearch\", \"arguments\": \"{\\\"query\\\": \\\"select:TodoRead,TaskOutput\\\", \\\"max_results\\\": 5}\"}, \"index\": 0}]}, \"finish_reason\": null}]}\n\ndata: {\"id\": \"chatcmpl_local\", \"object\": \"chat.completion.chunk\", \"created\": 1, \"model\": \"test-toolsearch\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"tool_calls\"}], \"usage\": {\"prompt_tokens\": 100, \"completion_tokens\": 30, \"total_tokens\": 130}}\n\ndata: [DONE]\n\n"
  234. }
  235. },
  236. {
  237. "id": "conversation-session-toolsearch-local-openai-bad-json",
  238. "stage": "openai-bad-json",
  239. "description": "openai-bad-json",
  240. "metadata": {
  241. "kind": "main",
  242. "source": "synthetic",
  243. "timingPolicy": "fast-text",
  244. "syntheticReason": "Local search and wrapper lifecycle contract response; actual CLI and HTTP adapter execute the tools."
  245. },
  246. "match": {
  247. "method": "POST",
  248. "pathIncludes": "/chat/completions",
  249. "bodyIncludes": ["E2E_TOOLSEARCH_LOCAL"]
  250. },
  251. "response": {
  252. "statusCode": 200,
  253. "headers": {
  254. "content-type": "application/json"
  255. },
  256. "body": "{\"id\": \"chatcmpl_local\", \"object\": \"chat.completion\", \"created\": 1, \"model\": \"test-toolsearch\", \"choices\": [{\"index\": 0, \"message\": {\"role\": \"assistant\", \"content\": null, \"tool_calls\": [{\"id\": \"local_bad\", \"type\": \"function\", \"function\": {\"name\": \"DeferredToolCall\", \"arguments\": \"{\\\"name\\\": \\\"TodoRead\\\", \\\"input\\\": {\\\"todos\\\": \\\"invalid\\\"}}\"}}]}, \"finish_reason\": \"tool_calls\"}], \"usage\": {\"prompt_tokens\": 100, \"completion_tokens\": 30, \"total_tokens\": 130}}"
  257. }
  258. },
  259. {
  260. "id": "conversation-session-toolsearch-local-openai-bad-stream",
  261. "stage": "openai-bad-stream",
  262. "description": "openai-bad-stream",
  263. "metadata": {
  264. "kind": "main",
  265. "source": "synthetic",
  266. "timingPolicy": "fast-text",
  267. "syntheticReason": "Local search and wrapper lifecycle contract response; actual CLI and HTTP adapter execute the tools."
  268. },
  269. "match": {
  270. "method": "POST",
  271. "pathIncludes": "/chat/completions",
  272. "bodyIncludes": ["E2E_TOOLSEARCH_LOCAL"]
  273. },
  274. "response": {
  275. "statusCode": 200,
  276. "headers": {
  277. "content-type": "text/event-stream"
  278. },
  279. "body": "data: {\"id\": \"chatcmpl_local\", \"object\": \"chat.completion.chunk\", \"created\": 1, \"model\": \"test-toolsearch\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": null, \"tool_calls\": [{\"id\": \"local_bad\", \"type\": \"function\", \"function\": {\"name\": \"DeferredToolCall\", \"arguments\": \"{\\\"name\\\": \\\"TodoRead\\\", \\\"input\\\": {\\\"todos\\\": \\\"invalid\\\"}}\"}, \"index\": 0}]}, \"finish_reason\": null}]}\n\ndata: {\"id\": \"chatcmpl_local\", \"object\": \"chat.completion.chunk\", \"created\": 1, \"model\": \"test-toolsearch\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"tool_calls\"}], \"usage\": {\"prompt_tokens\": 100, \"completion_tokens\": 30, \"total_tokens\": 130}}\n\ndata: [DONE]\n\n"
  280. }
  281. },
  282. {
  283. "id": "conversation-session-toolsearch-local-openai-good-json",
  284. "stage": "openai-good-json",
  285. "description": "openai-good-json",
  286. "metadata": {
  287. "kind": "main",
  288. "source": "synthetic",
  289. "timingPolicy": "fast-text",
  290. "syntheticReason": "Local search and wrapper lifecycle contract response; actual CLI and HTTP adapter execute the tools."
  291. },
  292. "match": {
  293. "method": "POST",
  294. "pathIncludes": "/chat/completions",
  295. "bodyIncludes": ["E2E_TOOLSEARCH_LOCAL"]
  296. },
  297. "response": {
  298. "statusCode": 200,
  299. "headers": {
  300. "content-type": "application/json"
  301. },
  302. "body": "{\"id\": \"chatcmpl_local\", \"object\": \"chat.completion\", \"created\": 1, \"model\": \"test-toolsearch\", \"choices\": [{\"index\": 0, \"message\": {\"role\": \"assistant\", \"content\": null, \"tool_calls\": [{\"id\": \"local_good\", \"type\": \"function\", \"function\": {\"name\": \"DeferredToolCall\", \"arguments\": \"{\\\"name\\\": \\\"TodoRead\\\", \\\"input\\\": {}}\"}}]}, \"finish_reason\": \"tool_calls\"}], \"usage\": {\"prompt_tokens\": 100, \"completion_tokens\": 30, \"total_tokens\": 130}}"
  303. }
  304. },
  305. {
  306. "id": "conversation-session-toolsearch-local-openai-good-stream",
  307. "stage": "openai-good-stream",
  308. "description": "openai-good-stream",
  309. "metadata": {
  310. "kind": "main",
  311. "source": "synthetic",
  312. "timingPolicy": "fast-text",
  313. "syntheticReason": "Local search and wrapper lifecycle contract response; actual CLI and HTTP adapter execute the tools."
  314. },
  315. "match": {
  316. "method": "POST",
  317. "pathIncludes": "/chat/completions",
  318. "bodyIncludes": ["E2E_TOOLSEARCH_LOCAL"]
  319. },
  320. "response": {
  321. "statusCode": 200,
  322. "headers": {
  323. "content-type": "text/event-stream"
  324. },
  325. "body": "data: {\"id\": \"chatcmpl_local\", \"object\": \"chat.completion.chunk\", \"created\": 1, \"model\": \"test-toolsearch\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": null, \"tool_calls\": [{\"id\": \"local_good\", \"type\": \"function\", \"function\": {\"name\": \"DeferredToolCall\", \"arguments\": \"{\\\"name\\\": \\\"TodoRead\\\", \\\"input\\\": {}}\"}, \"index\": 0}]}, \"finish_reason\": null}]}\n\ndata: {\"id\": \"chatcmpl_local\", \"object\": \"chat.completion.chunk\", \"created\": 1, \"model\": \"test-toolsearch\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"tool_calls\"}], \"usage\": {\"prompt_tokens\": 100, \"completion_tokens\": 30, \"total_tokens\": 130}}\n\ndata: [DONE]\n\n"
  326. }
  327. },
  328. {
  329. "id": "conversation-session-toolsearch-local-openai-done-json",
  330. "stage": "openai-done-json",
  331. "description": "openai-done-json",
  332. "metadata": {
  333. "kind": "main",
  334. "source": "synthetic",
  335. "timingPolicy": "fast-text",
  336. "syntheticReason": "Local search and wrapper lifecycle contract response; actual CLI and HTTP adapter execute the tools."
  337. },
  338. "match": {
  339. "method": "POST",
  340. "pathIncludes": "/chat/completions",
  341. "bodyIncludes": ["E2E_TOOLSEARCH_LOCAL"]
  342. },
  343. "response": {
  344. "statusCode": 200,
  345. "headers": {
  346. "content-type": "application/json"
  347. },
  348. "body": "{\"id\": \"chatcmpl_local\", \"object\": \"chat.completion\", \"created\": 1, \"model\": \"test-toolsearch\", \"choices\": [{\"index\": 0, \"message\": {\"role\": \"assistant\", \"content\": \"E2E_TOOLSEARCH_LOCAL_DONE\"}, \"finish_reason\": \"stop\"}], \"usage\": {\"prompt_tokens\": 100, \"completion_tokens\": 30, \"total_tokens\": 130}}"
  349. }
  350. },
  351. {
  352. "id": "conversation-session-toolsearch-local-openai-done-stream",
  353. "stage": "openai-done-stream",
  354. "description": "openai-done-stream",
  355. "metadata": {
  356. "kind": "main",
  357. "source": "synthetic",
  358. "timingPolicy": "fast-text",
  359. "syntheticReason": "Local search and wrapper lifecycle contract response; actual CLI and HTTP adapter execute the tools."
  360. },
  361. "match": {
  362. "method": "POST",
  363. "pathIncludes": "/chat/completions",
  364. "bodyIncludes": ["E2E_TOOLSEARCH_LOCAL"]
  365. },
  366. "response": {
  367. "statusCode": 200,
  368. "headers": {
  369. "content-type": "text/event-stream"
  370. },
  371. "body": "data: {\"id\": \"chatcmpl_local\", \"object\": \"chat.completion.chunk\", \"created\": 1, \"model\": \"test-toolsearch\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\", \"content\": \"E2E_TOOLSEARCH_LOCAL_DONE\"}, \"finish_reason\": null}]}\n\ndata: {\"id\": \"chatcmpl_local\", \"object\": \"chat.completion.chunk\", \"created\": 1, \"model\": \"test-toolsearch\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": {\"prompt_tokens\": 100, \"completion_tokens\": 30, \"total_tokens\": 130}}\n\ndata: [DONE]\n\n"
  372. }
  373. }
  374. ]
  375. }