search_query before embedding and retrieval.
Use rewriting for multi-turn search and chat. Skip it for one-shot, self-contained queries because it adds an LLM call.
Retrieval rewriting
result.search_query shows what was embedded and searched. If rewriting fails, retrieval falls back to the original query and returns a retryable rewrite error.
Query pipeline rewriting
Chat rewriting
Chat rewriting usesQueryRewriteConfig. If you do not pass a separate rewrite LLM, chat falls back to the chat LLM. Use Streaming when you want to see the rewritten search_query in progress events.

