@hebo-ai/gateway 0.5.2 → 0.6.0-rc0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/README.md +32 -1
  2. package/package.json +17 -12
  3. package/src/endpoints/chat-completions/converters.test.ts +85 -1
  4. package/src/endpoints/chat-completions/converters.ts +139 -18
  5. package/src/endpoints/chat-completions/handler.test.ts +2 -0
  6. package/src/endpoints/chat-completions/index.ts +1 -0
  7. package/src/endpoints/chat-completions/otel.ts +1 -0
  8. package/src/endpoints/chat-completions/schema.ts +38 -4
  9. package/src/endpoints/embeddings/index.ts +1 -0
  10. package/src/lifecycle.ts +2 -2
  11. package/src/models/anthropic/middleware.test.ts +45 -1
  12. package/src/models/anthropic/middleware.ts +21 -1
  13. package/src/models/google/middleware.test.ts +30 -1
  14. package/src/models/google/middleware.ts +20 -1
  15. package/src/models/openai/middleware.test.ts +32 -1
  16. package/src/models/openai/middleware.ts +25 -1
  17. package/src/providers/bedrock/middleware.test.ts +121 -1
  18. package/src/providers/bedrock/middleware.ts +61 -1
  19. package/src/telemetry/fetch.ts +31 -4
  20. package/src/telemetry/index.ts +1 -0
  21. package/dist/config.d.ts +0 -2
  22. package/dist/config.js +0 -81
  23. package/dist/endpoints/chat-completions/converters.d.ts +0 -43
  24. package/dist/endpoints/chat-completions/converters.js +0 -551
  25. package/dist/endpoints/chat-completions/handler.d.ts +0 -2
  26. package/dist/endpoints/chat-completions/handler.js +0 -145
  27. package/dist/endpoints/chat-completions/index.d.ts +0 -3
  28. package/dist/endpoints/chat-completions/index.js +0 -3
  29. package/dist/endpoints/chat-completions/otel.d.ts +0 -6
  30. package/dist/endpoints/chat-completions/otel.js +0 -134
  31. package/dist/endpoints/chat-completions/schema.d.ts +0 -946
  32. package/dist/endpoints/chat-completions/schema.js +0 -257
  33. package/dist/endpoints/embeddings/converters.d.ts +0 -10
  34. package/dist/endpoints/embeddings/converters.js +0 -31
  35. package/dist/endpoints/embeddings/handler.d.ts +0 -2
  36. package/dist/endpoints/embeddings/handler.js +0 -101
  37. package/dist/endpoints/embeddings/index.d.ts +0 -3
  38. package/dist/endpoints/embeddings/index.js +0 -3
  39. package/dist/endpoints/embeddings/otel.d.ts +0 -6
  40. package/dist/endpoints/embeddings/otel.js +0 -35
  41. package/dist/endpoints/embeddings/schema.d.ts +0 -38
  42. package/dist/endpoints/embeddings/schema.js +0 -26
  43. package/dist/endpoints/models/converters.d.ts +0 -6
  44. package/dist/endpoints/models/converters.js +0 -42
  45. package/dist/endpoints/models/handler.d.ts +0 -2
  46. package/dist/endpoints/models/handler.js +0 -29
  47. package/dist/endpoints/models/index.d.ts +0 -3
  48. package/dist/endpoints/models/index.js +0 -3
  49. package/dist/endpoints/models/schema.d.ts +0 -42
  50. package/dist/endpoints/models/schema.js +0 -31
  51. package/dist/errors/ai-sdk.d.ts +0 -2
  52. package/dist/errors/ai-sdk.js +0 -52
  53. package/dist/errors/gateway.d.ts +0 -5
  54. package/dist/errors/gateway.js +0 -13
  55. package/dist/errors/openai.d.ts +0 -20
  56. package/dist/errors/openai.js +0 -40
  57. package/dist/errors/utils.d.ts +0 -22
  58. package/dist/errors/utils.js +0 -44
  59. package/dist/gateway.d.ts +0 -9
  60. package/dist/gateway.js +0 -34
  61. package/dist/index.d.ts +0 -14
  62. package/dist/index.js +0 -13
  63. package/dist/lifecycle.d.ts +0 -2
  64. package/dist/lifecycle.js +0 -94
  65. package/dist/logger/default.d.ts +0 -4
  66. package/dist/logger/default.js +0 -81
  67. package/dist/logger/index.d.ts +0 -14
  68. package/dist/logger/index.js +0 -25
  69. package/dist/middleware/common.d.ts +0 -12
  70. package/dist/middleware/common.js +0 -145
  71. package/dist/middleware/matcher.d.ts +0 -27
  72. package/dist/middleware/matcher.js +0 -112
  73. package/dist/middleware/utils.d.ts +0 -2
  74. package/dist/middleware/utils.js +0 -27
  75. package/dist/models/amazon/index.d.ts +0 -2
  76. package/dist/models/amazon/index.js +0 -2
  77. package/dist/models/amazon/middleware.d.ts +0 -3
  78. package/dist/models/amazon/middleware.js +0 -65
  79. package/dist/models/amazon/presets.d.ts +0 -2390
  80. package/dist/models/amazon/presets.js +0 -80
  81. package/dist/models/anthropic/index.d.ts +0 -2
  82. package/dist/models/anthropic/index.js +0 -2
  83. package/dist/models/anthropic/middleware.d.ts +0 -4
  84. package/dist/models/anthropic/middleware.js +0 -111
  85. package/dist/models/anthropic/presets.d.ts +0 -4802
  86. package/dist/models/anthropic/presets.js +0 -135
  87. package/dist/models/catalog.d.ts +0 -4
  88. package/dist/models/catalog.js +0 -4
  89. package/dist/models/cohere/index.d.ts +0 -2
  90. package/dist/models/cohere/index.js +0 -2
  91. package/dist/models/cohere/middleware.d.ts +0 -3
  92. package/dist/models/cohere/middleware.js +0 -60
  93. package/dist/models/cohere/presets.d.ts +0 -2918
  94. package/dist/models/cohere/presets.js +0 -134
  95. package/dist/models/google/index.d.ts +0 -2
  96. package/dist/models/google/index.js +0 -2
  97. package/dist/models/google/middleware.d.ts +0 -7
  98. package/dist/models/google/middleware.js +0 -103
  99. package/dist/models/google/presets.d.ts +0 -2553
  100. package/dist/models/google/presets.js +0 -83
  101. package/dist/models/meta/index.d.ts +0 -1
  102. package/dist/models/meta/index.js +0 -1
  103. package/dist/models/meta/presets.d.ts +0 -3254
  104. package/dist/models/meta/presets.js +0 -95
  105. package/dist/models/openai/index.d.ts +0 -2
  106. package/dist/models/openai/index.js +0 -2
  107. package/dist/models/openai/middleware.d.ts +0 -3
  108. package/dist/models/openai/middleware.js +0 -62
  109. package/dist/models/openai/presets.d.ts +0 -6634
  110. package/dist/models/openai/presets.js +0 -213
  111. package/dist/models/types.d.ts +0 -20
  112. package/dist/models/types.js +0 -84
  113. package/dist/models/voyage/index.d.ts +0 -2
  114. package/dist/models/voyage/index.js +0 -2
  115. package/dist/models/voyage/middleware.d.ts +0 -2
  116. package/dist/models/voyage/middleware.js +0 -18
  117. package/dist/models/voyage/presets.d.ts +0 -3471
  118. package/dist/models/voyage/presets.js +0 -85
  119. package/dist/providers/anthropic/canonical.d.ts +0 -3
  120. package/dist/providers/anthropic/canonical.js +0 -9
  121. package/dist/providers/anthropic/index.d.ts +0 -1
  122. package/dist/providers/anthropic/index.js +0 -1
  123. package/dist/providers/bedrock/canonical.d.ts +0 -17
  124. package/dist/providers/bedrock/canonical.js +0 -61
  125. package/dist/providers/bedrock/index.d.ts +0 -2
  126. package/dist/providers/bedrock/index.js +0 -2
  127. package/dist/providers/bedrock/middleware.d.ts +0 -3
  128. package/dist/providers/bedrock/middleware.js +0 -55
  129. package/dist/providers/cohere/canonical.d.ts +0 -3
  130. package/dist/providers/cohere/canonical.js +0 -17
  131. package/dist/providers/cohere/index.d.ts +0 -1
  132. package/dist/providers/cohere/index.js +0 -1
  133. package/dist/providers/groq/canonical.d.ts +0 -3
  134. package/dist/providers/groq/canonical.js +0 -12
  135. package/dist/providers/groq/index.d.ts +0 -1
  136. package/dist/providers/groq/index.js +0 -1
  137. package/dist/providers/openai/canonical.d.ts +0 -3
  138. package/dist/providers/openai/canonical.js +0 -8
  139. package/dist/providers/openai/index.d.ts +0 -1
  140. package/dist/providers/openai/index.js +0 -1
  141. package/dist/providers/registry.d.ts +0 -24
  142. package/dist/providers/registry.js +0 -100
  143. package/dist/providers/types.d.ts +0 -7
  144. package/dist/providers/types.js +0 -11
  145. package/dist/providers/vertex/canonical.d.ts +0 -3
  146. package/dist/providers/vertex/canonical.js +0 -8
  147. package/dist/providers/vertex/index.d.ts +0 -1
  148. package/dist/providers/vertex/index.js +0 -1
  149. package/dist/providers/voyage/canonical.d.ts +0 -3
  150. package/dist/providers/voyage/canonical.js +0 -7
  151. package/dist/providers/voyage/index.d.ts +0 -1
  152. package/dist/providers/voyage/index.js +0 -1
  153. package/dist/telemetry/ai-sdk.d.ts +0 -2
  154. package/dist/telemetry/ai-sdk.js +0 -31
  155. package/dist/telemetry/baggage.d.ts +0 -1
  156. package/dist/telemetry/baggage.js +0 -24
  157. package/dist/telemetry/fetch.d.ts +0 -2
  158. package/dist/telemetry/fetch.js +0 -24
  159. package/dist/telemetry/gen-ai.d.ts +0 -5
  160. package/dist/telemetry/gen-ai.js +0 -60
  161. package/dist/telemetry/http.d.ts +0 -3
  162. package/dist/telemetry/http.js +0 -54
  163. package/dist/telemetry/memory.d.ts +0 -2
  164. package/dist/telemetry/memory.js +0 -27
  165. package/dist/telemetry/span.d.ts +0 -13
  166. package/dist/telemetry/span.js +0 -60
  167. package/dist/telemetry/stream.d.ts +0 -3
  168. package/dist/telemetry/stream.js +0 -51
  169. package/dist/types.d.ts +0 -176
  170. package/dist/types.js +0 -1
  171. package/dist/utils/env.d.ts +0 -2
  172. package/dist/utils/env.js +0 -5
  173. package/dist/utils/headers.d.ts +0 -4
  174. package/dist/utils/headers.js +0 -22
  175. package/dist/utils/preset.d.ts +0 -9
  176. package/dist/utils/preset.js +0 -41
  177. package/dist/utils/request.d.ts +0 -2
  178. package/dist/utils/request.js +0 -14
  179. package/dist/utils/response.d.ts +0 -3
  180. package/dist/utils/response.js +0 -68
