fixed reasoning failures (#634)

* fixed reasoning failures

* adding debugging

* made several fixes for transmission isses for SSeEvents, incomplete handling of json types by anthropic, and wrote a bunch of tests

* removed debugging from supervisord.conf

---------

Co-authored-by: Salman Paracha <salmanparacha@MacBook-Pro-342.local>
This commit is contained in:
Salman Paracha 2025-12-18 11:02:59 -08:00 committed by GitHub
parent 2f9121407b
commit 48bbc7cce7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 360 additions and 68 deletions

View file

@ -189,7 +189,10 @@ impl TryFrom<ChatCompletionsResponse> for ResponsesAPIResponse {
top_p: 1.0,
metadata: resp.metadata.unwrap_or_default(),
truncation: None,
reasoning: None,
reasoning: Some(crate::apis::openai_responses::Reasoning {
effort: None,
summary: None,
}),
store: None,
text: None,
audio: None,

View file

@ -364,6 +364,23 @@ fn convert_content_delta(
None,
None,
)),
MessagesContentDelta::SignatureDelta { signature: _ } => {
// Signature delta is cryptographic verification metadata, not content
// Create an empty delta chunk to maintain stream continuity
Ok(create_openai_chunk(
"stream",
"unknown",
MessageDelta {
role: None,
content: None,
refusal: None,
function_call: None,
tool_calls: None,
},
None,
None,
))
}
}
}