positron

How can I use Azure OpenAI in Positron


Is it possible to use Azure OpenAI in Positron which is VScode based IDE?

I obtained the endpoint something like:

https://xxxxxx.cognitiveservices.azure.com/

And I've already added following setting to setting.json:

"positron.assistant.enabledProviders": [
         "openai-compatible" 
        ]

I can see following window and I tried to enter API key and Base URL as follows:

<my-endpoint>openai/deployments/gpt-5-6/chat/completions?api-version=2025-04-01-preview

enter image description here

However, that didn't work.

This is an error message:

enter image description here

Update — Resolved

Following the accepted answer, I tried following process and that worked:

  1. Configure positron.assistant.configuredModels to identify what model (e.g. gpt-5-6) I inteded to use.
  2. Enter "https://xxxxxx.cognitiveservices.azure.com/openai/v1" in Configure Language Provider window.

Solution

  • I'm one of the developers of Positron and work on Assistant! As of yet, Azure/AI Foundry isn't officially supported, but we do have a workaround using the OpenAI compatible provider:

    1. Configure an OpenAI-compatible model using the URL https://[Azure OpenAI endpoint]/openai/v1 - where Azure OpenAI endpoint is the OpenAI-compatible URL from the Azure portal. You'll need to add on the /openai/v1 suffix.

    2. Configure positron.assistant.configuredModels to list the models deployed on your Azure instance under the openai-compatible provider key.

    As an example:

    "positron.assistant.configuredModels": {
        "openai-compatible": [
            {
                "name": "GPT OSS 120B",
                "identifier": "gpt-oss-120b",
                "maxInputTokens": 200000,
                "maxOutputTokens": 64000
            }
        ]
    }
    

    In this, "name" can be any string you'd like, but "identifier" must match the model identifier in Azure.

    You can track updates on official support for Azure/AI Foundry on Positron's Github repo here:
    https://github.com/posit-dev/positron/issues/8583