Unable to register a new model - error 'Invalid arguments in credential body'

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):

OpenSearch 2.15

Describe the issue:
I am trying to register a new model from together.ai with the _plugins/_ml/models/_register endpoint. I have used ml-commons/docs/remote_inference_blueprints/gcp_vertexai_connector_embedding_blueprint.md at 2.x · opensearch-project/ml-commons · GitHub as a reference, and my request is as follows:

POST /_plugins/_ml/models/_register
{
    "name": "Together API Connector",
    "function_name": "remote",
    "description": "test togetherai model",
    "model_group_id": "...",
    "connector": {
        "name": "Together API Connector",
        "description": "Test connector to Together API",
        "version": 1,
        "protocol": "http",
        "credential": {
            "togetherAI_token": "..."
        },
        "parameters": {
            "endpoint": "api.together.xyz",
            "model": "meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo"
        },
        "actions": [{
            "action_type": "predict",
            "method": "POST",
            "url": "https://${parameters.endpoint}/v1/chat/completions",
            "headers": {
                "Authorization": "Bearer ${credential.togetherAI_token}"
            },
            "request_body": "{\"model\": \"${parameters.model}\", \"messages\": ${parameters.messages} }"
        }]
    }
}

On calling ther service, I get the following error:
java.lang.IllegalArgumentException: Invalid Arguments in credential body

I also raised the issue at 'Invalid Arguments in credential body' on trying to register a new model · Issue #3059 · opensearch-project/ml-commons · GitHub, but the suggested fix did not work for me.