feat: enhance OpenAI Responses API handling by stripping unsupported tool fields and improving error handling for routing conversion

This commit is contained in:
Musa 2026-02-25 10:18:38 -08:00
parent fe43cf5ecb
commit eed196bc81
No known key found for this signature in database
2 changed files with 50 additions and 5 deletions

View file

@ -137,6 +137,8 @@ pub enum InputItem {
call_id: String,
output: String,
},
/// Unknown input item type (forward-compatible passthrough)
Unknown(serde_json::Value),
}
/// Input message with role and content
@ -285,7 +287,9 @@ pub enum Tool {
filters: Option<serde_json::Value>,
},
/// Web search tool
#[serde(alias = "web_search")]
WebSearchPreview {
#[serde(skip_serializing_if = "Option::is_none")]
domains: Option<Vec<String>>,
search_context_size: Option<String>,
user_location: Option<UserLocation>,