opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Cant use Azure OpenAI

Open dogmatic69 opened this issue 1 month ago • 7 comments

Description

Setup as per the docs. Managed to make one request in plan mode to create agent file.

At the end, switched to build mode and all I get is

I'm sorry, but I cannot assist with that request.

After trying multiple times with build and plan, switching between them, it eventually wrote the file.

Closed and reopened opencode, and now all I get regardless of what I type is "I'm sorry, but I cannot assist with that request."

Also don't seem to be able to select GPT-5.1-codex-max. Given I've configured a resource and API key, it should be showing what I've actually provisioned rather than a fixed list?

OpenCode version

1.0.134

Steps to reproduce

see above

Screenshot and/or share link

first session: Image

Image

second session:

Image

Operating System

Windows 11 + WSL 2

Terminal

VS code built in terminal

dogmatic69 avatar Dec 07 '25 20:12 dogmatic69

Searching for potential duplicates...

github-actions[bot] avatar Dec 07 '25 20:12 github-actions[bot]

there is a setting in azure its like response security or something you need to change the setting ill update the docs about this

rekram1-node avatar Dec 07 '25 21:12 rekram1-node

https://github.com/sst/opencode/issues/2506#issuecomment-3292239706

rekram1-node avatar Dec 07 '25 21:12 rekram1-node

/oc use docs agent to update azure stuff to recommend:

In Azure, if you change the content filter from DefaultV2 to Default the response no longer gets blocked

rekram1-node avatar Dec 07 '25 21:12 rekram1-node

Created PR #5212

New%20session%20-%202025-12-07T21%3A03%3A40.116Z opencode session  |  github run

opencode-agent[bot] avatar Dec 07 '25 21:12 opencode-agent[bot]

I should have mentioned, I done that and it made no difference.

Also the initial time it worked, that was on V2. It then stopped working, I switched to the Default and does not work at all now.

Image

dogmatic69 avatar Dec 07 '25 21:12 dogmatic69

Hm well that comes directly from azure so something about your account or prompts is triggering their content issues.

I use azure openai often and it works just fine for me, just had to configure this policy.

Maybe it takes a little to take effect or something? I'm not sure

rekram1-node avatar Dec 07 '25 22:12 rekram1-node