AstrBot icon indicating copy to clipboard operation
AstrBot copied to clipboard

[Bug] deepseek模型配置opencode go测试模型能否通讯报错400,astrbot版本v4.28.0

Open hjy-2004 opened this issue 2 months ago • 5 comments

问题描述

Error code: 400 - {'type': 'error', 'error': {'type': 'MissingSessionID', 'message': 'Error from provider (Console Go): Request is missing x-opencode-session and cannot be routed efficiently. Please see https://opencode.ai/docs/go/#where-can-i-use-it'}}

如何复现?

Image

AstrBot 版本

v4.28.0

操作系统

Linux

部署方式

docker

使用的消息平台适配器

onebot11

错误日志

重启后暂无日志,仅loading弹窗显示错误日志

辅助信息

No response

检查清单

  • [x] 我已在 Issue 列表中搜索过相关问题仍无法解决,或该问题从未被报告过。
  • [x] 我已尝试过禁用所有插件,排除了可能是因插件导致的问题。
  • [x] 我报告的问题与 AstrBot 本体相关,而非在报告某一插件的问题。
  • [x] 我已阅读并同意本项目的贡献者行为准则。
  • [ ] (可选)我愿意提交 PR 以帮助修复该问题。

hjy-2004 avatar Sep 11 '26 10:09 hjy-2004

opencode go 接下来需要携带 x-opencode-session 请求头

xiaopi668 avatar Sep 11 '26 12:09 xiaopi668

自定义请求头添加x-opencode-session

LovelyToaster avatar Sep 11 '26 14:09 LovelyToaster

自定义请求头 x-opencode-session astrbot

Zyw052 avatar Sep 11 '26 22:09 Zyw052

I will take this issue. Please assign it to me.

The error message indicates a missing x-opencode-session header. I will first check the code where requests to the provider are made, likely in the communication module. The fix may involve ensuring this header is included in all requests. I will verify the solution by testing the communication with the provider after adding the header.

Kaustubh1235 avatar Sep 12 '26 07:09 Kaustubh1235

本 issue 的根因是缺少 x-opencode-session 请求头,已由 #10054 统一追踪并有人认领修复。关闭本 issue 以避免重复。

The root cause is the missing x-opencode-session request header, which is already tracked and being worked on in #10054. Closing as a duplicate.

anka-afk avatar Oct 14 '26 08:10 anka-afk