Parse reasoning text content (#2277)

Sometimes COT is returns as text content instead of `ReasoningText`. We
should parse it but not serialize back on requests.

---------

Co-authored-by: Ahmed Ibrahim <aibrahim@openai.com>
This commit is contained in:
pakrym-oaiandAhmed Ibrahim authored and GitHub committed 2025-08-13 18:39:58 -07:00
1 parent a62510e0ae
commit f1be7978cf
8 files changed
+169 -58

No files matched your search

+1
View File
@@ -1606,6 +1606,7 @@ async fn handle_response_item(
for item in content {
let text = match item {
ReasoningItemContent::ReasoningText { text } => text,
ReasoningItemContent::Text { text } => text,
};
let event = Event {
id: sub_id.to_string(),