Cerebras: Unsupported response_format type json_schema - name field required

After upgrading to cerebras-cloud-sdk 1.16.0, using responseformat with the jsonschema type fails with: Unsupported responseformat type: jsonschema, code wrongapiformat. My schema itself looks valid. The same code worked before the upgrade, so something changed in how the SDK sends the format.

The error is because the name field is required for jsonschema response formats. Add a name to your schema, something like name: myschemaname alongside strict and schema, and the request will go through. Worth noting that jsonschema support was pretty new around that SDK version, so the docs did not call out the required fields clearly. Source: https://github.com/Cerebras/cerebras-cloud-sdk-python/issues/4

Source: https://github.com/Cerebras/cerebras-cloud-sdk-python/issues/4