feat: add OpenAI Responses API format conversion (api_format = "openai_responses")

Support Anthropic ↔ OpenAI Responses API format conversion alongside existing
Chat Completions conversion. The Responses API uses a flat input/output structure
with lifted function_call/function_call_output items and named SSE lifecycle events.
This commit is contained in:
Jason
2026-03-05 09:30:37 +08:00
parent fb8996d19c
commit a30e2096bb
14 changed files with 1081 additions and 66 deletions
+2 -1
View File
@@ -47,7 +47,8 @@ export interface ProviderPreset {
// Claude API 格式(仅 Claude 供应商使用)
// - "anthropic" (默认): Anthropic Messages API 格式,直接透传
// - "openai_chat": OpenAI Chat Completions 格式,需要格式转换
apiFormat?: "anthropic" | "openai_chat";
// - "openai_responses": OpenAI Responses API 格式,需要格式转换
apiFormat?: "anthropic" | "openai_chat" | "openai_responses";
}
export const providerPresets: ProviderPreset[] = [