Repository navigation
Description
I can't get planning mode to work with models provided via Azure. Whenever I try to run a query in plan mode opencode responds with:
"I'm sorry, but I cannot assist with that request."
Switching to build mode gives the same answer the first time I rerun the query, but trying again gives me an answer.
The log does not indicate any errors apart from not finding GPT-5-nano as a title model (I have no such model deployed).
ERROR 2025-09-09T05:16:10 +93ms service=session session=ses_6d318d812ffe0izVncE4PZnotg error=The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. model=gpt-5-nano failed to generate title
(actually I also found these errors, not sure they are relevant:
ERROR 2025-09-09T05:14:48 +0ms service=server error=ENOENT: no such file or directory, open '/home/erik/.local/share/opencode/storage/message/ses_6d32dbf40ffeg9XeP5mVm6AHCt/msg_92cd294f60017Yt6S2z5MFnqWZ.json' failed
INFO 2025-09-09T05:14:48 +1ms service=server duration=7 response
INFO 2025-09-09T05:14:48 +0ms service=bus type=message.removed publishing
INFO 2025-09-09T05:14:48 +0ms service=project directory=/home/erik/work/sectra-reporting fromDirectory
INFO 2025-09-09T05:14:48 +0ms service=bus type=session.updated publishing
INFO 2025-09-09T05:14:48 +0ms service=project directory=/home/erik/work/sectra-reporting fromDirectory
ERROR 2025-09-09T05:14:48 +0ms service=tui failed to send message: POST "http://127.0.0.1:46244/session/ses_6d32dbf40ffeg9XeP5mVm6AHCt/message": 400 Bad Request {"name":"UnknownError","data":{"message":"Error: ENOENT: no such file or directory, open '/home/erik/.local/share/opencode/storage/message/ses_6d32dbf40ffeg9XeP5mVm6AHCt/msg_92cd294f60017Yt6S2z5MFnqWZ.json'"}}
)
I did some tests just prompting the model with "hi" in both plan mode and build mode
Build mode:
{
"id": "msg_92ce871a90015hzStqhPiiogtA",
"role": "assistant",
"system": [
<truncated>
],
"mode": "build",
"path": {
"cwd": "<path>",
"root": "<path>"
},
"cost": 0.027494,
"tokens": {
"input": 10931,
"output": 32,
"reasoning": 0,
"cache": {
"write": 0,
"read": 10752
}
},
"modelID": "gpt-4.1",
"providerID": "azure",
"time": {
"created": 1757395055017,
"completed": 1757395056413
},
"sessionID": "ses_6d318d812ffe0izVncE4PZnotg"
}
The same prompt in plan mode:
{
"id": "msg_92ce83bbb001OR9L0kSQ3YEbvu",
"role": "assistant",
"system": [
<truncated>
],
"mode": "plan",
"path": {
"cwd": "<path>",
"root": "<path>"
},
"cost": 0,
"tokens": {
"input": 0,
"output": 0,
"reasoning": 0,
"cache": {
"write": 0,
"read": 0
}
},
"modelID": "gpt-4.1",
"providerID": "azure",
"time": {
"created": 1757395041211,
"completed": 1757395041839
},
"sessionID": "ses_6d318d812ffe0izVncE4PZnotg"
}
I have also tried using GPT-5-mini with the same result.
It is strange that this only affects plan mode, any thoughts? I'm not sure which logs/artifacts that are needed to troubleshoot this issue but I can provide them if asked.
Activity
github-actions commentedon Sep 9, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
eseaflower commentedon Sep 9, 2025
Managed to reproduce in a more concise way. Here are two runs one with the "plan" agent and one with the "build" agent.
rekram1-node commentedon Sep 9, 2025
Yeah we need to update the title generation, rn it is detecting that you are azure so it shows all azure models... given they all require deployments we should probably change that behavior
rekram1-node commentedon Sep 9, 2025
Looks like this may be specific to gpt-5-mini, or gpt-5 models, I think we gotta do prompt tweaks for that
eseaflower commentedon Sep 11, 2025
I experience the same bahavior when I use GPT 4.1 though:
rekram1-node commentedon Sep 11, 2025
Can you share your AGENTS.md files by chance? I can't replicate so I am trying to see if maybe this is related to some of your prompts you have?
Also opencode will pick up CLAUDE.md files if AGENTS.md isn't present (globally or locally)
TreeOfLearning commentedon Sep 12, 2025
I am experiencing this too, with GPT-5. I have no AGENTS.md or CLAUDE.md file.
I can ask it to plan anything, it will refuse every time, and when that happens it will subsequently refuse to answer any prompt regardless of the mode I am in. Happy to grab logs or anything helpful - just let me know what you need.
@rekram1-node Pinging to make sure you see :)
rekram1-node commentedon Sep 12, 2025
The plan mode prompt must be tripping it up, weird… I will make a deployment of full size gpt-5 and test more tonight
eseaflower commentedon Sep 15, 2025
The repro I did above was without any CLAUDE.md or AGENTS.md files. I was just running
opencode run hi --agent planin a folder only containing an opencode.json:TreeOfLearning commentedon Sep 15, 2025
GPT-5 seems to be really sensitive to this. Just playing in the playground a bit, even the very first line of the plan mode prompt trips it up:Happens regardless of reasoning levels etc.Edit: I've managed to resolve this. It's not GPT-5 causing the issues at all, but Azure's content filter on top of the model. In Azure, if you change the content filter from
DefaultV2toDefaultthe response no longer gets blocked:Result:
CC @eseaflower
rekram1-node commentedon Sep 15, 2025
Oo good to know thank you!!! I didn't get the chance to deploy the model unfortunately
eseaflower commentedon Sep 16, 2025
Wow! Thank you for the help. Now I'm off to planning.