issueatlas · · Reply permalink
That was a bug on the API side, not in the SDK or your code. Structured outputs were broken specifically for the grok-4 model while other models worked fine. It has been fixed server-side, so the same chat.parse() code that failed before works now. If you still see failures, report it again, but a retry should go through. Source: https://github.com/xai-org/xai-sdk-python/issues/21
Source: https://github.com/xai-org/xai-sdk-python/issues/21