You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AI_APICallError occurs after running Opencode with Azure GPT-5 Codex and GPT-5 for several minutes #3044
The bug
After starting Opencode with the Ai Foundry Azure GPT-5 Codex and GPT-5 model, the application works as expected initially. However, after running it for a few minutes, the following error appears:
AI_APICallError: Item 'fc_0dc4d92ad113352f0068e68182f9c0819783624eeb74dcfc0e' of type 'function_call' was provided without its required 'reasoning' item:
'rs_0dc4d92ad113352f0068e68182ada481978281511f6e4248d4'.
Configuration: I tried this fix, but nothing changed
I get this issue with Codex as well.. so it not entirely an opencode issue I'm afraid. Although it would be good to have a work-around as it makes it totally unusable.
@jaccoh can you show me your opencode config? This has to do with reasoning metadata being dropped or missing, maybe your config would help me figure it out
Hi @rekram1-node I get a similar error with all the gpt-5 models at the moment.
AI_APICallError: Item 'msg_0288ca1a50a0201e0068f16f8334d881968df03cba2706156d' of type 'message' was provided without its required 'reasoning' item:
'rs_0288ca1a50a0201e0068f16f7c85448196996ec857642b076b'.
ill release it tmr so we can fix azure, I will also look into "store": false and if we can use it a default and the tradeoffs so we can prevent this error going forward
Mine actually worked without tomorrow's release. I did upgrade to 0.15.10, but changed my config to the one I supplied. (I think my issue is slightly different as I'm not using azure) My error message was also "of type 'message'" instead of "of type 'function_call'"
Activity
github-actions commentedon Oct 8, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
patrafter1999 commentedon Oct 9, 2025
I have the same issue. This happens with and without the tool in ./.opencode/tool/mytool.ts
rekram1-node commentedon Oct 9, 2025
@patrafter1999 you said same error but that’s an entirely different error?
Quanta-Naut commentedon Oct 9, 2025
@rekram1-node any notable solutions that work, or any workarounds available??
rekram1-node commentedon Oct 9, 2025
@Quanta-Naut lemme do an azure deployment to test, i cant replicate w/ the other providers
ill try to get back to u on this tmr (2am where i am rn)
rekram1-node commentedon Oct 9, 2025
and this is on latest right? or at least some v0.14.xxx right?
Quanta-Naut commentedon Oct 9, 2025
@rekram1-node Yes this is on the latest.
sheldonhull commentedon Oct 17, 2025
I ran into this today as well
rekram1-node commentedon Oct 17, 2025
@sheldonhull are you on 0.15.7? Also are you also using azure?
jaccoh commentedon Oct 19, 2025
I get this issue with Codex as well.. so it not entirely an opencode issue I'm afraid. Although it would be good to have a work-around as it makes it totally unusable.
rekram1-node commentedon Oct 19, 2025
@jaccoh can you show me your opencode config? This has to do with reasoning metadata being dropped or missing, maybe your config would help me figure it out
rekram1-node commentedon Oct 19, 2025
@jaccoh are you exportng it as toml? What's this?
[projects."/Users/jhoeve/PycharmProjects/bank_transactions_importer"]
trust_level = "trusted"
I don't think you shared your opencode.json?
jaccoh commentedon Oct 19, 2025
oops :)
adeperio commentedon Oct 20, 2025
Hi @rekram1-node I get a similar error with all the gpt-5 models at the moment.
AI_APICallError: Item 'msg_0288ca1a50a0201e0068f16f8334d881968df03cba2706156d' of type 'message' was provided without its required 'reasoning' item:
'rs_0288ca1a50a0201e0068f16f7c85448196996ec857642b076b'.
I simplified my opencode.json to this:
Any idea what might be happening?
I'm on 0.15.8
jaccoh commentedon Oct 20, 2025
IMHO the error is clear.. apparently answers can sometimes not contain reasoning and open code fails on it
rekram1-node commentedon Oct 20, 2025
is this happening no matter what you send or does it only happen if you do an abort mid convo
adeperio commentedon Oct 20, 2025
Hi @rekram1-node it happens no matter what I send. I have had to switch off openai models.
rekram1-node commentedon Oct 21, 2025
should be fixed in next release if you set this in your opencode.json:
Thank u @zWingz
adeperio commentedon Oct 21, 2025
Awesome thanks @rekram1-node that worked
rekram1-node commentedon Oct 21, 2025
ill release it tmr so we can fix azure, I will also look into "store": false and if we can use it a default and the tradeoffs so we can prevent this error going forward
adeperio commentedon Oct 21, 2025
Mine actually worked without tomorrow's release. I did upgrade to 0.15.10, but changed my config to the one I supplied. (I think my issue is slightly different as I'm not using azure) My error message was also "of type 'message'" instead of "of type 'function_call'"
rekram1-node commentedon Oct 21, 2025
u were using openai so that will work, but for azure it wont (yet) until i release, thats what my previous message meant to say
adeperio commentedon Oct 21, 2025
Ahh understood. Thanks!
jaccoh commentedon Oct 21, 2025
Is it the .10 I need to test?
rekram1-node commentedon Oct 21, 2025
i will release today it will be 0.15.11
Edit: released