in betamessage.go [1050:1089]
func init() {
apijson.RegisterUnion[BetaContentBlockParamUnion](
"type",
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(BetaTextBlockParam{}),
DiscriminatorValue: "text",
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(BetaImageBlockParam{}),
DiscriminatorValue: "image",
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(BetaToolUseBlockParam{}),
DiscriminatorValue: "tool_use",
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(BetaToolResultBlockParam{}),
DiscriminatorValue: "tool_result",
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(BetaBase64PDFBlockParam{}),
DiscriminatorValue: "document",
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(BetaThinkingBlockParam{}),
DiscriminatorValue: "thinking",
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(BetaRedactedThinkingBlockParam{}),
DiscriminatorValue: "redacted_thinking",
},
)
}