You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(azure): pasted endpoint forms, default api-version 2024-10-21, deployment-name model
Matches CodeGPT 3.24.65: the Azure provider accepts either the resource host
or the full request URL from Azure AI Foundry's View code, reads the
deployment and api-version from the full form, and defaults to 2024-10-21.
- Go to [Azure AI Foundry](https://ai.azure.com/) (formerly Azure OpenAI Studio) and deploy a model. Note the **deployment name** you give it.
14
+
- Open the deployment and select **View code**. It shows two things you need:
15
+
- the **API key**
16
+
- the **endpoint**. Either form works in CodeGPT:
17
+
- the resource host only, for example `https://my-resource.openai.azure.com`
18
+
- the full request URL from the code sample, for example `https://my-resource.openai.azure.com/openai/deployments/my-deployment/chat/completions?api-version=2024-10-21`. When you paste this form, CodeGPT uses the deployment and api-version from it.
19
+
- In the CodeGPT extension, open **Select your model** → **Manage Models** → **API Keys** and pick **Azure** as the provider.
20
+
- Paste the endpoint into **Custom Link** and the key into **API Key**, then click **Connect**.
21
+
- Select a model. The model name must be your **deployment name** as shown in Azure, not the underlying model's name. If your deployment is not in the list, type it in.
22
+
- Click outside the options and ask something in the chat.
23
+
24
+
:::note api-version
25
+
If you paste only the resource host, CodeGPT calls the `2024-10-21` API version. To use a different version, paste the full request URL from **View code** and CodeGPT will use the api-version it contains.
26
+
:::
27
27
28
28
:::caution Remove or edit Key
29
29
To remove your API Key from CodeGPT, click on `Change connection settings` button
If you are getting API errors check the following link: [Microsoft Azure Documentation](https://azure.microsoft.com/en-us/products/ai-services/openai-service/)
33
+
34
+
-`404 Resource not found`: the model name in CodeGPT does not match a deployment name in your resource, or the endpoint points at a different resource.
35
+
-`401 Access denied`: wrong key, or the key belongs to another resource.
36
+
- Other errors: check the [Microsoft Azure Documentation](https://learn.microsoft.com/en-us/azure/ai-services/openai/reference).
0 commit comments