Question
i am trying to set up opencode to use a deployment from my azure ai foundry (openai) project. i have therefore set up this opencode.jsonc file:
{
"$schema": "https://opencode.ai/config.json",
"model": "azure/GPT-4.1",
"theme": "opencode",
"autoupdate": true,
"provider": {
"azure": {
"options": {
"apiKey": "api-key",
"baseURL": "url-to-ai-foundry-project",
"resourceName": "opencode-test"
},
"models": {
"azure/GPT-4.1": {
"name": "GPT-4.1"
}
}
}
}
}
I have then used the powershell command [System.Environment]::SetEnvironmentVariable('AZURE_RESOURCE_NAME', 'opencode-test', 'User') to set the resuce name.
Lastly i used the opencode auth login and pasted the same api key that is set within the opencode.jsonc.
When i then try to use opencode, i then get:
anyone know what i might be doing wrong? is there a way to run it in "verbose mode", so it is easier to debug?
This is the model info:

Question
i am trying to set up opencode to use a deployment from my azure ai foundry (openai) project. i have therefore set up this
opencode.jsoncfile:I have then used the powershell command
[System.Environment]::SetEnvironmentVariable('AZURE_RESOURCE_NAME', 'opencode-test', 'User')to set the resuce name.Lastly i used the
opencode auth loginand pasted the same api key that is set within theopencode.jsonc.When i then try to use opencode, i then get:
anyone know what i might be doing wrong? is there a way to run it in "verbose mode", so it is easier to debug?
This is the model info: