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-oai
2025-08-13 18:39:58 -07:00
committed by GitHub
parent a62510e0ae
commit f1be7978cf
8 changed files with 169 additions and 58 deletions

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(),