Shaking the magic 8-ball of repositories...
I'm trying to use xai's live search attribute in TypeScript. But when I try to return citations for the streaming results, I get double the amount of sources as I specified in the maxSearchResults parameter. For example, if I set maxSearchResults: 5, I get 10 sources, 5 unique sources and their duplicates, they have the same URL but different IDs, and I guess it affects my output token counts and API pricing.
This error doesn't appear in the generateText method, only happens in the streamText method, and also it doesn't happen when I use the Python SDK of xai.