Skip to content

anthropic的v1/messages接口,开启思考,返回SSE数据格式不标准 #2020

Closed

Description

@Inblac

例行检查

  • 我已确认目前没有类似 issue
  • 我已确认我已升级到最新版本
  • 我已完整查看过项目 README,尤其是常见问题部分
  • 我理解并愿意跟进此 issue,协助测试和提供反馈
  • 我理解并认可上述内容,并理解项目维护者精力有限,不遵循规则的 issue 可能会被无视或直接关闭

问题描述

V1.6.3版本

anthropic格式, v1/messages接口,流式,开启thinking时,content_block_start事件返回的data与官方标准不一致,导致cherrystudio解析报错。

具体为:content_block中缺少了"thinking": ""部分。

当前返回:

event: content_block_start
data: {"type":"content_block_start","index":0,"content_block":{"type":"thinking"}}

官方文档格式:

event: content_block_start
data: {"type": "content_block_start", "index": 0, "content_block": {"type": "thinking", "thinking": ""}}

文档连接

复现步骤
渠道为anthropic格式的GLM-4.6,调用时查看返回数据可复现

预期结果
v1/messages接口返回格式与anthropic官方一致。

Activity

  1. added
    bug
    on Oct 11, 2025
  2. Inblac commented on Oct 13, 2025

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions