feat: Improved support for Anthropic's extended thinking

This commit is contained in:
2026-07-17 17:26:41 -06:00
parent 078e6e3744
commit 8629c1ca15
9 changed files with 121 additions and 24 deletions
+2 -2
View File
@@ -533,7 +533,7 @@ pub fn openai_extract_chat_completions(data: &Value) -> Result<ChatCompletionsOu
} else {
text.to_string()
};
let output = ChatCompletionsOutput { text, tool_calls };
let output = ChatCompletionsOutput { text, tool_calls, ..Default::default() };
Ok(output)
}
@@ -696,7 +696,7 @@ pub fn openai_extract_responses(data: &Value) -> Result<ChatCompletionsOutput> {
if text.is_empty() && tool_calls.is_empty() {
bail!("Invalid response data: {data}");
}
Ok(ChatCompletionsOutput { text, tool_calls })
Ok(ChatCompletionsOutput { text, tool_calls, ..Default::default() })
}
pub async fn openai_responses_streaming(