From d93b3b34b38387b1cef6b61fbab82d70126fbd4e Mon Sep 17 00:00:00 2001 From: michaelfeil Date: Tue, 19 Aug 2025 18:29:35 +0000 Subject: [PATCH] baseten branch --- async-openai/src/types/chat.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/async-openai/src/types/chat.rs b/async-openai/src/types/chat.rs index d9373db6..c2b28618 100644 --- a/async-openai/src/types/chat.rs +++ b/async-openai/src/types/chat.rs @@ -436,6 +436,10 @@ pub struct ChatCompletionResponseMessage { #[deprecated] pub function_call: Option, + /// OpenRouter uses reasoning field to return thinking content when reasoning parser is enabled + #[serde(skip_serializing_if = "Option::is_none")] + pub reasoning: Option, + /// If the audio output modality is requested, this object contains data about the audio response from the model. [Learn more](https://platform.openai.com/docs/guides/audio). #[serde(skip_serializing_if = "Option::is_none")] pub audio: Option, @@ -494,6 +498,8 @@ pub enum ResponseFormat { JsonSchema { json_schema: ResponseFormatJsonSchema, }, + /// The type of response format being defined: grammar + Grammar { grammar: String }, } #[derive(Debug, Deserialize, Serialize, Clone, PartialEq)] @@ -1006,6 +1012,10 @@ pub struct ChatCompletionStreamResponseDelta { #[deprecated] pub function_call: Option, + /// OpenRouter uses reasoning field to return thinking content when reasoning parser is enabled + #[serde(skip_serializing_if = "Option::is_none")] + pub reasoning: Option, + pub tool_calls: Option>, /// The role of the author of this message. pub role: Option,