Skip to content

Conversation

@mi12-root
Copy link
Contributor

@mi12-root mi12-root commented Oct 21, 2025

What

Support sending Ints & Doubles as JSON schema constraints.

Why

The SDK currently doesn’t handle numerical constraints in structured outputs correctly.
For example, using JSONField.maximum(Decimal(N)) gets translated into:

"maximum" : {
    "exponent" : 2,
    "isCompact" : true,
    "length" : 1,
    "isNegative" : false,
    "mantissa" : [1, 0, 0, 0, 0, 0, 0, 0]
}

a format that OpenAI does not support.

Affected Areas

JsonSchema/ module.

@nezhyborets nezhyborets merged commit 28884fc into MacPaw:main Oct 22, 2025
3 checks passed
@mi12-root mi12-root deleted the fix-numerics-in-json-schema branch October 22, 2025 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants