diff options
| author | Youssef Achy <[email protected]> | 2025-11-17 00:01:45 -0600 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-11-17 00:01:45 -0600 |
| commit | 58cc5cdf2a8b5233a4859d1b0cec47e4e7478878 (patch) | |
| tree | 1d0c81701c609137642478fa59a329f61776383b /packages/web/src | |
| parent | 3c6dcad2afb6bc65a97affb4e72023465664509d (diff) | |
| download | opencode-58cc5cdf2a8b5233a4859d1b0cec47e4e7478878.tar.gz opencode-58cc5cdf2a8b5233a4859d1b0cec47e4e7478878.zip | |
add support for azure cognitive services provider (#4397)
Diffstat (limited to 'packages/web/src')
| -rw-r--r-- | packages/web/src/content/docs/providers.mdx | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/packages/web/src/content/docs/providers.mdx b/packages/web/src/content/docs/providers.mdx index d75c75d50..84a815490 100644 --- a/packages/web/src/content/docs/providers.mdx +++ b/packages/web/src/content/docs/providers.mdx @@ -229,6 +229,62 @@ Or if you already have an API key, you can select **Manually enter API Key** and --- +### Azure Cognitive Services + +1. Head over to the [Azure portal](https://portal.azure.com/) and create an **Azure OpenAI** resource. You'll need: + - **Resource name**: This becomes part of your API endpoint (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`) + - **API key**: Either `KEY 1` or `KEY 2` from your resource + +2. Go to [Azure AI Foundry](https://ai.azure.com/) and deploy a model. + + :::note + The deployment name must match the model name for opencode to work properly. + ::: + +3. Run `opencode auth login` and select **Azure**. + + ```bash + $ opencode auth login + + ┌ Add credential + │ + ◆ Select provider + │ ● Azure Cognitive Services + │ ... + └ + ``` + +4. Enter your API key. + + ```bash + $ opencode auth login + + ┌ Add credential + │ + ◇ Select provider + │ Azure Cognitive Services + │ + ◇ Enter your API key + │ _ + └ + ``` + +5. Set your resource name as an environment variable: + + ```bash + AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode + ``` + + Or add it to your bash profile: + + ```bash title="~/.bash_profile" + export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX + ``` + +6. Run the `/models` command to select your deployed model. + +--- + ### Baseten 1. Head over to the [Baseten](https://app.baseten.co/), create an account, and generate an API key. |
