Skip to content
← Back to activity

Public problem

Cerebras: Unsupported response_format type json_schema - name field required

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

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.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

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