mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-12-05 08:05:12 +00:00
A buffered request on a Grok account rebuilds an empty terminal output from the done items and renders its custom_tool_call items as tool_use or tool_calls. An item that apicompat.IsServerSideSearchCall accepts is a search xAI ran itself, so it is no longer rendered as a client tool call. The item stays in the output, so Grok SearchCount still counts it, and stop_reason and finish_reason follow the remaining content. A new test covers an empty terminal on /v1/messages and /v1/chat/completions, with and without a client tool next to the search.