TUI should show when it is retrying #2699

Open
opened 2026-02-16 17:36:52 -05:00 by yindo · 2 comments
Owner

Originally created by @bart2 on GitHub (Nov 8, 2025).

Originally assigned to: @thdxr on GitHub.

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

Originally created by @bart2 on GitHub (Nov 8, 2025). Originally assigned to: @thdxr on GitHub. ### 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
yindo added the opentuibug labels 2026-02-16 17:36:52 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 8, 2025):

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

  • #1890: Very similar issue with llama.cpp and OpenCode - specifically discusses 500 errors from llama.cpp with the exact same error message 'tools param requires --jinja flag' not being properly displayed to users
  • #2455: General issue about improved handling and reporting for errors/LLM inference failed - discusses the need for better error propagation and display
  • #777: Issue about no errors when usage limits are reached (Claude Pro) - related to general error visibility problem

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Nov 8, 2025): This issue might be a duplicate of existing issues. Please check: - #1890: Very similar issue with llama.cpp and OpenCode - specifically discusses 500 errors from llama.cpp with the exact same error message 'tools param requires --jinja flag' not being properly displayed to users - #2455: General issue about improved handling and reporting for errors/LLM inference failed - discusses the need for better error propagation and display - #777: Issue about no errors when usage limits are reached (Claude Pro) - related to general error visibility problem Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (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!

@rekram1-node commented on GitHub (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!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2699