Skip to content

gpt 5.4 from azure costantly fails with "Item ... of type 'reasoning' was provided without its required following item." #20698

Closed

Description

@DanielusG

Description

When using OpenCode with GPT 5.4 xhigh provided from Azure Cognitive Services after 1/2 tool calls it returns:
Item ... of type 'reasoning' was provided without its required following item.

This happens both with web ui and TUI

Even saying "continue" it still crash, but if i switch to GPT 5.3 Codex it works again, then switching to GPT 5.4, again the same error

Plugins

only dcp (dynamic-context-pruning)

OpenCode version

v1.3.12

Steps to reproduce

No response

Screenshot and/or share link

Image

Operating System

Garuda Linux

Terminal

No response

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Apr 2, 2026
  2. github-actions commented on Apr 2, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Please review these issues to see if your problem is already tracked or if there is a workaround available.

  3. riccardo-algorime commented on Apr 10, 2026

    @riccardo-algorime

    +1

  4. riccardo-algorime commented on Apr 10, 2026

    @riccardo-algorime

    on high also

  5. AmrAbuElyazid commented on Apr 11, 2026

    @AmrAbuElyazid

    +1 on MacOS, GPT 5.4 Azure Cognitive Services

  6. R-udren commented on Apr 13, 2026

    @R-udren

    +1, fails on GPT 5.4 and 5.3 Codex from Azure Cognitive Services on all reasoning efforts

  7. riccardo-algorime commented on Apr 14, 2026

    @riccardo-algorime

    it does the same in codex, i think its a problem of azure foundry, where should we report that?

  8. DanielusG commented on Apr 14, 2026

    @DanielusG
    Author

    it does the same in codex, i think its a problem of azure foundry, where should we report that?

    For the moment, it is better to wait for a response from an OpenCode collaborator; perhaps it is due to the format in which the requests are being sent like this similar issue: #2941

  9. DanielusG commented on Apr 14, 2026

    @DanielusG
    Author

    A workaround I have found that works is to add BYOK on OpenRouter, check the "always use for this provider" option, and then disable the other providers that offer the GPT model you are using; this way, you can be certain it only uses Azure and you won't have any cost surprises. As a precaution, also create a key with a 1 dollar budget to limit the damage in case of misconfiguration.

  10. AmrAbuElyazid commented on Apr 14, 2026

    @AmrAbuElyazid

    Has anyone else been seeing an unusually frustrating model-level refusal "I’m sorry, but I cannot assist with that request." over the past couple of days on Azure, even after switching from Default v2 to Default guardrails?

  11. R-udren commented on Apr 14, 2026

    @R-udren

    Has anyone else been seeing an unusually frustrating model-level refusal "I’m sorry, but I cannot assist with that request." over the past couple of days on Azure, even after switching from Default v2 to Default guardrails?

    Yes, on GPT 5 to 5.2 models all the time. On 5.3 and 5.4 almost never.

  12. AmrAbuElyazid commented on Apr 14, 2026

    @AmrAbuElyazid

    I haven’t tested the other versions since I’m only using 5.4, but I can confirm it’s happening for me on 5.4 in a very frustrating way

  13. DanielusG commented on Apr 14, 2026

    @DanielusG
    Author

    Has anyone else been seeing an unusually frustrating model-level refusal "I’m sorry, but I cannot assist with that request." over the past couple of days on Azure, even after switching from Default v2 to Default guardrails?

    Yes, i solved by creating a new guardrail lowering all the protection to minimum and deploying the model with that custom guardrail

  14. 15 remaining items

  15. DanielusG commented on Apr 16, 2026

    @DanielusG
    Author

    Next release includes patch that should resolve this.

    Is there a Pull Request I can reference for a quick look?

  16. rekram1-node commented on Apr 16, 2026

    @rekram1-node
    Collaborator

    See linked pr, #22764

  17. rekram1-node commented on Apr 16, 2026

    @rekram1-node
    Collaborator

    1.4.7 which is releasing rn will have the patch, plz test and lmk

  18. DanielusG commented on Apr 17, 2026

    @DanielusG
    Author
  19. DanielusG commented on Apr 17, 2026

    @DanielusG
    Author

    Now I'm trying to reproduce the error with chat content that I can share here.

  20. DanielusG commented on Apr 17, 2026

    @DanielusG
    Author

    @rekram1-node

    I managed to reproduce the bug by asking the model to analyze the opencode codebase.

    For some reason, I can't post the entire log here, and Pastebin was blocking it as spam.

    So i created a gist and a download link. I hope they're okay and useful :)

    https://gist.github.com/DanielusG/37f6b34266919fddaadc354824db1d64

    session.json

  21. rekram1-node commented on Apr 17, 2026

    @rekram1-node
    Collaborator

    hmmm okay ill try to figure out cause there weird

  22. rekram1-node commented on Apr 19, 2026

    @rekram1-node
    Collaborator

    Kinda didnt do much today, tmr I hope to completely fix this, I think something the ai sdk does under the hood is mismatched w/ how other tools like codex handle the azure requests, should hopefully be a straight forward fix.

  23. npagare commented on Apr 21, 2026

    @npagare

    Hello @rekram1-node , today, in the latest OC Desktop version 4.1.19, I have hit the id error again
    "Item with id 'rs_04f64f01bab1b2210069e7a257e6948196aa96bc775fae0c38' not found."

  24. aKardasz commented on Apr 22, 2026

    @aKardasz

    Same deal running into this as well.

  25. rekram1-node commented on Apr 29, 2026

    @rekram1-node
    Collaborator

    opened a pr that should finally kill this

  26. rekram1-node commented on Apr 29, 2026

    @rekram1-node
    Collaborator

    Okay i merged it, should release soon, once it does I'm pretty sure this error wont be possible to replicate anymore.

    I will continue watching this issue

  27. R-udren commented on Apr 29, 2026

    @R-udren

    Okay i merged it, should release soon, once it does I'm pretty sure this error wont be possible to replicate anymore.

    I will continue watching this issue

    Had this issue today with GPT 5.5 from Azure. I will use it a lot tommorow and notify you if something gonna break.

  28. rekram1-node commented on Apr 30, 2026

    @rekram1-node
    Collaborator

    Alr well fix has been released so hopefully it works well for everyone

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 workingcoreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions