gpt-5-codex failure: AI_APICallError: Item 'rs_... of type 'reasoning' was provided without its required following item.
Seeing this pretty regularly, happening with both the zen and openai provider (although more with the latter it feels like)
This issue might be a duplicate of existing issues. Please check:
- #2610: Same exact error message with GPT-5 reasoning models - was a regression that got fixed
- #2628: Identical error with GPT-5 and reasoning type issues - also resolved
Feel free to ignore if none of these address your specific case.
@berenddeboer this is because you are switching providers midway through a chat, we will need to account for that but just so u know
Interesting, I had the same issue yesterday, pretty often, when I's using exclusively z.ai GLM4.6, without switching any providers.
@rekram1-node, could you share some info how can I debug that or collect more useful data, to understand what's going on under the hood?
The only useful info I got from --print-logs is this:
{
responseBody: '{"error":{"code":"1210","message":"Invalid API parameter, please check the documentation."}}',
isRetryable: false,
data: {
error: {
message: 'Invalid API parameter, please check the documentation.',
code: '1210'
}
}
}
If you need anything else, please tell
Interesting, I had the same issue yesterday, pretty often, when I's using exclusively z.ai GLM4.6, without switching any providers.
@rekram1-node, could you share some info how can I debug that or collect more useful data, to understand what's going on under the hood?
i'm having the same issue since yesterday. Its still present as of commenting. (Happens with zen - Grok Code Fast 1 too)
More context: It usually happens after a couple of user messages (mostly on the 1st or the second follow up)
ahhh okay but those are different errors :) this issue is about: Item 'rs_... of type 'reasoning' was provided without its required following item.
I can point you in direction of GLM ticket @wKich
@hashangit what error do u see?
@rekram1-node they seem to have fixed it for https://github.com/vercel/ai/issues/7099 but still presents in opencode
@sai-sy we talked to openai this remains an issue for a lot of people because of how the responses api works.
You can try getting around it by doing this:
"openai": {
"models": {
"gpt-5": {
"options": {
"include": ["reasoning.encrypted_content"],
"store": false,
},
},
},
},
Just do that for the openai models u use, we previously couldn't do this automaticaly because of some restrictions but I think they updated it for us actually
@rekram1-node am I meant to preface that key with something because with this config:
{
"$schema": "https://opencode.ai/config.json",
"permission": {
"bash": {
"rg *": "allow",
"grep *": "allow",
"find *": "allow",
"curl *": "allow"
}
},
"lsp": {
"clangd": {
"disabled": true
}
},
"openai": {
"models": {
"gpt-5-codex": {
"options": {
"include": ["reasoning.encrypted_content"],
"store": false,
},
"gpt-5.1-codex": {
"options": {
"include": ["reasoning.encrypted_content"],
"store": false,
},
},
},
},
}
I get this error
$ opencode
Error: Config file at /home/sai/.config/opencode/opencode.json is invalid
↳ Unrecognized key: "openai"
@sai-sy it should be inside the "provider" key, see: https://opencode.ai/docs/providers/
yeah needs to be in providers sorry
this happens for me when opencode crashes and I try to continue the chat with "please continue" not switching the model.
Item 'rs_...' of type 'reasoning' was provided without its required following item.
@berenddeboer this is because you are switching providers midway through a chat, we will need to account for that but just so u know
New user here, installed first the mac app (as it was the main affordance on the page). Did nothing there, switched to terminal, followed instructions:
- /connect
- Choose Zen, copy & paste KEY
- enable billing
- choose GPT-5.1 Codex
- /init
- add prompt in plan mode
- start building
Got this problem twice in my very first session 🤷♂️ Item with id 'rs_029e6e8f0b72ec9700694a6f32.........' not found.
Onboarding is really crucial if folks are to migrate from Claude Code to here. FWIW there was also another issue (maybe related?):
# Search for startTopLoadingBar usages $ rg -n "startTopLoadingBar" -n zsh:1: command not found: rg
So I brew installed ripgrep and told it to try again, then it did some work and stumbled upon the item with id 'rs_029e6... not found issue again.
This should be fixed in the next release (1.1.24) by commit: https://github.com/anomalyco/opencode/commit/40836e96835862e98e042d3fc0869970eaaaedfb