干点正事不行?新版变成要token了。 每次restart 这token都变的。 你已经写死了本地了。还加token几个意思?
没事找事做。浪费我5分钟。顺手撸了篇记录。
This turn failed400: {"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"}
這是 opencode 端的問題,但 dsh 的適配較慢,需要自行處理。
其他 agent,諸如 hermes 只需要升級到最新版就能解決。
nano .dsh/settings.yaml ... llm-pi-ai: providers: opencode-go: apiKeyEnv: OPENCODE_GO_API_KEY headers: x-opencode-session: dsh-opencode-go-session ...
systemctl restart dsh
順便一提,dsh 升級到最新版不光沒法解決 400 問題,還帶來一個新問題,就是 web 端訪問需要 token 了。這是一個可變 token,每次 restart 都會更改。
# 在啓動日志中查詢 journalctl -u dsh -n 50 --no-pager | grep -iE 'http://127' ... dsh web: http://127.0.0.1:3080/?token=5L5LHlqoSchHZyU53aLajJq9MGlEV-rDDH3uTuOXbzw
🤣🤣🤣大烧货
你才发现
哪里的大烧货(bushi) ^-^
@祈雪于凛冬 #1 收下了,已经在欣赏dsh了。