TUI should show when it is retrying #4089
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentuiThis relates to changes in v1.0, now that opencode uses opentui
Description
Description
I'm running a local model through ik_llama.cpp. When trying to use opencode, I see error code 500 in the ik_llama.cpp log:
INFO [ log_server_request] request | tid="136314066296832" timestamp=1762628260 remote_addr="..." remote_port=64919 status=200 method="POST" path="/v1/chat/completions" params={}
INFO [ log_server_request] request | tid="136314049511424" timestamp=1762628268 remote_addr="..." remote_port=64920 status=500 method="POST" path="/v1/chat/completions" params={}
INFO [ log_server_request] request | tid="136314041118720" timestamp=1762628284 remote_addr="..." remote_port=64923 status=500 method="POST" path="/v1/chat/completions" params={}
But opencode is just stuck.
After some digging around, I found the actual error ik_llama.cpp returned to opencode in one of the ~/.local/share/opencode/storage/part/msg_* files:
"error": {
"name": "APIError",
"data": {
"message": "tools param requires --jinja flag",
"statusCode": 500,
"isRetryable": true,
"responseHeaders": {
"content-length": "90",
"content-type": "application/json; charset=utf-8",
"keep-alive": "timeout=5, max=5",
"server": "llama.cpp"
},
"responseBody": "{\"error\":{\"code\":500,\"message\":\"tools param requires --jinja flag\",\"type\":\"server_error\"}}"
}
},
Can we display the errors returned by the inference engine in the opencode window? Maybe as a line at the bottom of the screen?
OpenCode version
v1.0.45
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
macOS 14.0
Terminal
iTerm2
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentuiThis relates to changes in v1.0, now that opencode uses opentui
Activity
github-actions commentedon Nov 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.
rekram1-node commentedon Nov 8, 2025
@bart2 we do display errors, for ones that the ai sdk flags as retryable we do retry but we aren't showing those to u currently and we need to fix that.
Most 5xx errors are provider outages or temporary downtime so we generally can get through on subsequent requests.
This case you've raised does point out that it may be over eager in some cases to retry
We will have better visibility into this soon, thanks for raising the issue!
[-]Errors from the inference engine are not propagated to the user[/-][+]TUI should show when it is retrying[/+]