Skip to content

agent 类模型(multi-agent / expert-4-agent / heavy-16-agent)web_search 返回 content 为空 #42

@shallmas

Description

@shallmas

环境

  • 版本:git+https://github.com/GuDaStudio/GrokSearch@grok-with-tavily
  • 中转:https://ai.huan666.de/v1/v1/models 正常返回 18 个模型,含本 issue 涉及的 agent 类)
  • OS:Windows 11,Python/uv 启动

现象

切到以下模型后,web_search 返回 content: ""sources_count: 0

  • grok-4.20-multi-agent
  • grok-4.20-expert-4-agent
  • grok-4.20-heavy-16-agent

grok-4.20-reasoninggrok-4.20-0309 同样的 query 能正常返回。

定位

直接 POST 上游 /v1/responses 对比两种模型的原始响应,上游其实都有返回内容,只是结构不同:

grok-4.20-reasoning(MCP 能取到)

"output": [
  { "type": "reasoning", "summary": [...] },
  { "type": "message",   "content": [{ "type": "output_text", "text": "Paris..." }] }
]

grok-4.20-multi-agent / heavy-16-agent(MCP 返回空)

"output": [
  { "type": "message", "content": [{ "type": "output_text", "text": "Paris..." }] }
]

区别在于 agent 类响应没有 reasoningmessage 出现在 output[0],而 reasoning 模型里它在 output[1]。推测当前解析器是按固定下标 / 固定 "reasoning + message" 组合取文本,遇到只有 message 的结构就拿不到内容。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions