Using github.com/OpenRouterTeam/go-sdk v0.8.31 with SystemOne.Create, I found two DTO/contract questions for Jev.
1. One-sided Noul criteria
The TypeSafe System One API permits criteria descriptions for true and false to be omitted independently. Is OpenRouter's /api/v1/systemone intended to accept a criteria object containing only one side? The Go SDK's DecisionsNoulQuestionCriteria has non-pointer True and False union fields, and its generated docs mark both required. If a caller sets only True, json.Marshal(components.DecisionsRequest{...}) fails with:
json: error calling MarshalJSON for type *components.DecisionsNoulQuestionCriteria: json: error calling MarshalJSON for type *components.False: could not marshal union type False: all fields are null
If the endpoint accepts one-sided criteria, could the Go DTO represent the absent side? If the endpoint intentionally requires both, could the System One compatibility documentation state that difference from TypeSafe?
2. Required numeric response fields lose presence information
DecisionsNoulAnswer.Noul and DecisionsScoreAnswer.Score are float64 fields. The generated UnmarshalJSON methods accept responses missing these fields and leave them as 0. For example, unmarshalling both {"type":"noul"} and {"type":"noul","noul":0} into components.DecisionsNoulAnswer produces identical values; likewise for score. The adapter cannot distinguish a malformed response from a legitimate zero.
Could the decoder reject missing required fields or expose presence information (for example, pointers or required-field validation)?
This was reproduced against v0.8.31 with Go 1.27.0; no API key or live request is involved.
Using
github.com/OpenRouterTeam/go-sdk v0.8.31withSystemOne.Create, I found two DTO/contract questions for Jev.1. One-sided Noul criteria
The TypeSafe System One API permits
criteriadescriptions fortrueandfalseto be omitted independently. Is OpenRouter's/api/v1/systemoneintended to accept acriteriaobject containing only one side? The Go SDK'sDecisionsNoulQuestionCriteriahas non-pointerTrueandFalseunion fields, and its generated docs mark both required. If a caller sets onlyTrue,json.Marshal(components.DecisionsRequest{...})fails with:If the endpoint accepts one-sided criteria, could the Go DTO represent the absent side? If the endpoint intentionally requires both, could the System One compatibility documentation state that difference from TypeSafe?
2. Required numeric response fields lose presence information
DecisionsNoulAnswer.NoulandDecisionsScoreAnswer.Scorearefloat64fields. The generatedUnmarshalJSONmethods accept responses missing these fields and leave them as0. For example, unmarshalling both{"type":"noul"}and{"type":"noul","noul":0}intocomponents.DecisionsNoulAnswerproduces identical values; likewise forscore. The adapter cannot distinguish a malformed response from a legitimate zero.Could the decoder reject missing required fields or expose presence information (for example, pointers or required-field validation)?
This was reproduced against v0.8.31 with Go 1.27.0; no API key or live request is involved.