@@ -1,946 +0,0 @@
1
- import * as z from "zod";
2
- export declare const ChatCompletionsContentPartTextSchema: z.ZodObject<{
3
- type: z.ZodLiteral<"text">;
4
- text: z.ZodString;
5
- }, z.core.$strip>;
6
- export type ChatCompletionsContentPartText = z.infer<typeof ChatCompletionsContentPartTextSchema>;
7
- export declare const ChatCompletionsContentPartImageSchema: z.ZodObject<{
8
- type: z.ZodLiteral<"image_url">;
9
- image_url: z.ZodObject<{
10
- url: z.ZodString;
11
- detail: z.ZodOptional<z.ZodEnum<{
12
- low: "low";
13
- high: "high";
14
- auto: "auto";
15
- }>>;
16
- }, z.core.$strip>;
17
- }, z.core.$strip>;
18
- export declare const ChatCompletionsContentPartFileSchema: z.ZodObject<{
19
- type: z.ZodLiteral<"file">;
20
- file: z.ZodObject<{
21
- data: z.ZodString;
22
- media_type: z.ZodString;
23
- filename: z.ZodOptional<z.ZodString>;
24
- }, z.core.$strip>;
25
- }, z.core.$strip>;
26
- export declare const ChatCompletionsContentPartAudioSchema: z.ZodObject<{
27
- type: z.ZodLiteral<"input_audio">;
28
- input_audio: z.ZodObject<{
29
- data: z.ZodString;
30
- format: z.ZodEnum<{
31
- "x-aac": "x-aac";
32
- flac: "flac";
33
- mp3: "mp3";
34
- m4a: "m4a";
35
- mpeg: "mpeg";
36
- mpga: "mpga";
37
- mp4: "mp4";
38
- ogg: "ogg";
39
- pcm: "pcm";
40
- wav: "wav";
41
- webm: "webm";
42
- }>;
43
- }, z.core.$strip>;
44
- }, z.core.$strip>;
45
- export declare const ChatCompletionsContentPartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
46
- type: z.ZodLiteral<"text">;
47
- text: z.ZodString;
48
- }, z.core.$strip>, z.ZodObject<{
49
- type: z.ZodLiteral<"image_url">;
50
- image_url: z.ZodObject<{
51
- url: z.ZodString;
52
- detail: z.ZodOptional<z.ZodEnum<{
53
- low: "low";
54
- high: "high";
55
- auto: "auto";
56
- }>>;
57
- }, z.core.$strip>;
58
- }, z.core.$strip>, z.ZodObject<{
59
- type: z.ZodLiteral<"file">;
60
- file: z.ZodObject<{
61
- data: z.ZodString;
62
- media_type: z.ZodString;
63
- filename: z.ZodOptional<z.ZodString>;
64
- }, z.core.$strip>;
65
- }, z.core.$strip>, z.ZodObject<{
66
- type: z.ZodLiteral<"input_audio">;
67
- input_audio: z.ZodObject<{
68
- data: z.ZodString;
69
- format: z.ZodEnum<{
70
- "x-aac": "x-aac";
71
- flac: "flac";
72
- mp3: "mp3";
73
- m4a: "m4a";
74
- mpeg: "mpeg";
75
- mpga: "mpga";
76
- mp4: "mp4";
77
- ogg: "ogg";
78
- pcm: "pcm";
79
- wav: "wav";
80
- webm: "webm";
81
- }>;
82
- }, z.core.$strip>;
83
- }, z.core.$strip>], "type">;
84
- export type ChatCompletionsContentPart = z.infer<typeof ChatCompletionsContentPartSchema>;
85
- export declare const ChatCompletionsToolCallSchema: z.ZodObject<{
86
- type: z.ZodLiteral<"function">;
87
- id: z.ZodString;
88
- function: z.ZodObject<{
89
- arguments: z.ZodString;
90
- name: z.ZodString;
91
- }, z.core.$strip>;
92
- extra_content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
93
- }, z.core.$strip>;
94
- export type ChatCompletionsToolCall = z.infer<typeof ChatCompletionsToolCallSchema>;
95
- export declare const ChatCompletionsSystemMessageSchema: z.ZodObject<{
96
- role: z.ZodLiteral<"system">;
97
- content: z.ZodString;
98
- name: z.ZodOptional<z.ZodString>;
99
- }, z.core.$strip>;
100
- export type ChatCompletionsSystemMessage = z.infer<typeof ChatCompletionsSystemMessageSchema>;
101
- export declare const ChatCompletionsUserMessageSchema: z.ZodObject<{
102
- role: z.ZodLiteral<"user">;
103
- content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
104
- type: z.ZodLiteral<"text">;
105
- text: z.ZodString;
106
- }, z.core.$strip>, z.ZodObject<{
107
- type: z.ZodLiteral<"image_url">;
108
- image_url: z.ZodObject<{
109
- url: z.ZodString;
110
- detail: z.ZodOptional<z.ZodEnum<{
111
- low: "low";
112
- high: "high";
113
- auto: "auto";
114
- }>>;
115
- }, z.core.$strip>;
116
- }, z.core.$strip>, z.ZodObject<{
117
- type: z.ZodLiteral<"file">;
118
- file: z.ZodObject<{
119
- data: z.ZodString;
120
- media_type: z.ZodString;
121
- filename: z.ZodOptional<z.ZodString>;
122
- }, z.core.$strip>;
123
- }, z.core.$strip>, z.ZodObject<{
124
- type: z.ZodLiteral<"input_audio">;
125
- input_audio: z.ZodObject<{
126
- data: z.ZodString;
127
- format: z.ZodEnum<{
128
- "x-aac": "x-aac";
129
- flac: "flac";
130
- mp3: "mp3";
131
- m4a: "m4a";
132
- mpeg: "mpeg";
133
- mpga: "mpga";
134
- mp4: "mp4";
135
- ogg: "ogg";
136
- pcm: "pcm";
137
- wav: "wav";
138
- webm: "webm";
139
- }>;
140
- }, z.core.$strip>;
141
- }, z.core.$strip>], "type">>]>;
142
- name: z.ZodOptional<z.ZodString>;
143
- }, z.core.$strip>;
144
- export type ChatCompletionsUserMessage = z.infer<typeof ChatCompletionsUserMessageSchema>;
145
- export declare const ChatCompletionsReasoningDetailSchema: z.ZodObject<{
146
- id: z.ZodOptional<z.ZodString>;
147
- index: z.ZodInt;
148
- type: z.ZodString;
149
- text: z.ZodOptional<z.ZodString>;
150
- signature: z.ZodOptional<z.ZodString>;
151
- data: z.ZodOptional<z.ZodString>;
152
- summary: z.ZodOptional<z.ZodString>;
153
- format: z.ZodOptional<z.ZodString>;
154
- }, z.core.$strip>;
155
- export type ChatCompletionsReasoningDetail = z.infer<typeof ChatCompletionsReasoningDetailSchema>;
156
- export declare const ChatCompletionsAssistantMessageSchema: z.ZodObject<{
157
- role: z.ZodLiteral<"assistant">;
158
- content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodArray<z.ZodObject<{
159
- type: z.ZodLiteral<"text">;
160
- text: z.ZodString;
161
- }, z.core.$strip>>]>>;
162
- name: z.ZodOptional<z.ZodString>;
163
- tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
164
- type: z.ZodLiteral<"function">;
165
- id: z.ZodString;
166
- function: z.ZodObject<{
167
- arguments: z.ZodString;
168
- name: z.ZodString;
169
- }, z.core.$strip>;
170
- extra_content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
171
- }, z.core.$strip>>>;
172
- reasoning_content: z.ZodOptional<z.ZodString>;
173
- reasoning_details: z.ZodOptional<z.ZodArray<z.ZodObject<{
174
- id: z.ZodOptional<z.ZodString>;
175
- index: z.ZodInt;
176
- type: z.ZodString;
177
- text: z.ZodOptional<z.ZodString>;
178
- signature: z.ZodOptional<z.ZodString>;
179
- data: z.ZodOptional<z.ZodString>;
180
- summary: z.ZodOptional<z.ZodString>;
181
- format: z.ZodOptional<z.ZodString>;
182
- }, z.core.$strip>>>;
183
- extra_content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
184
- }, z.core.$strip>;
185
- export type ChatCompletionsAssistantMessage = z.infer<typeof ChatCompletionsAssistantMessageSchema>;
186
- export declare const ChatCompletionsToolMessageSchema: z.ZodObject<{
187
- role: z.ZodLiteral<"tool">;
188
- content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodObject<{
189
- type: z.ZodLiteral<"text">;
190
- text: z.ZodString;
191
- }, z.core.$strip>>]>;
192
- tool_call_id: z.ZodString;
193
- }, z.core.$strip>;
194
- export type ChatCompletionsToolMessage = z.infer<typeof ChatCompletionsToolMessageSchema>;
195
- export declare const ChatCompletionsMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
196
- role: z.ZodLiteral<"system">;
197
- content: z.ZodString;
198
- name: z.ZodOptional<z.ZodString>;
199
- }, z.core.$strip>, z.ZodObject<{
200
- role: z.ZodLiteral<"user">;
201
- content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
202
- type: z.ZodLiteral<"text">;
203
- text: z.ZodString;
204
- }, z.core.$strip>, z.ZodObject<{
205
- type: z.ZodLiteral<"image_url">;
206
- image_url: z.ZodObject<{
207
- url: z.ZodString;
208
- detail: z.ZodOptional<z.ZodEnum<{
209
- low: "low";
210
- high: "high";
211
- auto: "auto";
212
- }>>;
213
- }, z.core.$strip>;
214
- }, z.core.$strip>, z.ZodObject<{
215
- type: z.ZodLiteral<"file">;
216
- file: z.ZodObject<{
217
- data: z.ZodString;
218
- media_type: z.ZodString;
219
- filename: z.ZodOptional<z.ZodString>;
220
- }, z.core.$strip>;
221
- }, z.core.$strip>, z.ZodObject<{
222
- type: z.ZodLiteral<"input_audio">;
223
- input_audio: z.ZodObject<{
224
- data: z.ZodString;
225
- format: z.ZodEnum<{
226
- "x-aac": "x-aac";
227
- flac: "flac";
228
- mp3: "mp3";
229
- m4a: "m4a";
230
- mpeg: "mpeg";
231
- mpga: "mpga";
232
- mp4: "mp4";
233
- ogg: "ogg";
234
- pcm: "pcm";
235
- wav: "wav";
236
- webm: "webm";
237
- }>;
238
- }, z.core.$strip>;
239
- }, z.core.$strip>], "type">>]>;
240
- name: z.ZodOptional<z.ZodString>;
241
- }, z.core.$strip>, z.ZodObject<{
242
- role: z.ZodLiteral<"assistant">;
243
- content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodArray<z.ZodObject<{
244
- type: z.ZodLiteral<"text">;
245
- text: z.ZodString;
246
- }, z.core.$strip>>]>>;
247
- name: z.ZodOptional<z.ZodString>;
248
- tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
249
- type: z.ZodLiteral<"function">;
250
- id: z.ZodString;
251
- function: z.ZodObject<{
252
- arguments: z.ZodString;
253
- name: z.ZodString;
254
- }, z.core.$strip>;
255
- extra_content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
256
- }, z.core.$strip>>>;
257
- reasoning_content: z.ZodOptional<z.ZodString>;
258
- reasoning_details: z.ZodOptional<z.ZodArray<z.ZodObject<{
259
- id: z.ZodOptional<z.ZodString>;
260
- index: z.ZodInt;
261
- type: z.ZodString;
262
- text: z.ZodOptional<z.ZodString>;
263
- signature: z.ZodOptional<z.ZodString>;
264
- data: z.ZodOptional<z.ZodString>;
265
- summary: z.ZodOptional<z.ZodString>;
266
- format: z.ZodOptional<z.ZodString>;
267
- }, z.core.$strip>>>;
268
- extra_content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
269
- }, z.core.$strip>, z.ZodObject<{
270
- role: z.ZodLiteral<"tool">;
271
- content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodObject<{
272
- type: z.ZodLiteral<"text">;
273
- text: z.ZodString;
274
- }, z.core.$strip>>]>;
275
- tool_call_id: z.ZodString;
276
- }, z.core.$strip>], "role">;
277
- export type ChatCompletionsMessage = z.infer<typeof ChatCompletionsMessageSchema>;
278
- export declare const ChatCompletionsToolSchema: z.ZodObject<{
279
- type: z.ZodLiteral<"function">;
280
- function: z.ZodObject<{
281
- name: z.ZodString;
282
- description: z.ZodOptional<z.ZodString>;
283
- parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
284
- strict: z.ZodOptional<z.ZodBoolean>;
285
- }, z.core.$strip>;
286
- }, z.core.$strip>;
287
- export type ChatCompletionsTool = z.infer<typeof ChatCompletionsToolSchema>;
288
- export declare const ChatCompletionsToolChoiceSchema: z.ZodUnion<readonly [z.ZodEnum<{
289
- auto: "auto";
290
- required: "required";
291
- none: "none";
292
- validated: "validated";
293
- }>, z.ZodDiscriminatedUnion<[z.ZodObject<{
294
- type: z.ZodLiteral<"function">;
295
- function: z.ZodObject<{
296
- name: z.ZodString;
297
- }, z.core.$strip>;
298
- }, z.core.$strip>, z.ZodObject<{
299
- type: z.ZodLiteral<"allowed_tools">;
300
- allowed_tools: z.ZodObject<{
301
- mode: z.ZodEnum<{
302
- auto: "auto";
303
- required: "required";
304
- }>;
305
- tools: z.ZodArray<z.ZodObject<{
306
- type: z.ZodLiteral<"function">;
307
- function: z.ZodObject<{
308
- name: z.ZodString;
309
- }, z.core.$strip>;
310
- }, z.core.$strip>>;
311
- }, z.core.$strip>;
312
- }, z.core.$strip>], "type">]>;
313
- export type ChatCompletionsToolChoice = z.infer<typeof ChatCompletionsToolChoiceSchema>;
314
- export declare const ChatCompletionsReasoningEffortSchema: z.ZodEnum<{
315
- low: "low";
316
- high: "high";
317
- none: "none";
318
- minimal: "minimal";
319
- medium: "medium";
320
- xhigh: "xhigh";
321
- max: "max";
322
- }>;
323
- export type ChatCompletionsReasoningEffort = z.infer<typeof ChatCompletionsReasoningEffortSchema>;
324
- export declare const ChatCompletionsReasoningConfigSchema: z.ZodObject<{
325
- enabled: z.ZodOptional<z.ZodBoolean>;
326
- effort: z.ZodOptional<z.ZodEnum<{
327
- low: "low";
328
- high: "high";
329
- none: "none";
330
- minimal: "minimal";
331
- medium: "medium";
332
- xhigh: "xhigh";
333
- max: "max";
334
- }>>;
335
- max_tokens: z.ZodOptional<z.ZodNumber>;
336
- exclude: z.ZodOptional<z.ZodBoolean>;
337
- }, z.core.$strip>;
338
- export type ChatCompletionsReasoningConfig = z.infer<typeof ChatCompletionsReasoningConfigSchema>;
339
- export declare const ChatCompletionsResponseFormatJsonSchema: z.ZodObject<{
340
- type: z.ZodLiteral<"json_schema">;
341
- json_schema: z.ZodObject<{
342
- name: z.ZodString;
343
- description: z.ZodOptional<z.ZodString>;
344
- schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
345
- strict: z.ZodOptional<z.ZodBoolean>;
346
- }, z.core.$strip>;
347
- }, z.core.$strip>;
348
- export declare const ChatCompletionsResponseFormatTextSchema: z.ZodObject<{
349
- type: z.ZodLiteral<"text">;
350
- }, z.core.$strip>;
351
- export declare const ChatCompletionsResponseFormatSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
352
- type: z.ZodLiteral<"json_schema">;
353
- json_schema: z.ZodObject<{
354
- name: z.ZodString;
355
- description: z.ZodOptional<z.ZodString>;
356
- schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
357
- strict: z.ZodOptional<z.ZodBoolean>;
358
- }, z.core.$strip>;
359
- }, z.core.$strip>, z.ZodObject<{
360
- type: z.ZodLiteral<"text">;
361
- }, z.core.$strip>], "type">;
362
- export type ChatCompletionsResponseFormat = z.infer<typeof ChatCompletionsResponseFormatSchema>;
363
- declare const ChatCompletionsInputsSchema: z.ZodObject<{
364
- messages: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
365
- role: z.ZodLiteral<"system">;
366
- content: z.ZodString;
367
- name: z.ZodOptional<z.ZodString>;
368
- }, z.core.$strip>, z.ZodObject<{
369
- role: z.ZodLiteral<"user">;
370
- content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
371
- type: z.ZodLiteral<"text">;
372
- text: z.ZodString;
373
- }, z.core.$strip>, z.ZodObject<{
374
- type: z.ZodLiteral<"image_url">;
375
- image_url: z.ZodObject<{
376
- url: z.ZodString;
377
- detail: z.ZodOptional<z.ZodEnum<{
378
- low: "low";
379
- high: "high";
380
- auto: "auto";
381
- }>>;
382
- }, z.core.$strip>;
383
- }, z.core.$strip>, z.ZodObject<{
384
- type: z.ZodLiteral<"file">;
385
- file: z.ZodObject<{
386
- data: z.ZodString;
387
- media_type: z.ZodString;
388
- filename: z.ZodOptional<z.ZodString>;
389
- }, z.core.$strip>;
390
- }, z.core.$strip>, z.ZodObject<{
391
- type: z.ZodLiteral<"input_audio">;
392
- input_audio: z.ZodObject<{
393
- data: z.ZodString;
394
- format: z.ZodEnum<{
395
- "x-aac": "x-aac";
396
- flac: "flac";
397
- mp3: "mp3";
398
- m4a: "m4a";
399
- mpeg: "mpeg";
400
- mpga: "mpga";
401
- mp4: "mp4";
402
- ogg: "ogg";
403
- pcm: "pcm";
404
- wav: "wav";
405
- webm: "webm";
406
- }>;
407
- }, z.core.$strip>;
408
- }, z.core.$strip>], "type">>]>;
409
- name: z.ZodOptional<z.ZodString>;
410
- }, z.core.$strip>, z.ZodObject<{
411
- role: z.ZodLiteral<"assistant">;
412
- content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodArray<z.ZodObject<{
413
- type: z.ZodLiteral<"text">;
414
- text: z.ZodString;
415
- }, z.core.$strip>>]>>;
416
- name: z.ZodOptional<z.ZodString>;
417
- tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
418
- type: z.ZodLiteral<"function">;
419
- id: z.ZodString;
420
- function: z.ZodObject<{
421
- arguments: z.ZodString;
422
- name: z.ZodString;
423
- }, z.core.$strip>;
424
- extra_content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
425
- }, z.core.$strip>>>;
426
- reasoning_content: z.ZodOptional<z.ZodString>;
427
- reasoning_details: z.ZodOptional<z.ZodArray<z.ZodObject<{
428
- id: z.ZodOptional<z.ZodString>;
429
- index: z.ZodInt;
430
- type: z.ZodString;
431
- text: z.ZodOptional<z.ZodString>;
432
- signature: z.ZodOptional<z.ZodString>;
433
- data: z.ZodOptional<z.ZodString>;
434
- summary: z.ZodOptional<z.ZodString>;
435
- format: z.ZodOptional<z.ZodString>;
436
- }, z.core.$strip>>>;
437
- extra_content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
438
- }, z.core.$strip>, z.ZodObject<{
439
- role: z.ZodLiteral<"tool">;
440
- content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodObject<{
441
- type: z.ZodLiteral<"text">;
442
- text: z.ZodString;
443
- }, z.core.$strip>>]>;
444
- tool_call_id: z.ZodString;
445
- }, z.core.$strip>], "role">>;
446
- tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
447
- type: z.ZodLiteral<"function">;
448
- function: z.ZodObject<{
449
- name: z.ZodString;
450
- description: z.ZodOptional<z.ZodString>;
451
- parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
452
- strict: z.ZodOptional<z.ZodBoolean>;
453
- }, z.core.$strip>;
454
- }, z.core.$strip>>>;
455
- tool_choice: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
456
- auto: "auto";
457
- required: "required";
458
- none: "none";
459
- validated: "validated";
460
- }>, z.ZodDiscriminatedUnion<[z.ZodObject<{
461
- type: z.ZodLiteral<"function">;
462
- function: z.ZodObject<{
463
- name: z.ZodString;
464
- }, z.core.$strip>;
465
- }, z.core.$strip>, z.ZodObject<{
466
- type: z.ZodLiteral<"allowed_tools">;
467
- allowed_tools: z.ZodObject<{
468
- mode: z.ZodEnum<{
469
- auto: "auto";
470
- required: "required";
471
- }>;
472
- tools: z.ZodArray<z.ZodObject<{
473
- type: z.ZodLiteral<"function">;
474
- function: z.ZodObject<{
475
- name: z.ZodString;
476
- }, z.core.$strip>;
477
- }, z.core.$strip>>;
478
- }, z.core.$strip>;
479
- }, z.core.$strip>], "type">]>>;
480
- temperature: z.ZodOptional<z.ZodNumber>;
481
- max_tokens: z.ZodOptional<z.ZodInt>;
482
- max_completion_tokens: z.ZodOptional<z.ZodInt>;
483
- frequency_penalty: z.ZodOptional<z.ZodNumber>;
484
- presence_penalty: z.ZodOptional<z.ZodNumber>;
485
- seed: z.ZodOptional<z.ZodInt>;
486
- stop: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
487
- top_p: z.ZodOptional<z.ZodNumber>;
488
- response_format: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
489
- type: z.ZodLiteral<"json_schema">;
490
- json_schema: z.ZodObject<{
491
- name: z.ZodString;
492
- description: z.ZodOptional<z.ZodString>;
493
- schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
494
- strict: z.ZodOptional<z.ZodBoolean>;
495
- }, z.core.$strip>;
496
- }, z.core.$strip>, z.ZodObject<{
497
- type: z.ZodLiteral<"text">;
498
- }, z.core.$strip>], "type">>;
499
- reasoning_effort: z.ZodOptional<z.ZodEnum<{
500
- low: "low";
501
- high: "high";
502
- none: "none";
503
- minimal: "minimal";
504
- medium: "medium";
505
- xhigh: "xhigh";
506
- max: "max";
507
- }>>;
508
- reasoning: z.ZodOptional<z.ZodObject<{
509
- enabled: z.ZodOptional<z.ZodBoolean>;
510
- effort: z.ZodOptional<z.ZodEnum<{
511
- low: "low";
512
- high: "high";
513
- none: "none";
514
- minimal: "minimal";
515
- medium: "medium";
516
- xhigh: "xhigh";
517
- max: "max";
518
- }>>;
519
- max_tokens: z.ZodOptional<z.ZodNumber>;
520
- exclude: z.ZodOptional<z.ZodBoolean>;
521
- }, z.core.$strip>>;
522
- }, z.core.$strip>;
523
- export type ChatCompletionsInputs = z.infer<typeof ChatCompletionsInputsSchema>;
524
- export declare const ChatCompletionsBodySchema: z.ZodObject<{
525
- messages: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
526
- role: z.ZodLiteral<"system">;
527
- content: z.ZodString;
528
- name: z.ZodOptional<z.ZodString>;
529
- }, z.core.$strip>, z.ZodObject<{
530
- role: z.ZodLiteral<"user">;
531
- content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
532
- type: z.ZodLiteral<"text">;
533
- text: z.ZodString;
534
- }, z.core.$strip>, z.ZodObject<{
535
- type: z.ZodLiteral<"image_url">;
536
- image_url: z.ZodObject<{
537
- url: z.ZodString;
538
- detail: z.ZodOptional<z.ZodEnum<{
539
- low: "low";
540
- high: "high";
541
- auto: "auto";
542
- }>>;
543
- }, z.core.$strip>;
544
- }, z.core.$strip>, z.ZodObject<{
545
- type: z.ZodLiteral<"file">;
546
- file: z.ZodObject<{
547
- data: z.ZodString;
548
- media_type: z.ZodString;
549
- filename: z.ZodOptional<z.ZodString>;
550
- }, z.core.$strip>;
551
- }, z.core.$strip>, z.ZodObject<{
552
- type: z.ZodLiteral<"input_audio">;
553
- input_audio: z.ZodObject<{
554
- data: z.ZodString;
555
- format: z.ZodEnum<{
556
- "x-aac": "x-aac";
557
- flac: "flac";
558
- mp3: "mp3";
559
- m4a: "m4a";
560
- mpeg: "mpeg";
561
- mpga: "mpga";
562
- mp4: "mp4";
563
- ogg: "ogg";
564
- pcm: "pcm";
565
- wav: "wav";
566
- webm: "webm";
567
- }>;
568
- }, z.core.$strip>;
569
- }, z.core.$strip>], "type">>]>;
570
- name: z.ZodOptional<z.ZodString>;
571
- }, z.core.$strip>, z.ZodObject<{
572
- role: z.ZodLiteral<"assistant">;
573
- content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodArray<z.ZodObject<{
574
- type: z.ZodLiteral<"text">;
575
- text: z.ZodString;
576
- }, z.core.$strip>>]>>;
577
- name: z.ZodOptional<z.ZodString>;
578
- tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
579
- type: z.ZodLiteral<"function">;
580
- id: z.ZodString;
581
- function: z.ZodObject<{
582
- arguments: z.ZodString;
583
- name: z.ZodString;
584
- }, z.core.$strip>;
585
- extra_content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
586
- }, z.core.$strip>>>;
587
- reasoning_content: z.ZodOptional<z.ZodString>;
588
- reasoning_details: z.ZodOptional<z.ZodArray<z.ZodObject<{
589
- id: z.ZodOptional<z.ZodString>;
590
- index: z.ZodInt;
591
- type: z.ZodString;
592
- text: z.ZodOptional<z.ZodString>;
593
- signature: z.ZodOptional<z.ZodString>;
594
- data: z.ZodOptional<z.ZodString>;
595
- summary: z.ZodOptional<z.ZodString>;
596
- format: z.ZodOptional<z.ZodString>;
597
- }, z.core.$strip>>>;
598
- extra_content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
599
- }, z.core.$strip>, z.ZodObject<{
600
- role: z.ZodLiteral<"tool">;
601
- content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodObject<{
602
- type: z.ZodLiteral<"text">;
603
- text: z.ZodString;
604
- }, z.core.$strip>>]>;
605
- tool_call_id: z.ZodString;
606
- }, z.core.$strip>], "role">>;
607
- tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
608
- type: z.ZodLiteral<"function">;
609
- function: z.ZodObject<{
610
- name: z.ZodString;
611
- description: z.ZodOptional<z.ZodString>;
612
- parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
613
- strict: z.ZodOptional<z.ZodBoolean>;
614
- }, z.core.$strip>;
615
- }, z.core.$strip>>>;
616
- tool_choice: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
617
- auto: "auto";
618
- required: "required";
619
- none: "none";
620
- validated: "validated";
621
- }>, z.ZodDiscriminatedUnion<[z.ZodObject<{
622
- type: z.ZodLiteral<"function">;
623
- function: z.ZodObject<{
624
- name: z.ZodString;
625
- }, z.core.$strip>;
626
- }, z.core.$strip>, z.ZodObject<{
627
- type: z.ZodLiteral<"allowed_tools">;
628
- allowed_tools: z.ZodObject<{
629
- mode: z.ZodEnum<{
630
- auto: "auto";
631
- required: "required";
632
- }>;
633
- tools: z.ZodArray<z.ZodObject<{
634
- type: z.ZodLiteral<"function">;
635
- function: z.ZodObject<{
636
- name: z.ZodString;
637
- }, z.core.$strip>;
638
- }, z.core.$strip>>;
639
- }, z.core.$strip>;
640
- }, z.core.$strip>], "type">]>>;
641
- temperature: z.ZodOptional<z.ZodNumber>;
642
- max_tokens: z.ZodOptional<z.ZodInt>;
643
- max_completion_tokens: z.ZodOptional<z.ZodInt>;
644
- frequency_penalty: z.ZodOptional<z.ZodNumber>;
645
- presence_penalty: z.ZodOptional<z.ZodNumber>;
646
- seed: z.ZodOptional<z.ZodInt>;
647
- stop: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
648
- top_p: z.ZodOptional<z.ZodNumber>;
649
- response_format: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
650
- type: z.ZodLiteral<"json_schema">;
651
- json_schema: z.ZodObject<{
652
- name: z.ZodString;
653
- description: z.ZodOptional<z.ZodString>;
654
- schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
655
- strict: z.ZodOptional<z.ZodBoolean>;
656
- }, z.core.$strip>;
657
- }, z.core.$strip>, z.ZodObject<{
658
- type: z.ZodLiteral<"text">;
659
- }, z.core.$strip>], "type">>;
660
- reasoning_effort: z.ZodOptional<z.ZodEnum<{
661
- low: "low";
662
- high: "high";
663
- none: "none";
664
- minimal: "minimal";
665
- medium: "medium";
666
- xhigh: "xhigh";
667
- max: "max";
668
- }>>;
669
- reasoning: z.ZodOptional<z.ZodObject<{
670
- enabled: z.ZodOptional<z.ZodBoolean>;
671
- effort: z.ZodOptional<z.ZodEnum<{
672
- low: "low";
673
- high: "high";
674
- none: "none";
675
- minimal: "minimal";
676
- medium: "medium";
677
- xhigh: "xhigh";
678
- max: "max";
679
- }>>;
680
- max_tokens: z.ZodOptional<z.ZodNumber>;
681
- exclude: z.ZodOptional<z.ZodBoolean>;
682
- }, z.core.$strip>>;
683
- model: z.ZodString;
684
- stream: z.ZodOptional<z.ZodBoolean>;
685
- }, z.core.$loose>;
686
- export type ChatCompletionsBody = z.infer<typeof ChatCompletionsBodySchema>;
687
- export declare const ChatCompletionsFinishReasonSchema: z.ZodEnum<{
688
- tool_calls: "tool_calls";
689
- stop: "stop";
690
- length: "length";
691
- content_filter: "content_filter";
692
- }>;
693
- export type ChatCompletionsFinishReason = z.infer<typeof ChatCompletionsFinishReasonSchema>;
694
- export declare const ChatCompletionsChoiceSchema: z.ZodObject<{
695
- index: z.ZodInt;
696
- message: z.ZodObject<{
697
- role: z.ZodLiteral<"assistant">;
698
- content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodArray<z.ZodObject<{
699
- type: z.ZodLiteral<"text">;
700
- text: z.ZodString;
701
- }, z.core.$strip>>]>>;
702
- name: z.ZodOptional<z.ZodString>;
703
- tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
704
- type: z.ZodLiteral<"function">;
705
- id: z.ZodString;
706
- function: z.ZodObject<{
707
- arguments: z.ZodString;
708
- name: z.ZodString;
709
- }, z.core.$strip>;
710
- extra_content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
711
- }, z.core.$strip>>>;
712
- reasoning_content: z.ZodOptional<z.ZodString>;
713
- reasoning_details: z.ZodOptional<z.ZodArray<z.ZodObject<{
714
- id: z.ZodOptional<z.ZodString>;
715
- index: z.ZodInt;
716
- type: z.ZodString;
717
- text: z.ZodOptional<z.ZodString>;
718
- signature: z.ZodOptional<z.ZodString>;
719
- data: z.ZodOptional<z.ZodString>;
720
- summary: z.ZodOptional<z.ZodString>;
721
- format: z.ZodOptional<z.ZodString>;
722
- }, z.core.$strip>>>;
723
- extra_content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
724
- }, z.core.$strip>;
725
- finish_reason: z.ZodEnum<{
726
- tool_calls: "tool_calls";
727
- stop: "stop";
728
- length: "length";
729
- content_filter: "content_filter";
730
- }>;
731
- logprobs: z.ZodOptional<z.ZodUnknown>;
732
- }, z.core.$strip>;
733
- export type ChatCompletionsChoice = z.infer<typeof ChatCompletionsChoiceSchema>;
734
- export declare const ChatCompletionsUsageSchema: z.ZodObject<{
735
- prompt_tokens: z.ZodOptional<z.ZodInt>;
736
- completion_tokens: z.ZodOptional<z.ZodInt>;
737
- total_tokens: z.ZodOptional<z.ZodInt>;
738
- completion_tokens_details: z.ZodOptional<z.ZodObject<{
739
- reasoning_tokens: z.ZodOptional<z.ZodInt>;
740
- }, z.core.$strip>>;
741
- prompt_tokens_details: z.ZodOptional<z.ZodObject<{
742
- cached_tokens: z.ZodOptional<z.ZodInt>;
743
- }, z.core.$strip>>;
744
- }, z.core.$strip>;
745
- export type ChatCompletionsUsage = z.infer<typeof ChatCompletionsUsageSchema>;
746
- export declare const ChatCompletionsSchema: z.ZodObject<{
747
- id: z.ZodString;
748
- object: z.ZodLiteral<"chat.completion">;
749
- created: z.ZodInt;
750
- model: z.ZodString;
751
- choices: z.ZodArray<z.ZodObject<{
752
- index: z.ZodInt;
753
- message: z.ZodObject<{
754
- role: z.ZodLiteral<"assistant">;
755
- content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodArray<z.ZodObject<{
756
- type: z.ZodLiteral<"text">;
757
- text: z.ZodString;
758
- }, z.core.$strip>>]>>;
759
- name: z.ZodOptional<z.ZodString>;
760
- tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
761
- type: z.ZodLiteral<"function">;
762
- id: z.ZodString;
763
- function: z.ZodObject<{
764
- arguments: z.ZodString;
765
- name: z.ZodString;
766
- }, z.core.$strip>;
767
- extra_content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
768
- }, z.core.$strip>>>;
769
- reasoning_content: z.ZodOptional<z.ZodString>;
770
- reasoning_details: z.ZodOptional<z.ZodArray<z.ZodObject<{
771
- id: z.ZodOptional<z.ZodString>;
772
- index: z.ZodInt;
773
- type: z.ZodString;
774
- text: z.ZodOptional<z.ZodString>;
775
- signature: z.ZodOptional<z.ZodString>;
776
- data: z.ZodOptional<z.ZodString>;
777
- summary: z.ZodOptional<z.ZodString>;
778
- format: z.ZodOptional<z.ZodString>;
779
- }, z.core.$strip>>>;
780
- extra_content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
781
- }, z.core.$strip>;
782
- finish_reason: z.ZodEnum<{
783
- tool_calls: "tool_calls";
784
- stop: "stop";
785
- length: "length";
786
- content_filter: "content_filter";
787
- }>;
788
- logprobs: z.ZodOptional<z.ZodUnknown>;
789
- }, z.core.$strip>>;
790
- usage: z.ZodNullable<z.ZodObject<{
791
- prompt_tokens: z.ZodOptional<z.ZodInt>;
792
- completion_tokens: z.ZodOptional<z.ZodInt>;
793
- total_tokens: z.ZodOptional<z.ZodInt>;
794
- completion_tokens_details: z.ZodOptional<z.ZodObject<{
795
- reasoning_tokens: z.ZodOptional<z.ZodInt>;
796
- }, z.core.$strip>>;
797
- prompt_tokens_details: z.ZodOptional<z.ZodObject<{
798
- cached_tokens: z.ZodOptional<z.ZodInt>;
799
- }, z.core.$strip>>;
800
- }, z.core.$strip>>;
801
- provider_metadata: z.ZodOptional<z.ZodUnknown>;
802
- }, z.core.$strip>;
803
- export type ChatCompletions = z.infer<typeof ChatCompletionsSchema>;
804
- export declare const ChatCompletionsToolCallDeltaSchema: z.ZodObject<{
805
- type: z.ZodOptional<z.ZodLiteral<"function">>;
806
- id: z.ZodOptional<z.ZodString>;
807
- function: z.ZodOptional<z.ZodObject<{
808
- arguments: z.ZodString;
809
- name: z.ZodString;
810
- }, z.core.$strip>>;
811
- extra_content: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
812
- index: z.ZodInt;
813
- }, z.core.$strip>;
814
- export type ChatCompletionsToolCallDelta = z.infer<typeof ChatCompletionsToolCallDeltaSchema>;
815
- export declare const ChatCompletionsAssistantMessageDeltaSchema: z.ZodObject<{
816
- role: z.ZodOptional<z.ZodLiteral<"assistant">>;
817
- content: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodArray<z.ZodObject<{
818
- type: z.ZodLiteral<"text">;
819
- text: z.ZodString;
820
- }, z.core.$strip>>]>>>;
821
- name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
822
- reasoning_content: z.ZodOptional<z.ZodOptional<z.ZodString>>;
823
- reasoning_details: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
824
- id: z.ZodOptional<z.ZodString>;
825
- index: z.ZodInt;
826
- type: z.ZodString;
827
- text: z.ZodOptional<z.ZodString>;
828
- signature: z.ZodOptional<z.ZodString>;
829
- data: z.ZodOptional<z.ZodString>;
830
- summary: z.ZodOptional<z.ZodString>;
831
- format: z.ZodOptional<z.ZodString>;
832
- }, z.core.$strip>>>>;
833
- extra_content: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
834
- tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
835
- type: z.ZodOptional<z.ZodLiteral<"function">>;
836
- id: z.ZodOptional<z.ZodString>;
837
- function: z.ZodOptional<z.ZodObject<{
838
- arguments: z.ZodString;
839
- name: z.ZodString;
840
- }, z.core.$strip>>;
841
- extra_content: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
842
- index: z.ZodInt;
843
- }, z.core.$strip>>>;
844
- }, z.core.$strip>;
845
- export type ChatCompletionsAssistantMessageDelta = z.infer<typeof ChatCompletionsAssistantMessageDeltaSchema>;
846
- export declare const ChatCompletionsChoiceDeltaSchema: z.ZodObject<{
847
- index: z.ZodInt;
848
- delta: z.ZodObject<{
849
- role: z.ZodOptional<z.ZodLiteral<"assistant">>;
850
- content: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodArray<z.ZodObject<{
851
- type: z.ZodLiteral<"text">;
852
- text: z.ZodString;
853
- }, z.core.$strip>>]>>>;
854
- name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
855
- reasoning_content: z.ZodOptional<z.ZodOptional<z.ZodString>>;
856
- reasoning_details: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
857
- id: z.ZodOptional<z.ZodString>;
858
- index: z.ZodInt;
859
- type: z.ZodString;
860
- text: z.ZodOptional<z.ZodString>;
861
- signature: z.ZodOptional<z.ZodString>;
862
- data: z.ZodOptional<z.ZodString>;
863
- summary: z.ZodOptional<z.ZodString>;
864
- format: z.ZodOptional<z.ZodString>;
865
- }, z.core.$strip>>>>;
866
- extra_content: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
867
- tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
868
- type: z.ZodOptional<z.ZodLiteral<"function">>;
869
- id: z.ZodOptional<z.ZodString>;
870
- function: z.ZodOptional<z.ZodObject<{
871
- arguments: z.ZodString;
872
- name: z.ZodString;
873
- }, z.core.$strip>>;
874
- extra_content: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
875
- index: z.ZodInt;
876
- }, z.core.$strip>>>;
877
- }, z.core.$strip>;
878
- finish_reason: z.ZodNullable<z.ZodEnum<{
879
- tool_calls: "tool_calls";
880
- stop: "stop";
881
- length: "length";
882
- content_filter: "content_filter";
883
- }>>;
884
- logprobs: z.ZodOptional<z.ZodUnknown>;
885
- }, z.core.$strip>;
886
- export type ChatCompletionsChoiceDelta = z.infer<typeof ChatCompletionsChoiceDeltaSchema>;
887
- export declare const ChatCompletionsChunkSchema: z.ZodObject<{
888
- id: z.ZodString;
889
- object: z.ZodLiteral<"chat.completion.chunk">;
890
- created: z.ZodInt;
891
- model: z.ZodString;
892
- choices: z.ZodArray<z.ZodObject<{
893
- index: z.ZodInt;
894
- delta: z.ZodObject<{
895
- role: z.ZodOptional<z.ZodLiteral<"assistant">>;
896
- content: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodArray<z.ZodObject<{
897
- type: z.ZodLiteral<"text">;
898
- text: z.ZodString;
899
- }, z.core.$strip>>]>>>;
900
- name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
901
- reasoning_content: z.ZodOptional<z.ZodOptional<z.ZodString>>;
902
- reasoning_details: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
903
- id: z.ZodOptional<z.ZodString>;
904
- index: z.ZodInt;
905
- type: z.ZodString;
906
- text: z.ZodOptional<z.ZodString>;
907
- signature: z.ZodOptional<z.ZodString>;
908
- data: z.ZodOptional<z.ZodString>;
909
- summary: z.ZodOptional<z.ZodString>;
910
- format: z.ZodOptional<z.ZodString>;
911
- }, z.core.$strip>>>>;
912
- extra_content: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
913
- tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
914
- type: z.ZodOptional<z.ZodLiteral<"function">>;
915
- id: z.ZodOptional<z.ZodString>;
916
- function: z.ZodOptional<z.ZodObject<{
917
- arguments: z.ZodString;
918
- name: z.ZodString;
919
- }, z.core.$strip>>;
920
- extra_content: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
921
- index: z.ZodInt;
922
- }, z.core.$strip>>>;
923
- }, z.core.$strip>;
924
- finish_reason: z.ZodNullable<z.ZodEnum<{
925
- tool_calls: "tool_calls";
926
- stop: "stop";
927
- length: "length";
928
- content_filter: "content_filter";
929
- }>>;
930
- logprobs: z.ZodOptional<z.ZodUnknown>;
931
- }, z.core.$strip>>;
932
- usage: z.ZodNullable<z.ZodObject<{
933
- prompt_tokens: z.ZodOptional<z.ZodInt>;
934
- completion_tokens: z.ZodOptional<z.ZodInt>;
935
- total_tokens: z.ZodOptional<z.ZodInt>;
936
- completion_tokens_details: z.ZodOptional<z.ZodObject<{
937
- reasoning_tokens: z.ZodOptional<z.ZodInt>;
938
- }, z.core.$strip>>;
939
- prompt_tokens_details: z.ZodOptional<z.ZodObject<{
940
- cached_tokens: z.ZodOptional<z.ZodInt>;
941
- }, z.core.$strip>>;
942
- }, z.core.$strip>>;
943
- provider_metadata: z.ZodOptional<z.ZodUnknown>;
944
- }, z.core.$strip>;
945
- export type ChatCompletionsChunk = z.infer<typeof ChatCompletionsChunkSchema>;
946
- export {};