Structured Outputs not working with the moonshotai/kimi-k2-instruct-0905

Hello!
I was following the strcutured outputs documentation and ran into an issue reproducing the ProductReview structured output using the upgraded moonshotai/kimi-k2-instruct-0905 model.

I’m consistently getting the following error, even though the docs indicate it should support structured outputs:

groq.BadRequestError: Error code: 400 - {'error': {'message': 'This model does not support response format `json_schema`. See supported models at Structured Outputs - GroqDocs ', 'type': 'invalid_request_error'}}

The documentation specifically mentions moonshotai/kimi-k2-instruct-0905 in the list of supported models. The same code works with the older version of kimi-k2

Has anyone else run into this issue, or found a workaround?

Hi there! Thanks for letting us know - this is a bug on our end and we’re working on fixing it now.

In the meantime, you can still use the original moonshotai/kimi-k2-instruct as your model id to use json schema mode with the new kimi model. The old model id is an alias of the new one, so no matter which model id you use, you’ll get the new one.

We’ve deployed a fix for this! It should be working now. :smiley: