max_tokens
response_format
field in the request:
JSON Schema
response_format: { type: "json_schema", json_schema: {"schema": object} }
.
sonar
right now)
response_format: { type: "regex", regex: {"regex": str} }
.
\d
, \w
, \s
, .
[0-9A-Fa-f]
, [^x]
*
, ?
, +
, {3}
, {2,4}
, {3,}
|
( ... )
(?: ... )
(?= ... )
(?! ... )
\1
^
, $
, \b
(?<= ... )
(?<! ... )
(?R)
dict[str, Any]
) are automatically detected and rejectedsonar-reasoning-pro
, the response will include a <think>
section containing reasoning tokens, immediately followed by the structured output. The response_format
parameter does not remove these reasoning tokens from the output, so the final response will need to be parsed manually.
Sample Response: