SiYuan AI agent context canceled

Hello everyone,

I'm just trying out the new AI assistant features and I've immediately ran into a problem.

I'm using DeepSeek v4 Flash Free from OpenCode Zen (and have also tried Xiaomi Mimo 2.5 Free from the same provider), I've tried giving it a long-running task, and I've noticed that it's very easy for the agent to crash. Looking at the errors in the logs, I see these two types of errors:

  • E 2026/07/03 12:30:34 agent.go:477: agent API request failed: Post "https://opencode.ai/zen/v1/chat/completions": context canceled
  • E 2026/07/03 12:40:59 agent.go:493: agent stream error: context canceled

The first error happens right after I start the chat, the second happens when the response is taking long (for example, long LLM reasoning). I have noticed the second error often comes at around 60s of thinking, but often less.

This is not a problem with the API provider, I'm using it on VSCode with Cline and have not had any problem at all, even right after testing SiYuan.

Here is my configuration:

image.png

image.png

I don't have any custom MCP enabled or notes indexing.

While I'm at it, I will also report a few other minor issues:

  • Some strings have not been translated to English: 智能体 MCP 服务, 嵌入模型
  • We're missing the feature to edit our last message in the AI conversation and re-generate the answer
  • If an error occurs in the answer generation, such as those I have reported above, SiYuan shows the error message The network is abnormal, please try again later. This is okay, however, when this happens, the message does not have a "retry" button, which would be very useful!

I know this is an early access feature, so it's okay to see a few errors. I like this new version a lot, and I hope that with time, the SiYuan team will be able to iron these wrinkles.

Please let me know if I should set something differently in the AI settings, or if it's a known bug. Thank you!

    Welcome to here!

    Here we can learn from each other how to use SiYuan, give feedback and suggestions, and build SiYuan together.

    Signup About
    Please input reply content ...
    • massivebox
      PRO Author

      I can confirm that the "context canceled" errors still persist on v3.7.2 unfortunately. I also tried with other models on OpenRouter to ensure it wasn't an API error.

      If you need any other info to diagnose the problem, please let me know and I will share. Thanks for your work!

      1 Reply
    • MiscReply
    • massivebox
      PRO Author

      Here it is, thank you! You will find the errors at the bottom of siyuan.log, unfortunately they are not very verbose.

      systemlog.zip

      1 Reply
    • 88250 1

      Thank you for the feedback. Please check again after the next version is released. Thanks.

      1 Reply
    • 88250 1

      In the next release, we will continue to improve the timeout implementation and add a Stream Idle Timeout parameter. If convenient, you can build from the dev branch to participate in testing, or wait until we release v3.7.3-alpha.1. Thank you.

    • Visit all replies