Skip to content

项目对话出现 invalid_encrypted_content,且 HTTP 400 被错误提示为限流 #164

Description

@yuku00

问题概述

继续使用已有的项目对话时,OpenAI Responses 请求返回 HTTP 400:

invalid_encrypted_content: Encrypted content item_id did not match the target item id

程序随后使用相同请求进行了重试,并在界面中错误提示:

  • 请求过于频繁
  • 已触发限流,请稍后再试或降低并发

但实际响应是 HTTP 400,并非表示限流的 HTTP 429。

运行环境

  • 应用:OpenCowork
  • 操作系统:Windows
  • 模型服务商:OpenAI
  • API:Responses API
  • 对话类型:项目中的已有对话
  • 问题发生日期:2026 年 9 月 7 日
  • OpenCowork 版本:[1.4.0]
  • 使用模型:[gpt-5.6 sol]

复现步骤

  1. 打开一个已有项目。
  2. 打开该项目中的已有对话。
  3. 在已有对话中继续发送消息。
  4. 请求失败。
  5. 查看错误详情,发现实际返回的是 HTTP 400 invalid_encrypted_content
  6. 界面却将错误提示为“请求过于频繁/已触发限流”。

该问题可能与项目对话的历史记录恢复、重放或压缩有关。

实际表现

OpenAI Responses API 返回以下错误:

OpenAI Responses request failed HTTP 400: {
  "error": {
    "message": "The encrypted content for item rs_0945bda39ec42911016a9e585870c887d0820fb923a383c9a0 could not be verified. Reason: Encrypted content item_id did not match the target item id.",
    "type": "invalid_request_error",
    "param": null,
    "code": "invalid_encrypted_content"
  }
}

##   预期表现
程序应保持 Responses API reasoning item 原始 id 与 encrypted_content 的正确对应关系。
HTTP 400 invalid_encrypted_content 不应使用相同请求内容直接重试。
HTTP 400 不应被提示为“请求过于频繁”或“已触发限流”。
只有 HTTP 429 才应按照限流错误处理。
如果已有会话状态无法恢复,程序应执行以下一种处理:
跳过损坏的 reasoning item,使用可见的用户和助手消息重建上下文;
创建新的 Responses 响应链,同时保留用户刚刚发送的消息;
明确提示“当前对话状态损坏,请新建对话”,而不是提示限流。

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions