You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
com.openai.errors.BadRequestException: 400: OpenAIError{additionalProperties={error={message=Invalid type for 'metadata.someNumericId': expected a string, but got an integer instead., type=invalid_request_error, param=metadata.someNumericId, code=invalid_type}}}
String as a value works fine though.
The text was updated successfully, but these errors were encountered:
ydolzhenko
changed the title
Metadata
Metadata with numeric fields fails requests in Response API
Mar 20, 2025
Yeah, this is sort of a bug in the SDK I would say.
It is true that the API only accepts strings, but for most other classes in the SDK we accept nicely typed parameters somehow and then have putAdditionalProperty for undocumented values.
So I think we need to update Metadata to have something like putProperty(String, String). Thanks for flagging :)
TomerAberbach
changed the title
Metadata with numeric fields fails requests in Response API
Metadata should have a nicely typed put method
Mar 25, 2025
metadata setter of
ResponseCreateParams.builder()
acceptsMetadata
object, which, in turn may contain ```numeric fields:
Response with such metadata instance fails though:
showing error:
com.openai.errors.BadRequestException: 400: OpenAIError{additionalProperties={error={message=Invalid type for 'metadata.someNumericId': expected a string, but got an integer instead., type=invalid_request_error, param=metadata.someNumericId, code=invalid_type}}}
String as a value works fine though.
The text was updated successfully, but these errors were encountered: