Skip to content

[Bug] agent添加mcp,调用对话API 报错 #4846

Description

@melinyang

Contact Information

No response

MaxKB Version

v2.6.1

Problem Description

请求参数:
{
"message": "今天天气温度是多少",
"stream": false,
"re_chat": true,
"chat_record_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"node_id": "string",
"runtime_node_id": "string",
"node_data": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"form_data": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"image_list": [
"string"
],
"document_list": [
"string"
],
"audio_list": [
"string"
],
"other_list": [
"string"
],
"child_node": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
}
请求响应:
{
"code": 500,
"message": "成功",
"data": {
"chat_id": "019cc244-68f3-7711-9bbe-ca144306a098",
"id": "019cc274-32eb-7cd1-9564-afdd5a6931ee",
"operate": true,
"content": "Exception:'generator' object has no attribute 'content'",
"is_end": true,
"completion_tokens": 0,
"prompt_tokens": 0
}
}
maxkb.log 日志报错
2026-03-06 17:05:04 [log ERROR] Internal Server Error: /chat/api/chat_message/019cc244-68f3-7711-9bbe-ca144306a098

Steps to Reproduce

添加了mcp 就会报错,不添加是可以的

The expected correct result

No response

Related log output

Additional Information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions