Skip to content

在 openai2 转换器中添加 developer → system 的 role 映射#135

Merged
lich0821 merged 1 commit into
lich0821:masterfrom
randomjzy:master
May 31, 2026
Merged

在 openai2 转换器中添加 developer → system 的 role 映射#135
lich0821 merged 1 commit into
lich0821:masterfrom
randomjzy:master

Conversation

@randomjzy

Copy link
Copy Markdown
Contributor

OpenAI Responses API 支持 developer 角色(用于 o1 等模型),但 Chat Completions API 不支持该角色。当客户端通过 Responses 接口发送 role: "developer" 的消息时,原代码原样传递给 Chat API 后端导致报错。

修改内容:在 OpenAI2ReqToOpenAI 函数的 "message" 分支中,将 "developer" 自动映射为 "system"。

@lich0821 lich0821 merged commit 55ef48c into lich0821:master May 31, 2026
6 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