Skip to content

Conversation

@mreinsch
Copy link

@mreinsch mreinsch commented Aug 1, 2025

When using openai-client and passing a Riax::ResponseFormat as indicated in the README, openai will respond with a 400 error:

{"error"=>{"message"=>"Missing required parameter: 'response_format.type'.", "type"=>"invalid_request_error", "param"=>"response_format.type", "code"=>"missing_required_parameter"}}

This is because the library seems to be using as_json instead of to_json to convert the object. So adding this alias fixes the issue.

When using openai-client and passing a Riax::ResponseFormat as indicated in the README, openai will respond with a 400 error:
```
{"error"=>{"message"=>"Missing required parameter: 'response_format.type'.", "type"=>"invalid_request_error", "param"=>"response_format.type", "code"=>"missing_required_parameter"}}
```
This is because the library seems to be using as_json instead of to_json to convert the object. So adding this alias fixes the issue.
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.

1 participant