https://<resource>.cognitiveservices.azure.com.
Prerequisites
Before connecting Azure AI Foundry, create:- an Azure AI Services resource in Azure AI Foundry
- an API key for that resource
- a deployment for every model you intend to use
azure-cognitive-services/gpt-5.6-terra requires a
deployment named gpt-5.6-terra.
Configuration
Add Azure AI Foundry in Settings > Models, then enter the API key and resource name shown in the Azure portal. Enter the resource name only, not the full endpoint URL. Environment-variable configuration uses:azure-cognitive-services/
prefix. In gateway mode, the API key stays on the Roomote control plane and
model requests are proxied to the configured Foundry resource. The non-secret
resource name remains available to the task runtime so OpenCode can initialize
the provider.
Verify setup
- save the API key and resource name
- confirm each Foundry deployment name matches its model ID
- enable an
azure-cognitive-services/...model and assign it to a role - run a small task and confirm usage appears for the Azure resource
Common issues
- The resource cannot be reached. Enter only the resource name, such as
my-resource, without a URL, path, or domain. - Azure reports that the deployment does not exist. Rename or recreate the deployment so its name exactly matches the model ID.
- A non-GPT catalog model fails through the gateway. This provider’s first-class gateway support covers the default Azure OpenAI SDK route. Use direct mode for models whose Azure catalog entry uses another SDK or host.