library · inferred from evidence
xai-sdk-python
The SDK mentioned in the context of the bug.
- xAI structured output corrupts Unicode for non-ASCII enum values
Structured output with non-ASCII enum values comes back corrupted: the Unicode escapes are wrong, like the leading zeros after the Unicode marker are missing. I reproduced this with both the gRPC SDK and the OpenAI-compatible REST API, so i
- xAI SDK local MCP server error: Server URL resolves to internal IP
Connecting to a local MCP server with the mcp helper fails with: Server URL resolves to internal IP: http://the local machine:8181/mcp/sse. What is the correct way to use a local MCP server with the xAI SDK? My MCP server runs locally for d
- xAI Batch API structured outputs: pass a Pydantic model as response_format
I want to use structured outputs with the xAI Batch API for entity extraction at scale, but the docs list response_format as unsupported there. Is there any way to get JSON schema enforcement in batch jobs? My use case is bulk entity extrac
- xAI chat.parse() structured outputs not working with grok-4
When using the grok-4 model, chat.parse() for structured outputs fails, while the same code works fine with other models like grok-2-vision. Is structured output broken on grok-4? My schema is a straightforward Pydantic model and it parses