Skip to content

Cant use Azure OpenAI #5211

Closed
Closed

Description

@dogmatic69

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

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Dec 7, 2025
  2. github-actions commented on Dec 7, 2025

    @github-actions
    Contributor

    Searching for potential duplicates...

  3. changed the title [-]Cant use OpenAI[/-] [+]Cant use Azure OpenAI[/+] on Dec 7, 2025
  4. removed
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Dec 7, 2025
  5. self-assigned this
    on Dec 7, 2025
  6. rekram1-node commented on Dec 7, 2025

    @rekram1-node
    Contributor

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

  7. rekram1-node commented on Dec 7, 2025

    @rekram1-node
    Contributor
  8. rekram1-node commented on Dec 7, 2025

    @rekram1-node
    Contributor

    /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

  9. opencode-agent commented on Dec 7, 2025

    @opencode-agent
    Contributor

    Created PR #5212

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

  10. dogmatic69 commented on Dec 7, 2025

    @dogmatic69
    Author

    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
  11. rekram1-node commented on Dec 7, 2025

    @rekram1-node
    Contributor

    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

  12. liaoyinglong commented on Jan 7, 2026

    @liaoyinglong

    I have the same issue.
    However, I don’t have permissions to access the Azure console, and the problem only occurs when running in plan mode.

    My solution was to disable the built-in PLAN agent and use a custom PLAN agent instead:

    {
      "$schema": "https://opencode.ai/config.json",
      "agent": {
        "plan": {
          "disable": true
        }
      }
    }
  13. sshresthh commented on Jan 22, 2026

    @sshresthh

    I am having the same issue when using Azure OpenAI

    Image
  14. kodjac commented on Jan 27, 2026

    @kodjac

    I am getting the same problem, the model works once after new setup and then refuses with "I'm sorry, but I cannot assist with that request." Azure OpenAI, "Default" Content filter used in a corporate environment.

    OK now after deploying a new Azure project, it works (so far) with content filter "Default".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions