Is there a way to pass additional parameters to open ai model with AI Agent

At my work, we are could only use self hosted open AI models that requires a user parameter along with messages and model. This user param is used for multiple reasons such as tracking the usages, cost and other analytics etc.,

I cannot find a way to pass the user param to the open AI model and hence getting this error

You must pass a ‘user’ json field to your request

If I cannot pass the user param, I cannot use my org AI model and will be forced use LangChain+Python code approach. I really like the way n8n workflows are implemented so I would prefer n8n route. Today is my first hands on with n8n so please go easy on me if I am missing something obvious here.

Have you looked at using OpenRouter? You can use a base url as far as I understand from which you could prob add the parameter you need? I have not tried this myself.

What model are you guys using in the company?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.