Skip to main content
Mem0 Now Supports Azure OpenAI Models in TypeScript SDK
To use Azure OpenAI models, you have to set the LLM_AZURE_OPENAI_API_KEY, LLM_AZURE_ENDPOINT, LLM_AZURE_DEPLOYMENT and LLM_AZURE_API_VERSION environment variables. You can obtain the Azure API key from the Azure Portal. Optionally, you can use Azure Identity to authenticate with Azure OpenAI, which allows you to use managed identities or service principals for production and Azure CLI login for development instead of an API key. If an Azure Identity is to be used, do not set the LLM_AZURE_OPENAI_API_KEY environment variable or the api_key in the config dictionary.
Note: The following are currently unsupported with reasoning models Parallel tool calling,temperature, top_p, presence_penalty, frequency_penalty, logprobs, top_logprobs, logit_bias, max_tokens

Usage

We also support the new OpenAI structured-outputs model. Typescript SDK does not support the azure_openai_structured model yet.
As an alternative to using an API key, the Azure Identity credential chain can be used to authenticate with Azure OpenAI role-based security.
If an API key is provided, it will be used for authentication over an Azure Identity
Below is a sample configuration for using Mem0 with Azure OpenAI and Azure Identity:
Refer to Azure Identity troubleshooting tips for setting up an Azure Identity credential.

Config

All available parameters for the azure_openai config are present in Master List of All Params in Config.