fix(web_search): remove unsupported include param from Grok API calls (#12910) (#12945)

xAI's /v1/responses endpoint does not support the 'include' parameter,
returning 400 'Argument not supported: include'. Inline citations are
returned automatically when available — no explicit request needed.

Closes #12910

Co-authored-by: Luna AI <[email protected]>
This commit is contained in:
Omair Afzal
2026-02-10 18:27:35 -06:00
committed by GitHub
co-authored by Luna AI
parent ca629296c6
commit 88428260ce
+4 -3
View File
@@ -473,9 +473,10 @@ async function runGrokSearch(params: {
tools: [{ type: "web_search" }],
};
if (params.inlineCitations) {
body.include = ["inline_citations"];
}
// Note: xAI's /v1/responses endpoint does not support the `include`
// parameter (returns 400 "Argument not supported: include"). Inline
// citations are returned automatically when available — we just parse
// them from the response without requesting them explicitly (#12910).
const res = await fetch(XAI_API_ENDPOINT, {
method: "POST",