Skip to main content
Cerebras uses API versioning to manage breaking changes to request validation and response formats. Version 2 is now the default for API requests.
This versioning does not change the API interface. You’ll continue using the same endpoints (e.g., /v1/chat/completions) and the same SDKs. New versions only affect validation rules and response field behavior. No new endpoints or SDK updates required.
Review what changed. The X-Cerebras-Version-Patch: 2 header remains supported, but is no longer required to receive version 2 behavior.
Z.ai GLM 4.7 is scheduled for deprecation on August 17, 2026. It will retain its existing default logprobs response behavior and will not receive the separate reasoning_logprobs default before then. Requests that explicitly include X-Cerebras-Version-Patch: 2 can receive the separated reasoning_logprobs behavior. This affects only the placement of reasoning-token logprobs. See the GLM 4.7 deprecation notice.

What’s Guaranteed

Within a given API version, we guarantee:
  • Existing request parameters continue to work as documented
  • Existing response fields remain present with the same types
Non-breaking changes that may occur:
  • New optional request parameters may be added
  • New fields may be added to responses
  • Error message text may change (but not error types within a version)
Breaking changes only happen in new API versions, giving you time to test and migrate. This includes stricter validation, removed parameters, or changed defaults.

Setting the API Version

Override the default API version per-request by passing the X-Cerebras-Version-Patch header:

Version 2 Rollout Timeline

Version 2 is now the default. Z.ai GLM 4.7 is scheduled for deprecation on August 17, 2026. It will retain its existing default logprobs response behavior and will not receive the separate reasoning_logprobs default before then. Requests that explicitly include X-Cerebras-Version-Patch: 2 can receive the separated reasoning_logprobs behavior. This affects only the placement of reasoning-token logprobs. See the GLM 4.7 deprecation notice.

What Changed in Version 2

Version 2 introduces stricter validation for structured outputs and tool calling, refines reasoning model behavior, and fixes edge cases. If your application uses JSON schemas, tool calls, or reasoning models, review these changes carefully.

Structured Outputs: Stricter Schema Validation

When using strict: true, Version 2 requires explicit, strictly-typed schemas. additionalProperties: false is required at every level of nested objects:

Tool Calling: Stricter Message Validation

Version 2 validates the structure of multi-turn conversations involving tool calls:

Reasoning Logprobs Added

For reasoning models, version 2 adds a separate reasoning_logprobs field that contains logprobs for the reasoning tokens. Previously, reasoning logprobs were included in the main logprobs field alongside content logprobs.
Z.ai GLM 4.7 is scheduled for deprecation on August 17, 2026. It will retain its existing default logprobs response behavior and will not receive the separate reasoning_logprobs default before then. Requests that explicitly include X-Cerebras-Version-Patch: 2 can receive the separated reasoning_logprobs behavior. This affects only the placement of reasoning-token logprobs. See the GLM 4.7 deprecation notice.
See Reasoning for details on reasoning format options.

Unicode Handling Fix

Logprobs now reflect partial Unicode tokens as they appear in the model’s vocabulary. Previously, the Unicode replacement character (\uFFFD) was not handled correctly in logprobs output. This fix is backward-compatible and requires no code changes.

Migration Checklist

Use this checklist to validate your integration with version 2:
1

Test with the version header

Add X-Cerebras-Version-Patch: 2 to your requests and run your test suite.
2

Update JSON schemas

  • Add all properties to the required array
  • Add additionalProperties: false to all object definitions
  • Ensure enum values match their property types
3

Update reasoning parsing (if using reasoning models)

If you parse reasoning content, update your code to read from the reasoning field in the response instead of extracting it from content.
4

You're done

Once your tests pass, no further action is required. Version 2 is now the default, and the header is no longer needed.

Future Versions

We strive to maintain backward compatibility whenever possible. In rare cases where breaking changes are necessary, a new API version will be released and made available for testing via the X-Cerebras-Version-Patch header for a minimum of 6 months before taking effect. Cerebras Cloud users will be notified via email before each version transition.