Skip to content

fix(provider): normalize OpenAI Responses compatibility handling#627

Merged
fawney19 merged 2 commits into
fawney19:mainfrom
zhefox:main
Jun 7, 2026
Merged

fix(provider): normalize OpenAI Responses compatibility handling#627
fawney19 merged 2 commits into
fawney19:mainfrom
zhefox:main

Conversation

@zhefox
Copy link
Copy Markdown
Contributor

@zhefox zhefox commented Jun 4, 2026

概要

  • 规范化 OpenAI Responses 响应对象,补齐新版协议需要的 outputoutput_text、时间戳、完成状态和 usage 兼容结构。
  • 扩展 OpenAI Responses 流式事件兼容,支持 response.doneresponse.reasoning_text.*response.refusal.*response.output_text.annotation.added 等新版官方事件。
  • 保持同族 OpenAI Responses 流的透传能力,同时在终端响应对象上做兼容性规范化。
  • 从最终发送给 OpenAI Responses provider 的请求体中移除不受支持的 input[].content[].cache_control,同时保留 Codex 专用的 prompt cache key 派生逻辑。
  • 增加 Responses 同步构建、流式聚合、拒答/推理/annotation 事件、请求 cache-control 清理和 Codex cache anchor 行为的回归测试。

测试

  • cargo fmt -p aether-ai-formats
  • cargo test -p aether-ai-formats

@fawney19 fawney19 merged commit ebd5924 into fawney19:main Jun 7, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants