Open KernelDeimos opened 1 week ago
@KernelDeimos We're aware of the issue and fixing it. In the meantime you can use curl or OpenAI SDK which would provide the output tokens count.
You can reach out to our support email at support@x.ai
Yep, I switched Puter's xAI service to OpenAI's SDK and it's working great.
This is an xAI API question, but I don't know where else to ask this because there's no help center, community support forums, Discord server, or any such thing as far as I can tell.
According to the documentation, or what little there is of that, xAI is "fully compatible" with the Anthropic SDK.
When streaming, unlike Claude through the same SDK, the output tokens count is not available. I was able to get this information from openai, claude, mistral, together-ai, and groq, without much of a hassle. I can't seem to find a way to get xAI to do the same. What am I missing?