Using camunda 8 openAI connector

I am trying to use the azure open AI connector which comes with camunda 8, however i dont see an option to send my custom URL, i am asking this because as part of organisational policies we dont connect directly rather we connect thru the custom gateway. This gateway also requires few headers. Can someone please help with how this can be achieved?

Hi @Aditya_Magadi, welcome to the forums! The Azure OpenAI connector is hard coded for the Azure URL, so there isn’t a way to use a custom gateway with the current connector. However, there might be some workarounds available.

Is the gateway an Azure gateway of some sort (like the API Gateway)? Or something else entirely?

This is a custom api gateway. Can the same requirement be achieved using the agent ai connector?

@Aditya_Magadi - both of those connectors assume the Azure URL is being used. Is the gateway a proxy that requires authentication details in the header, or is the entire request transformed?

Yes it is a proxy that requires api key in the header. The gateway in turn calls the azure deployment.

@Aditya_Magadi - I chatted with our engineers and unfortunately don’t have an easy workaround at the moment.

Connectors do support proxying requests if you configure the runtime to do so (see docs here). However, that method only supports user+pass authentication to the proxy, not headers. If you have a moment, could you submit a feature request to support custom headers? (If you do submit a FR, could you reply with a link to your request and I can make sure our product management team has eyes on it.)

https://roadmap.camunda.com/c/236-how-to-submit-a-feature-request

Support for what you need is close but not quite there unfortunately. The best way to handle this today is probably to fork the connector and add support for your proxy. The Azure OpenAI connector uses a custom element template on top of the existing REST connector. You can see how it builds the URLs here, and you can see here how to add headers with the template.

You likely don’t need a custom JAR for this, but you would be forking the element template and deploying a custom version of your connector to your cluster.

This blog post, though two years old, is still relevant and applicable to connectors in 8.7 and 8.8:

Thanks for your response Nathan, as i was looking into the azure open ai connector i see agentic AI is available on 8.8.0alpha6. I would like leverage this since it was the ability to do tool calling. However i see the same challenge with it as well where i am unable to pass my custom gateway URL and with necessary headers to it. For this as well do you suggest i create a custom connector?

@Aditya_Magadi - for now, yes, that is the best option. But the agentic connector is more complex and I’m not sure if you can achieve this by just altering the element template.

I’ve shared this with our agentic AI team, as they are currently investigating how to support different gateways for the connector.