feat: 支持 OpenAI Responses API (/v1/responses) 渠道类型#91
Open
zhangzhenfei wants to merge 1 commit intoErlichLiu:mainfrom
Open
feat: 支持 OpenAI Responses API (/v1/responses) 渠道类型#91zhangzhenfei wants to merge 1 commit intoErlichLiu:mainfrom
zhangzhenfei wants to merge 1 commit intoErlichLiu:mainfrom
Conversation
新增 openai-responses Provider,接入 OpenAI 于 2025 年发布的新版 Responses API,与现有 Chat Completions 渠道并存、互不影响。 核心变更: - 新增 ResponsesAdapter(packages/core):处理 /v1/responses 端点的 请求构建与 SSE 解析,支持文本流、推理内容、工具调用三种事件类型 - 请求格式差异:input 替代 messages,instructions 替代 system role, 工具定义采用扁平结构(无嵌套 function 对象) - 工具续接:使用 function_call + function_call_output 输入项, 通过 metadata.call_id 保留 call_id 供回传匹配 - shared 类型扩展:ProviderType 联合类型、默认 URL、显示名称 - channel-manager:三处 switch 新增 case 'openai-responses' - ChannelForm UI:供应商选项与端点预览均已支持 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
openai-responsesProvider 类型,支持 OpenAI Responses API (/v1/responses) 端点ResponsesAdapter,处理 Responses API 特有的消息格式、SSE 事件解析、工具调用续接input(非字符串),兼容各类中转站变更文件
packages/core/src/providers/responses-adapter.ts— 新增 Responses API 适配器packages/core/src/providers/index.ts— 注册openai-responses适配器packages/shared/src/types/channel.ts— 新增openai-responsesProvider 类型apps/electron/src/main/lib/channel-manager.ts— 支持openai-responses渠道连接测试apps/electron/src/renderer/components/settings/ChannelForm.tsx— 渠道表单展示支持Test plan
openai-responses类型渠道,配置 API Key 和 Base URL🤖 Generated with Claude Code