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
+1 -1
View File
@@ -210,7 +210,7 @@ fn convert_message_to_openai(
}
/// 清理 JSON schema(移除不支持的 format
fn clean_schema(mut schema: Value) -> Value {
pub fn clean_schema(mut schema: Value) -> Value {
if let Some(obj) = schema.as_object_mut() {
// 移除 "format": "uri"
if obj.get("format").and_then(|v| v.as_str()) == Some("uri") {