Contribution Proposal: Azure OpenAI Provider Support #32364
zantis
started this conversation in
Feature Requests
Replies: 3 comments
-
|
I'd very much like to see this in Zed. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Support for Microsoft Foundry Azure OpenAI models was implemented in #43742 but Zed team closed the PR saying they will enable specifying models via extensions soon™. There's a AWS Bedrock provider related PR in #41393 so let's see what happens with it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Azure OpenAI Provider Support for Zed
Problem Statement
Currently, Zed lacks support for Azure OpenAI. Many enterprises mandate Azure OpenAI over OpenAI due to compliance, data governance, and security requirements. Given that my organization relies on Azure OpenAI, I developed this support out of necessity and would now like to contribute it back.
I recognize there may be some discussion overlap and duplication, but followed the contribution guidelines encouraging discussion here prior to making a pull request
Community Demand
This has been a frequently requested feature with community interest and discussion:
Solution Proposal
I have implemented and thoroughly tested a dedicated Azure OpenAI provider. Here's how it works:
Open the Agent Panel → Configure → Enter your API key





Configure your model deployments in your Zed settings
~/.config/zed/settings.json. Example is shown in the panel for convenienceSelect your Azure OpenAI model in the Agent Panel
gpt-4.1 (write) example
o4-mini (ask) example
o1 (ask) example
File Changes & Components
crates/language_models/src/language_models.rscrates/language_models/src/provider.rsazure_open_ai.rs. By reusing the existing OpenAI crate, minimal additional development was required →crates/language_models/src/provider/azure_open_ai.rs[NEW]crates/language_models/src/settings.rscrates/agent_settings/src/agent_settings.rscrates/icons/src/icons.rsassets/icons/ai_azure_open_ai.svg[NEW] as shown in the screenshots above. (icon used to the right of this arrow) →crates/language_models/src/configuration.md(begin documentation snippet)
Azure OpenAI {#azure-openai}
Zed supports Azure OpenAI models through the Azure AI Foundry or Azure Portal.
Setting up Azure OpenAI
agent: open configuration) and navigate to the Azure OpenAI sectionsettings.jsonto set up the Azure OpenAI models you want to useAzure OpenAI Configuration
To configure Azure OpenAI models, add the following to your Zed
settings.json:Configuration Fields
resource_name: The name of your Azure OpenAI resource (not the full endpoint URL)api_version: Azure OpenAI API versiondeployment_name: The deployment name you created in Azure AI Foundry or Azure portalname: The underlying OpenAI model name (must match the model used in your deployment)max_tokens: Maximum context window size for the modelmax_output_tokens: Maximum number of tokens the model can generate in a single responsemax_completion_tokens: Alternative tomax_output_tokensused specifically by o-series reasoning modelsYou must provide the model's Context Window in the
max_tokensparameter; this can be found in the Azure OpenAI model documentation.Azure OpenAI o-series models should set
max_completion_tokensas well to avoid incurring high reasoning token costs.(end of documentation snippet)
Considerations
This enhancement seems to align with the broader goals of the Zed to smoothly integrate LLMs in multiple ways across the editor. I'm excited to contribute this to Zed and help make it more accessible to enterprise developers. This is my first time contributing to Zed, so I welcome any feedback on both the technical approach and contribution process. Appreciate your consideration and look forward to your feedback. Thanks.
-Z
Beta Was this translation helpful? Give feedback.
All reactions