Clawith icon indicating copy to clipboard operation
Clawith copied to clipboard

使用飞书给机器人发送消息无法处理

Open dongxingshui opened this issue 8 months ago • 4 comments

Pre-checks

Deployment Method

Source (setup.sh)

Steps to Reproduce

  1. 在飞书客户端给机器人发送消息
  2. 机器人返回[LLM Error] HTTP 400: {"error":{"code":"1214","message":"角色信息不正确"}}
  3. 后台显示:[Feishu] Sender resolve: code=0, msg=success [Feishu] Resolved sender: (user_id=)

Expected vs Actual Behavior

non

Logs / Screenshots

No response

dongxingshui avatar Mar 19 '26 01:03 dongxingshui

飞书 sender 解析为空 → 可能缺少 contact:user.base:readonly 权限 LLM 错误 1214 → 不是 OpenAI/Anthropic 的错误,是国产模型的 role 格式问题,根因是空用户导致消息构造异常 请用户补充:用的什么模型、飞书权限截图、完整后端日志

wisdomqin avatar Mar 19 '26 15:03 wisdomqin

Thanks for reporting! Based on the logs, there are two separate issues:

1. Feishu sender resolution returns empty user

The Feishu API returned code=0 (success) but the user info is empty. This usually means the Feishu app is missing the contact:user.base:readonly permission scope. Please check your Feishu Developer Console -> App -> Permissions, and confirm this scope is enabled and approved.

2. LLM error code 1214

This error format (code 1214) is not from OpenAI or Anthropic — it looks like a Chinese LLM provider (e.g. Qwen/Tongyi, Zhipu, Baichuan). The "invalid role" error is likely caused by the empty sender info from issue 1.

Could you provide the following to help us debug:

  1. Which LLM provider and model are you using for this agent?
  2. Feishu app permission list screenshot from the Developer Console
  3. Full backend logs with Feishu-related entries

wisdomqin avatar Mar 20 '26 02:03 wisdomqin

飞书客户端可以建立群进行聊天吗?

piaoxj avatar Mar 20 '26 08:03 piaoxj

飞书客户端可以建立群进行聊天吗?

正在考虑。目前还是P2P的。但是你可以在群里加入 bot。@ bot

yaojin3616 avatar Mar 22 '26 12:03 yaojin3616