For the complete documentation index, see llms.txt. This page is also available as Markdown.

Microsoft Foundry Chat Model

The Microsoft Foundry Chat Model node connects conversational agents to the chat models on your Microsoft Foundry or Azure OpenAI resource.

This node was previously called the Azure AI Foundry Chat Model node and the Azure OpenAI Chat Model node.

On this page, you'll find the node parameters for the Microsoft Foundry Chat Model node, and links to more resources.

Credentials

Refer to the Microsoft Foundry credentials documentation for authentication information for this node.

Parameter resolution in sub-nodes

Sub-nodes behave differently to other nodes when processing multiple items using an expression.

Most nodes, including root nodes, take any number of items as input, process these items, and output the results. You can use expressions to refer to input items, and the node resolves the expression for each item in turn. For example, given an input of five name values, the expression {{ $json.name }} resolves to each name in turn.

In sub-nodes, the expression always resolves to the first item. For example, given an input of five name values, the expression {{ $json.name }} always resolves to the first name.

Node parameters

  • Authentication: Choose API Key or Azure Entra ID (OAuth2). Each option uses its own credential.

  • Project: Enter the name of the Microsoft Foundry project that owns the deployment. Leave it empty to use the Project from the credential. A classic Azure OpenAI resource doesn't use it.

  • Model (Deployment): Select the deployment to use to generate the completion.

    • From List: Choose from the deployments in your project. The list shows chat deployments only. It needs a Microsoft Foundry credential and a Project, in this field or in the credential. Set Project first.

    • By ID: Enter the deployment name. Use this for a classic Azure OpenAI credential, or for a deployment that isn't in the list.

  • Model Family: Choose the API family the deployment uses. Azure doesn't report this, so set it to match your deployment.

    • OpenAI: For GPT and other OpenAI-compatible models.

    • Anthropic: For Claude models. This needs a credential that uses the Microsoft Foundry endpoint type. The Frequency Penalty, Presence Penalty, and Response Format options aren't available for this family.

  • Use Responses API: Choose which API the node calls for an OpenAI family deployment. This needs a credential that uses the Microsoft Foundry endpoint type.

    • Off (default): The node calls the Chat Completions API. Use this for most deployments.

    • On: The node calls the Responses API. Turn this on for a deployment that only supports the Responses API. Azure returns a 400 Model not supported error if you call such a deployment with Chat Completions.

Existing workflows

Workflows created before these changes keep the Model (Deployment) Name text field and use Chat Completions. Create a new node to use the deployment list and the Use Responses API setting.

Node options

  • Frequency Penalty: Use this option to control the chances of the model repeating itself. Higher values reduce the chance of the model repeating itself.

  • Maximum Number of Tokens: Enter the maximum number of tokens used, which sets the completion length.

  • Response Format: Choose Text or JSON. JSON ensures the model returns valid JSON.

  • Presence Penalty: Use this option to control the chances of the model talking about new topics. Higher values increase the chance of the model talking about new topics.

  • Sampling Temperature: Use this option to control the randomness of the sampling process. A higher temperature creates more diverse sampling, but increases the risk of hallucinations. The maximum is 2 for the OpenAI model family and 1 for the Anthropic model family.

  • Timeout: Enter the maximum request time in milliseconds.

  • Max Retries: Enter the maximum number of times to retry a request.

  • Top P: Use this option to set the probability the completion should use. Use a lower value to ignore less probable options.

  • Extra Body: Enter extra JSON properties to add to the request body. Use this for parameters that your deployment supports and the other options don't cover. The value must be a JSON object.

Proxy limitations

This node doesn't support the NO_PROXY environment variable.

Templates and examples

Browse Microsoft Foundry Chat Model node documentation integration templates or search all templates

Refer to LangChain's Azure OpenAI documentation for more information about the service.

View n8n's Advanced AI documentation.

Last updated

Was this helpful?