@@ -18,13 +18,26 @@ public struct ChatStreamResult: Codable, Equatable, Sendable {
18
18
public let content : String ?
19
19
/// If the audio output modality is requested, this object contains data about the audio response from the model.
20
20
public let audio : ChoiceDeltaAudio ?
21
- /// The reasoning content of the chunk message.
22
- /// Only some model are supported, like DeepSeek-R1.
23
- public let reasoningContent : String ?
21
+
24
22
/// The role of the author of this message.
25
23
public let role : Self . Role ?
26
24
public let toolCalls : [ Self . ChoiceDeltaToolCall ] ?
27
25
26
+ /// Value for `reasoning` field in response.
27
+ ///
28
+ /// Provided by:
29
+ /// - Gemini (in OpenAI compatibility mode)
30
+ /// https://github.com/MacPaw/OpenAI/issues/283#issuecomment-2711396735
31
+ /// - OpenRouter
32
+ public let reasoning : String ?
33
+
34
+ /// Value for `reasoning_content` field.
35
+ ///
36
+ /// Provided by:
37
+ /// - Deepseek
38
+ /// https://api-docs.deepseek.com/api/create-chat-completion#responses
39
+ public let reasoningContent : String ?
40
+
28
41
public struct ChoiceDeltaAudio : Codable , Equatable , Sendable {
29
42
30
43
/// Unique identifier for this audio response.
@@ -85,9 +98,10 @@ public struct ChatStreamResult: Codable, Equatable, Sendable {
85
98
public enum CodingKeys : String , CodingKey {
86
99
case content
87
100
case audio
88
- case reasoningContent = " reasoning_content "
89
101
case role
90
102
case toolCalls = " tool_calls "
103
+ case reasoning = " reasoning "
104
+ case reasoningContent = " reasoning_content "
91
105
}
92
106
}
93
107
0 commit comments