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,