-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
first_message param rejected, only works with camelCase
Hey folks — ran into an odd one when creating an assistant using the Ruby SDK.
If I use first_message (snake_case), I get this error:
#<Faraday::BadRequestError response={status:400, body:
{"message":["property first_message should not exist"],
"error":"Bad Request","statusCode":400}}>
But if I switch to firstMessage (camelCase), everything works fine.
Here’s a quick repro:
require 'vapi_server_sdk'
client = Vapi::Client.new(token: Rails.application.credentials.vapi.api_key)
assistant = client.assistants.create(request: {
name: "test",
first_message: "Hi there, this is Alex from. How can I help you today?",
})Looks like the SDK expects Ruby-style snake_case, but the API only accepts camelCase.
Probably a serialization mismatch somewhere in [lib/vapi_server_sdk/assistants/client.rb](https://github.com/VapiAI/server-sdk-ruby/blob/main/lib/vapi_server_sdk/assistants/client.rb#L599).
SDK version: 0.9.1
Ruby: 3.4
Rails: 7.2
Would be great if the SDK handled the conversion automatically so we can stick to idiomatic Ruby naming or change code documentation.
Metadata
Metadata
Assignees
Labels
No labels