@hebo-ai/gateway 0.1.2 → 0.2.0

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 (202) hide show
  1. package/README.md +172 -67
  2. package/dist/config.js +2 -12
  3. package/dist/endpoints/chat-completions/converters.d.ts +28 -24
  4. package/dist/endpoints/chat-completions/converters.js +99 -73
  5. package/dist/endpoints/chat-completions/handler.js +36 -30
  6. package/dist/endpoints/chat-completions/schema.d.ts +394 -272
  7. package/dist/endpoints/chat-completions/schema.js +124 -57
  8. package/dist/endpoints/embeddings/converters.d.ts +4 -4
  9. package/dist/endpoints/embeddings/converters.js +8 -9
  10. package/dist/endpoints/embeddings/handler.js +32 -26
  11. package/dist/endpoints/embeddings/schema.d.ts +28 -38
  12. package/dist/endpoints/embeddings/schema.js +10 -10
  13. package/dist/endpoints/models/converters.d.ts +2 -2
  14. package/dist/endpoints/models/converters.js +9 -12
  15. package/dist/endpoints/models/handler.js +8 -9
  16. package/dist/endpoints/models/schema.d.ts +37 -31
  17. package/dist/endpoints/models/schema.js +23 -12
  18. package/dist/gateway.d.ts +8 -9
  19. package/dist/gateway.js +7 -10
  20. package/dist/index.d.ts +2 -0
  21. package/dist/index.js +2 -0
  22. package/dist/lifecycle.d.ts +2 -0
  23. package/dist/{utils/hooks.js → lifecycle.js} +16 -8
  24. package/dist/middleware/common.d.ts +4 -0
  25. package/dist/middleware/common.js +44 -0
  26. package/dist/middleware/matcher.d.ts +18 -0
  27. package/dist/middleware/matcher.js +83 -0
  28. package/dist/models/amazon/index.d.ts +2 -0
  29. package/dist/models/amazon/index.js +2 -0
  30. package/dist/models/amazon/middleware.d.ts +2 -0
  31. package/dist/models/amazon/middleware.js +20 -0
  32. package/dist/models/amazon/presets.d.ts +2390 -0
  33. package/dist/models/amazon/presets.js +80 -0
  34. package/dist/models/anthropic/index.d.ts +2 -0
  35. package/dist/models/anthropic/index.js +2 -0
  36. package/dist/models/anthropic/middleware.d.ts +5 -0
  37. package/dist/models/anthropic/middleware.js +67 -0
  38. package/dist/models/anthropic/presets.d.ts +4106 -0
  39. package/dist/models/anthropic/presets.js +113 -0
  40. package/dist/models/catalog.d.ts +3 -1
  41. package/dist/models/catalog.js +3 -2
  42. package/dist/models/cohere/index.d.ts +2 -0
  43. package/dist/models/cohere/index.js +2 -0
  44. package/dist/models/cohere/middleware.d.ts +2 -0
  45. package/dist/models/cohere/middleware.js +18 -0
  46. package/dist/models/cohere/presets.d.ts +2918 -0
  47. package/dist/models/cohere/presets.js +129 -0
  48. package/dist/models/google/index.d.ts +2 -0
  49. package/dist/models/google/index.js +2 -0
  50. package/dist/models/google/middleware.d.ts +2 -0
  51. package/dist/models/google/middleware.js +20 -0
  52. package/dist/models/{presets/gemini.d.ts → google/presets.d.ts} +400 -174
  53. package/dist/models/{presets/gemini.js → google/presets.js} +20 -5
  54. package/dist/models/meta/index.d.ts +1 -0
  55. package/dist/models/meta/index.js +1 -0
  56. package/dist/models/meta/presets.d.ts +3254 -0
  57. package/dist/models/{presets/llama.js → meta/presets.js} +44 -7
  58. package/dist/models/openai/index.d.ts +2 -0
  59. package/dist/models/openai/index.js +2 -0
  60. package/dist/models/openai/middleware.d.ts +2 -0
  61. package/dist/models/openai/middleware.js +20 -0
  62. package/dist/models/openai/presets.d.ts +6252 -0
  63. package/dist/models/openai/presets.js +206 -0
  64. package/dist/models/types.d.ts +3 -3
  65. package/dist/models/types.js +27 -0
  66. package/dist/models/voyage/index.d.ts +2 -0
  67. package/dist/models/voyage/index.js +2 -0
  68. package/dist/models/voyage/middleware.d.ts +2 -0
  69. package/dist/models/voyage/middleware.js +18 -0
  70. package/dist/models/{presets/voyage.d.ts → voyage/presets.d.ts} +322 -323
  71. package/dist/providers/anthropic/canonical.d.ts +3 -0
  72. package/dist/providers/anthropic/canonical.js +9 -0
  73. package/dist/providers/anthropic/index.d.ts +1 -0
  74. package/dist/providers/anthropic/index.js +1 -0
  75. package/dist/providers/bedrock/canonical.d.ts +15 -0
  76. package/dist/providers/{canonical/bedrock.js → bedrock/canonical.js} +13 -15
  77. package/dist/providers/bedrock/index.d.ts +1 -0
  78. package/dist/providers/bedrock/index.js +1 -0
  79. package/dist/providers/cohere/canonical.d.ts +3 -0
  80. package/dist/providers/{canonical/cohere.js → cohere/canonical.js} +6 -6
  81. package/dist/providers/cohere/index.d.ts +1 -0
  82. package/dist/providers/cohere/index.js +1 -0
  83. package/dist/providers/groq/canonical.d.ts +3 -0
  84. package/dist/providers/groq/canonical.js +12 -0
  85. package/dist/providers/groq/index.d.ts +1 -0
  86. package/dist/providers/groq/index.js +1 -0
  87. package/dist/providers/openai/canonical.d.ts +3 -0
  88. package/dist/providers/openai/canonical.js +8 -0
  89. package/dist/providers/openai/index.d.ts +1 -0
  90. package/dist/providers/openai/index.js +1 -0
  91. package/dist/providers/registry.d.ts +16 -26
  92. package/dist/providers/registry.js +19 -26
  93. package/dist/providers/types.d.ts +1 -1
  94. package/dist/providers/types.js +1 -0
  95. package/dist/providers/vertex/canonical.d.ts +3 -0
  96. package/dist/providers/vertex/canonical.js +8 -0
  97. package/dist/providers/vertex/index.d.ts +1 -0
  98. package/dist/providers/vertex/index.js +1 -0
  99. package/dist/providers/voyage/canonical.d.ts +3 -0
  100. package/dist/providers/voyage/canonical.js +7 -0
  101. package/dist/providers/voyage/index.d.ts +1 -0
  102. package/dist/providers/voyage/index.js +1 -0
  103. package/dist/types.d.ts +60 -30
  104. package/dist/utils/errors.js +2 -0
  105. package/dist/utils/preset.d.ts +1 -7
  106. package/dist/utils/preset.js +1 -1
  107. package/dist/utils/response.d.ts +1 -0
  108. package/dist/utils/response.js +10 -0
  109. package/package.json +79 -70
  110. package/src/config.ts +2 -18
  111. package/src/endpoints/chat-completions/converters.test.ts +39 -0
  112. package/src/endpoints/chat-completions/converters.ts +191 -112
  113. package/src/endpoints/chat-completions/handler.test.ts +47 -18
  114. package/src/endpoints/chat-completions/handler.ts +40 -34
  115. package/src/endpoints/chat-completions/schema.ts +161 -88
  116. package/src/endpoints/embeddings/converters.ts +15 -11
  117. package/src/endpoints/embeddings/handler.test.ts +27 -30
  118. package/src/endpoints/embeddings/handler.ts +34 -28
  119. package/src/endpoints/embeddings/schema.ts +10 -10
  120. package/src/endpoints/models/converters.ts +22 -14
  121. package/src/endpoints/models/handler.test.ts +26 -29
  122. package/src/endpoints/models/handler.ts +10 -12
  123. package/src/endpoints/models/schema.ts +26 -20
  124. package/src/gateway.ts +10 -24
  125. package/src/index.ts +3 -0
  126. package/src/{utils/hooks.ts → lifecycle.ts} +21 -11
  127. package/src/middleware/common.ts +68 -0
  128. package/src/middleware/matcher.ts +117 -0
  129. package/src/models/amazon/index.ts +2 -0
  130. package/src/models/amazon/middleware.ts +25 -0
  131. package/src/models/amazon/presets.ts +104 -0
  132. package/src/models/anthropic/index.ts +2 -0
  133. package/src/models/anthropic/middleware.test.ts +184 -0
  134. package/src/models/anthropic/middleware.ts +75 -0
  135. package/src/models/anthropic/presets.ts +161 -0
  136. package/src/models/catalog.ts +10 -2
  137. package/src/models/cohere/index.ts +2 -0
  138. package/src/models/cohere/middleware.ts +23 -0
  139. package/src/models/cohere/presets.ts +181 -0
  140. package/src/models/google/index.ts +2 -0
  141. package/src/models/google/middleware.ts +25 -0
  142. package/src/models/{presets/gemini.ts → google/presets.ts} +25 -5
  143. package/src/models/meta/index.ts +1 -0
  144. package/src/models/{presets/llama.ts → meta/presets.ts} +68 -7
  145. package/src/models/openai/index.ts +2 -0
  146. package/src/models/openai/middleware.ts +25 -0
  147. package/src/models/openai/presets.ts +269 -0
  148. package/src/models/types.ts +29 -2
  149. package/src/models/voyage/index.ts +2 -0
  150. package/src/models/voyage/middleware.ts +23 -0
  151. package/src/providers/anthropic/canonical.ts +17 -0
  152. package/src/providers/anthropic/index.ts +1 -0
  153. package/src/providers/{canonical/bedrock.ts → bedrock/canonical.ts} +22 -32
  154. package/src/providers/bedrock/index.ts +1 -0
  155. package/src/providers/cohere/canonical.ts +26 -0
  156. package/src/providers/cohere/index.ts +1 -0
  157. package/src/providers/groq/canonical.ts +21 -0
  158. package/src/providers/groq/index.ts +1 -0
  159. package/src/providers/openai/canonical.ts +16 -0
  160. package/src/providers/openai/index.ts +1 -0
  161. package/src/providers/registry.test.ts +12 -10
  162. package/src/providers/registry.ts +43 -43
  163. package/src/providers/types.ts +1 -0
  164. package/src/providers/vertex/canonical.ts +17 -0
  165. package/src/providers/vertex/index.ts +1 -0
  166. package/src/providers/voyage/canonical.ts +16 -0
  167. package/src/providers/voyage/index.ts +1 -0
  168. package/src/types.ts +64 -28
  169. package/src/utils/errors.ts +2 -0
  170. package/src/utils/preset.ts +2 -6
  171. package/src/utils/response.ts +15 -0
  172. package/dist/models/presets/claude.d.ts +0 -1165
  173. package/dist/models/presets/claude.js +0 -40
  174. package/dist/models/presets/cohere.d.ts +0 -383
  175. package/dist/models/presets/cohere.js +0 -26
  176. package/dist/models/presets/gpt-oss.d.ts +0 -779
  177. package/dist/models/presets/gpt-oss.js +0 -40
  178. package/dist/models/presets/llama.d.ts +0 -1400
  179. package/dist/providers/canonical/anthropic.d.ts +0 -25
  180. package/dist/providers/canonical/anthropic.js +0 -14
  181. package/dist/providers/canonical/bedrock.d.ts +0 -26
  182. package/dist/providers/canonical/cohere.d.ts +0 -17
  183. package/dist/providers/canonical/groq.d.ts +0 -17
  184. package/dist/providers/canonical/groq.js +0 -10
  185. package/dist/providers/canonical/openai.d.ts +0 -17
  186. package/dist/providers/canonical/openai.js +0 -8
  187. package/dist/providers/canonical/vertex.d.ts +0 -17
  188. package/dist/providers/canonical/vertex.js +0 -10
  189. package/dist/providers/canonical/voyage.d.ts +0 -17
  190. package/dist/providers/canonical/voyage.js +0 -8
  191. package/dist/utils/hooks.d.ts +0 -2
  192. package/src/models/presets/claude.ts +0 -59
  193. package/src/models/presets/cohere.ts +0 -37
  194. package/src/models/presets/gpt-oss.ts +0 -55
  195. package/src/providers/canonical/anthropic.ts +0 -32
  196. package/src/providers/canonical/cohere.ts +0 -36
  197. package/src/providers/canonical/groq.ts +0 -25
  198. package/src/providers/canonical/openai.ts +0 -16
  199. package/src/providers/canonical/vertex.ts +0 -18
  200. package/src/providers/canonical/voyage.ts +0 -16
  201. package/dist/models/{presets/voyage.js → voyage/presets.js} +10 -10
  202. package/src/models/{presets/voyage.ts → voyage/presets.ts} +10 -10
@@ -1,334 +1,456 @@
1
- import * as z from "zod/mini";
2
- export declare const CompletionsContentPartTextSchema: z.ZodMiniObject<{
3
- type: z.ZodMiniLiteral<"text">;
4
- text: z.ZodMiniString<string>;
1
+ import * as z from "zod";
2
+ export declare const ChatCompletionsContentPartTextSchema: z.ZodObject<{
3
+ type: z.ZodLiteral<"text">;
4
+ text: z.ZodString;
5
5
  }, z.core.$strip>;
6
- export declare const CompletionsContentPartImageSchema: z.ZodMiniObject<{
7
- type: z.ZodMiniLiteral<"image_url">;
8
- image_url: z.ZodMiniObject<{
9
- url: z.ZodMiniString<string>;
10
- detail: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"low">, z.ZodMiniLiteral<"high">, z.ZodMiniLiteral<"auto">]>>;
6
+ export declare const ChatCompletionsContentPartImageSchema: z.ZodObject<{
7
+ type: z.ZodLiteral<"image_url">;
8
+ image_url: z.ZodObject<{
9
+ url: z.ZodString;
10
+ detail: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"low">, z.ZodLiteral<"high">, z.ZodLiteral<"auto">]>>;
11
11
  }, z.core.$strip>;
12
12
  }, z.core.$strip>;
13
- export declare const CompletionsContentPartFileSchema: z.ZodMiniObject<{
14
- type: z.ZodMiniLiteral<"file">;
15
- file: z.ZodMiniObject<{
16
- data: z.ZodMiniString<string>;
17
- media_type: z.ZodMiniString<string>;
18
- filename: z.ZodMiniString<string>;
13
+ export declare const ChatCompletionsContentPartFileSchema: z.ZodObject<{
14
+ type: z.ZodLiteral<"file">;
15
+ file: z.ZodObject<{
16
+ data: z.ZodString;
17
+ media_type: z.ZodString;
18
+ filename: z.ZodOptional<z.ZodString>;
19
19
  }, z.core.$strip>;
20
20
  }, z.core.$strip>;
21
- export type CompletionsContentPart = z.infer<typeof CompletionsContentPartTextSchema> | z.infer<typeof CompletionsContentPartImageSchema> | z.infer<typeof CompletionsContentPartFileSchema>;
22
- export declare const CompletionsToolCallSchema: z.ZodMiniObject<{
23
- type: z.ZodMiniLiteral<"function">;
24
- id: z.ZodMiniString<string>;
25
- function: z.ZodMiniObject<{
26
- arguments: z.ZodMiniString<string>;
27
- name: z.ZodMiniString<string>;
21
+ export type ChatCompletionsContentPart = z.infer<typeof ChatCompletionsContentPartTextSchema> | z.infer<typeof ChatCompletionsContentPartImageSchema> | z.infer<typeof ChatCompletionsContentPartFileSchema>;
22
+ export declare const ChatCompletionsToolCallSchema: z.ZodObject<{
23
+ type: z.ZodLiteral<"function">;
24
+ id: z.ZodString;
25
+ function: z.ZodObject<{
26
+ arguments: z.ZodString;
27
+ name: z.ZodString;
28
28
  }, z.core.$strip>;
29
29
  }, z.core.$strip>;
30
- export type CompletionsToolCall = z.infer<typeof CompletionsToolCallSchema>;
31
- export declare const CompletionsSystemMessageSchema: z.ZodMiniObject<{
32
- role: z.ZodMiniLiteral<"system">;
33
- content: z.ZodMiniString<string>;
30
+ export type ChatCompletionsToolCall = z.infer<typeof ChatCompletionsToolCallSchema>;
31
+ export declare const ChatCompletionsSystemMessageSchema: z.ZodObject<{
32
+ role: z.ZodLiteral<"system">;
33
+ content: z.ZodString;
34
+ name: z.ZodOptional<z.ZodString>;
34
35
  }, z.core.$strip>;
35
- export type CompletionsSystemMessage = z.infer<typeof CompletionsSystemMessageSchema>;
36
- export declare const CompletionsUserMessageSchema: z.ZodMiniObject<{
37
- role: z.ZodMiniLiteral<"user">;
38
- content: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
39
- type: z.ZodMiniLiteral<"text">;
40
- text: z.ZodMiniString<string>;
41
- }, z.core.$strip>, z.ZodMiniObject<{
42
- type: z.ZodMiniLiteral<"image_url">;
43
- image_url: z.ZodMiniObject<{
44
- url: z.ZodMiniString<string>;
45
- detail: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"low">, z.ZodMiniLiteral<"high">, z.ZodMiniLiteral<"auto">]>>;
36
+ export type ChatCompletionsSystemMessage = z.infer<typeof ChatCompletionsSystemMessageSchema>;
37
+ export declare const ChatCompletionsUserMessageSchema: z.ZodObject<{
38
+ role: z.ZodLiteral<"user">;
39
+ content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
40
+ type: z.ZodLiteral<"text">;
41
+ text: z.ZodString;
42
+ }, z.core.$strip>, z.ZodObject<{
43
+ type: z.ZodLiteral<"image_url">;
44
+ image_url: z.ZodObject<{
45
+ url: z.ZodString;
46
+ detail: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"low">, z.ZodLiteral<"high">, z.ZodLiteral<"auto">]>>;
46
47
  }, z.core.$strip>;
47
- }, z.core.$strip>, z.ZodMiniObject<{
48
- type: z.ZodMiniLiteral<"file">;
49
- file: z.ZodMiniObject<{
50
- data: z.ZodMiniString<string>;
51
- media_type: z.ZodMiniString<string>;
52
- filename: z.ZodMiniString<string>;
48
+ }, z.core.$strip>, z.ZodObject<{
49
+ type: z.ZodLiteral<"file">;
50
+ file: z.ZodObject<{
51
+ data: z.ZodString;
52
+ media_type: z.ZodString;
53
+ filename: z.ZodOptional<z.ZodString>;
53
54
  }, z.core.$strip>;
54
55
  }, z.core.$strip>]>>]>;
56
+ name: z.ZodOptional<z.ZodString>;
55
57
  }, z.core.$strip>;
56
- export type CompletionsUserMessage = z.infer<typeof CompletionsUserMessageSchema>;
57
- export declare const CompletionsAssistantMessageSchema: z.ZodMiniObject<{
58
- role: z.ZodMiniLiteral<"assistant">;
59
- content: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNull]>;
60
- tool_calls: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
61
- type: z.ZodMiniLiteral<"function">;
62
- id: z.ZodMiniString<string>;
63
- function: z.ZodMiniObject<{
64
- arguments: z.ZodMiniString<string>;
65
- name: z.ZodMiniString<string>;
58
+ export type ChatCompletionsUserMessage = z.infer<typeof ChatCompletionsUserMessageSchema>;
59
+ export declare const ChatCompletionsAssistantMessageSchema: z.ZodObject<{
60
+ role: z.ZodLiteral<"assistant">;
61
+ content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
62
+ name: z.ZodOptional<z.ZodString>;
63
+ tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
64
+ type: z.ZodLiteral<"function">;
65
+ id: z.ZodString;
66
+ function: z.ZodObject<{
67
+ arguments: z.ZodString;
68
+ name: z.ZodString;
66
69
  }, z.core.$strip>;
67
70
  }, z.core.$strip>>>;
68
- reasoning: z.ZodMiniOptional<z.ZodMiniString<string>>;
69
- reasoning_content: z.ZodMiniOptional<z.ZodMiniString<string>>;
71
+ reasoning_content: z.ZodOptional<z.ZodString>;
70
72
  }, z.core.$strip>;
71
- export type CompletionsAssistantMessage = z.infer<typeof CompletionsAssistantMessageSchema>;
72
- export declare const CompletionsToolMessageSchema: z.ZodMiniObject<{
73
- role: z.ZodMiniLiteral<"tool">;
74
- content: z.ZodMiniString<string>;
75
- tool_call_id: z.ZodMiniString<string>;
73
+ export type ChatCompletionsAssistantMessage = z.infer<typeof ChatCompletionsAssistantMessageSchema>;
74
+ export declare const ChatCompletionsToolMessageSchema: z.ZodObject<{
75
+ role: z.ZodLiteral<"tool">;
76
+ content: z.ZodString;
77
+ tool_call_id: z.ZodString;
76
78
  }, z.core.$strip>;
77
- export type CompletionsToolMessage = z.infer<typeof CompletionsToolMessageSchema>;
78
- export declare const CompletionsMessageSchema: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
79
- role: z.ZodMiniLiteral<"system">;
80
- content: z.ZodMiniString<string>;
81
- }, z.core.$strip>, z.ZodMiniObject<{
82
- role: z.ZodMiniLiteral<"user">;
83
- content: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
84
- type: z.ZodMiniLiteral<"text">;
85
- text: z.ZodMiniString<string>;
86
- }, z.core.$strip>, z.ZodMiniObject<{
87
- type: z.ZodMiniLiteral<"image_url">;
88
- image_url: z.ZodMiniObject<{
89
- url: z.ZodMiniString<string>;
90
- detail: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"low">, z.ZodMiniLiteral<"high">, z.ZodMiniLiteral<"auto">]>>;
79
+ export type ChatCompletionsToolMessage = z.infer<typeof ChatCompletionsToolMessageSchema>;
80
+ export declare const ChatCompletionsMessageSchema: z.ZodUnion<readonly [z.ZodObject<{
81
+ role: z.ZodLiteral<"system">;
82
+ content: z.ZodString;
83
+ name: z.ZodOptional<z.ZodString>;
84
+ }, z.core.$strip>, z.ZodObject<{
85
+ role: z.ZodLiteral<"user">;
86
+ content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
87
+ type: z.ZodLiteral<"text">;
88
+ text: z.ZodString;
89
+ }, z.core.$strip>, z.ZodObject<{
90
+ type: z.ZodLiteral<"image_url">;
91
+ image_url: z.ZodObject<{
92
+ url: z.ZodString;
93
+ detail: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"low">, z.ZodLiteral<"high">, z.ZodLiteral<"auto">]>>;
91
94
  }, z.core.$strip>;
92
- }, z.core.$strip>, z.ZodMiniObject<{
93
- type: z.ZodMiniLiteral<"file">;
94
- file: z.ZodMiniObject<{
95
- data: z.ZodMiniString<string>;
96
- media_type: z.ZodMiniString<string>;
97
- filename: z.ZodMiniString<string>;
95
+ }, z.core.$strip>, z.ZodObject<{
96
+ type: z.ZodLiteral<"file">;
97
+ file: z.ZodObject<{
98
+ data: z.ZodString;
99
+ media_type: z.ZodString;
100
+ filename: z.ZodOptional<z.ZodString>;
98
101
  }, z.core.$strip>;
99
102
  }, z.core.$strip>]>>]>;
100
- }, z.core.$strip>, z.ZodMiniObject<{
101
- role: z.ZodMiniLiteral<"assistant">;
102
- content: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNull]>;
103
- tool_calls: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
104
- type: z.ZodMiniLiteral<"function">;
105
- id: z.ZodMiniString<string>;
106
- function: z.ZodMiniObject<{
107
- arguments: z.ZodMiniString<string>;
108
- name: z.ZodMiniString<string>;
103
+ name: z.ZodOptional<z.ZodString>;
104
+ }, z.core.$strip>, z.ZodObject<{
105
+ role: z.ZodLiteral<"assistant">;
106
+ content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
107
+ name: z.ZodOptional<z.ZodString>;
108
+ tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
109
+ type: z.ZodLiteral<"function">;
110
+ id: z.ZodString;
111
+ function: z.ZodObject<{
112
+ arguments: z.ZodString;
113
+ name: z.ZodString;
109
114
  }, z.core.$strip>;
110
115
  }, z.core.$strip>>>;
111
- reasoning: z.ZodMiniOptional<z.ZodMiniString<string>>;
112
- reasoning_content: z.ZodMiniOptional<z.ZodMiniString<string>>;
113
- }, z.core.$strip>, z.ZodMiniObject<{
114
- role: z.ZodMiniLiteral<"tool">;
115
- content: z.ZodMiniString<string>;
116
- tool_call_id: z.ZodMiniString<string>;
116
+ reasoning_content: z.ZodOptional<z.ZodString>;
117
+ }, z.core.$strip>, z.ZodObject<{
118
+ role: z.ZodLiteral<"tool">;
119
+ content: z.ZodString;
120
+ tool_call_id: z.ZodString;
117
121
  }, z.core.$strip>]>;
118
- export type CompletionsMessage = z.infer<typeof CompletionsMessageSchema>;
119
- export declare const CompletionsToolSchema: z.ZodMiniObject<{
120
- type: z.ZodMiniLiteral<"function">;
121
- function: z.ZodMiniObject<{
122
- name: z.ZodMiniString<string>;
123
- description: z.ZodMiniOptional<z.ZodMiniString<string>>;
124
- parameters: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniAny>;
122
+ export type ChatCompletionsMessage = z.infer<typeof ChatCompletionsMessageSchema>;
123
+ export declare const ChatCompletionsToolSchema: z.ZodObject<{
124
+ type: z.ZodLiteral<"function">;
125
+ function: z.ZodObject<{
126
+ name: z.ZodString;
127
+ description: z.ZodOptional<z.ZodString>;
128
+ parameters: z.ZodRecord<z.ZodString, z.ZodAny>;
125
129
  }, z.core.$strip>;
126
130
  }, z.core.$strip>;
127
- export type CompletionsTool = z.infer<typeof CompletionsToolSchema>;
128
- export declare const CompletionsToolChoiceSchema: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"none">, z.ZodMiniLiteral<"auto">, z.ZodMiniLiteral<"required">, z.ZodMiniObject<{
129
- type: z.ZodMiniLiteral<"function">;
130
- function: z.ZodMiniObject<{
131
- name: z.ZodMiniString<string>;
131
+ export type ChatCompletionsTool = z.infer<typeof ChatCompletionsToolSchema>;
132
+ export declare const ChatCompletionsToolChoiceSchema: z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"auto">, z.ZodLiteral<"required">, z.ZodObject<{
133
+ type: z.ZodLiteral<"function">;
134
+ function: z.ZodObject<{
135
+ name: z.ZodString;
132
136
  }, z.core.$strip>;
133
137
  }, z.core.$strip>]>;
134
- export type CompletionsToolChoice = z.infer<typeof CompletionsToolChoiceSchema>;
135
- export declare const CompletionsInputsSchema: z.ZodMiniObject<{
136
- messages: z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
137
- role: z.ZodMiniLiteral<"system">;
138
- content: z.ZodMiniString<string>;
139
- }, z.core.$strip>, z.ZodMiniObject<{
140
- role: z.ZodMiniLiteral<"user">;
141
- content: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
142
- type: z.ZodMiniLiteral<"text">;
143
- text: z.ZodMiniString<string>;
144
- }, z.core.$strip>, z.ZodMiniObject<{
145
- type: z.ZodMiniLiteral<"image_url">;
146
- image_url: z.ZodMiniObject<{
147
- url: z.ZodMiniString<string>;
148
- detail: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"low">, z.ZodMiniLiteral<"high">, z.ZodMiniLiteral<"auto">]>>;
138
+ export type ChatCompletionsToolChoice = z.infer<typeof ChatCompletionsToolChoiceSchema>;
139
+ export declare const ChatCompletionsReasoningEffortSchema: z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"minimal">, z.ZodLiteral<"low">, z.ZodLiteral<"medium">, z.ZodLiteral<"high">, z.ZodLiteral<"xhigh">]>;
140
+ export type ChatCompletionsReasoningEffort = z.infer<typeof ChatCompletionsReasoningEffortSchema>;
141
+ export declare const ChatCompletionsReasoningConfigSchema: z.ZodObject<{
142
+ enabled: z.ZodOptional<z.ZodBoolean>;
143
+ effort: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"minimal">, z.ZodLiteral<"low">, z.ZodLiteral<"medium">, z.ZodLiteral<"high">, z.ZodLiteral<"xhigh">]>>;
144
+ max_tokens: z.ZodOptional<z.ZodNumber>;
145
+ exclude: z.ZodOptional<z.ZodBoolean>;
146
+ }, z.core.$strip>;
147
+ export type ChatCompletionsReasoningConfig = z.infer<typeof ChatCompletionsReasoningConfigSchema>;
148
+ declare const ChatCompletionsInputsSchema: z.ZodObject<{
149
+ messages: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
150
+ role: z.ZodLiteral<"system">;
151
+ content: z.ZodString;
152
+ name: z.ZodOptional<z.ZodString>;
153
+ }, z.core.$strip>, z.ZodObject<{
154
+ role: z.ZodLiteral<"user">;
155
+ content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
156
+ type: z.ZodLiteral<"text">;
157
+ text: z.ZodString;
158
+ }, z.core.$strip>, z.ZodObject<{
159
+ type: z.ZodLiteral<"image_url">;
160
+ image_url: z.ZodObject<{
161
+ url: z.ZodString;
162
+ detail: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"low">, z.ZodLiteral<"high">, z.ZodLiteral<"auto">]>>;
149
163
  }, z.core.$strip>;
150
- }, z.core.$strip>, z.ZodMiniObject<{
151
- type: z.ZodMiniLiteral<"file">;
152
- file: z.ZodMiniObject<{
153
- data: z.ZodMiniString<string>;
154
- media_type: z.ZodMiniString<string>;
155
- filename: z.ZodMiniString<string>;
164
+ }, z.core.$strip>, z.ZodObject<{
165
+ type: z.ZodLiteral<"file">;
166
+ file: z.ZodObject<{
167
+ data: z.ZodString;
168
+ media_type: z.ZodString;
169
+ filename: z.ZodOptional<z.ZodString>;
156
170
  }, z.core.$strip>;
157
171
  }, z.core.$strip>]>>]>;
158
- }, z.core.$strip>, z.ZodMiniObject<{
159
- role: z.ZodMiniLiteral<"assistant">;
160
- content: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNull]>;
161
- tool_calls: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
162
- type: z.ZodMiniLiteral<"function">;
163
- id: z.ZodMiniString<string>;
164
- function: z.ZodMiniObject<{
165
- arguments: z.ZodMiniString<string>;
166
- name: z.ZodMiniString<string>;
172
+ name: z.ZodOptional<z.ZodString>;
173
+ }, z.core.$strip>, z.ZodObject<{
174
+ role: z.ZodLiteral<"assistant">;
175
+ content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
176
+ name: z.ZodOptional<z.ZodString>;
177
+ tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
178
+ type: z.ZodLiteral<"function">;
179
+ id: z.ZodString;
180
+ function: z.ZodObject<{
181
+ arguments: z.ZodString;
182
+ name: z.ZodString;
167
183
  }, z.core.$strip>;
168
184
  }, z.core.$strip>>>;
169
- reasoning: z.ZodMiniOptional<z.ZodMiniString<string>>;
170
- reasoning_content: z.ZodMiniOptional<z.ZodMiniString<string>>;
171
- }, z.core.$strip>, z.ZodMiniObject<{
172
- role: z.ZodMiniLiteral<"tool">;
173
- content: z.ZodMiniString<string>;
174
- tool_call_id: z.ZodMiniString<string>;
185
+ reasoning_content: z.ZodOptional<z.ZodString>;
186
+ }, z.core.$strip>, z.ZodObject<{
187
+ role: z.ZodLiteral<"tool">;
188
+ content: z.ZodString;
189
+ tool_call_id: z.ZodString;
175
190
  }, z.core.$strip>]>>;
176
- tools: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
177
- type: z.ZodMiniLiteral<"function">;
178
- function: z.ZodMiniObject<{
179
- name: z.ZodMiniString<string>;
180
- description: z.ZodMiniOptional<z.ZodMiniString<string>>;
181
- parameters: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniAny>;
191
+ tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
192
+ type: z.ZodLiteral<"function">;
193
+ function: z.ZodObject<{
194
+ name: z.ZodString;
195
+ description: z.ZodOptional<z.ZodString>;
196
+ parameters: z.ZodRecord<z.ZodString, z.ZodAny>;
182
197
  }, z.core.$strip>;
183
198
  }, z.core.$strip>>>;
184
- tool_choice: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"none">, z.ZodMiniLiteral<"auto">, z.ZodMiniLiteral<"required">, z.ZodMiniObject<{
185
- type: z.ZodMiniLiteral<"function">;
186
- function: z.ZodMiniObject<{
187
- name: z.ZodMiniString<string>;
199
+ tool_choice: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"auto">, z.ZodLiteral<"required">, z.ZodObject<{
200
+ type: z.ZodLiteral<"function">;
201
+ function: z.ZodObject<{
202
+ name: z.ZodString;
188
203
  }, z.core.$strip>;
189
204
  }, z.core.$strip>]>>;
190
- temperature: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
205
+ temperature: z.ZodOptional<z.ZodNumber>;
206
+ max_tokens: z.ZodOptional<z.ZodInt>;
207
+ max_completion_tokens: z.ZodOptional<z.ZodInt>;
208
+ frequency_penalty: z.ZodOptional<z.ZodNumber>;
209
+ presence_penalty: z.ZodOptional<z.ZodNumber>;
210
+ seed: z.ZodOptional<z.ZodInt>;
211
+ stop: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
212
+ top_p: z.ZodOptional<z.ZodNumber>;
213
+ reasoning_effort: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"minimal">, z.ZodLiteral<"low">, z.ZodLiteral<"medium">, z.ZodLiteral<"high">, z.ZodLiteral<"xhigh">]>>;
214
+ reasoning: z.ZodOptional<z.ZodObject<{
215
+ enabled: z.ZodOptional<z.ZodBoolean>;
216
+ effort: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"minimal">, z.ZodLiteral<"low">, z.ZodLiteral<"medium">, z.ZodLiteral<"high">, z.ZodLiteral<"xhigh">]>>;
217
+ max_tokens: z.ZodOptional<z.ZodNumber>;
218
+ exclude: z.ZodOptional<z.ZodBoolean>;
219
+ }, z.core.$strip>>;
191
220
  }, z.core.$strip>;
192
- export type CompletionsInputs = z.infer<typeof CompletionsInputsSchema>;
193
- export declare const CompletionsBodySchema: z.ZodMiniObject<{
194
- messages: z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
195
- role: z.ZodMiniLiteral<"system">;
196
- content: z.ZodMiniString<string>;
197
- }, z.core.$strip>, z.ZodMiniObject<{
198
- role: z.ZodMiniLiteral<"user">;
199
- content: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
200
- type: z.ZodMiniLiteral<"text">;
201
- text: z.ZodMiniString<string>;
202
- }, z.core.$strip>, z.ZodMiniObject<{
203
- type: z.ZodMiniLiteral<"image_url">;
204
- image_url: z.ZodMiniObject<{
205
- url: z.ZodMiniString<string>;
206
- detail: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"low">, z.ZodMiniLiteral<"high">, z.ZodMiniLiteral<"auto">]>>;
221
+ export type ChatCompletionsInputs = z.infer<typeof ChatCompletionsInputsSchema>;
222
+ export declare const ChatCompletionsBodySchema: z.ZodObject<{
223
+ messages: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
224
+ role: z.ZodLiteral<"system">;
225
+ content: z.ZodString;
226
+ name: z.ZodOptional<z.ZodString>;
227
+ }, z.core.$strip>, z.ZodObject<{
228
+ role: z.ZodLiteral<"user">;
229
+ content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
230
+ type: z.ZodLiteral<"text">;
231
+ text: z.ZodString;
232
+ }, z.core.$strip>, z.ZodObject<{
233
+ type: z.ZodLiteral<"image_url">;
234
+ image_url: z.ZodObject<{
235
+ url: z.ZodString;
236
+ detail: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"low">, z.ZodLiteral<"high">, z.ZodLiteral<"auto">]>>;
207
237
  }, z.core.$strip>;
208
- }, z.core.$strip>, z.ZodMiniObject<{
209
- type: z.ZodMiniLiteral<"file">;
210
- file: z.ZodMiniObject<{
211
- data: z.ZodMiniString<string>;
212
- media_type: z.ZodMiniString<string>;
213
- filename: z.ZodMiniString<string>;
238
+ }, z.core.$strip>, z.ZodObject<{
239
+ type: z.ZodLiteral<"file">;
240
+ file: z.ZodObject<{
241
+ data: z.ZodString;
242
+ media_type: z.ZodString;
243
+ filename: z.ZodOptional<z.ZodString>;
214
244
  }, z.core.$strip>;
215
245
  }, z.core.$strip>]>>]>;
216
- }, z.core.$strip>, z.ZodMiniObject<{
217
- role: z.ZodMiniLiteral<"assistant">;
218
- content: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNull]>;
219
- tool_calls: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
220
- type: z.ZodMiniLiteral<"function">;
221
- id: z.ZodMiniString<string>;
222
- function: z.ZodMiniObject<{
223
- arguments: z.ZodMiniString<string>;
224
- name: z.ZodMiniString<string>;
246
+ name: z.ZodOptional<z.ZodString>;
247
+ }, z.core.$strip>, z.ZodObject<{
248
+ role: z.ZodLiteral<"assistant">;
249
+ content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
250
+ name: z.ZodOptional<z.ZodString>;
251
+ tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
252
+ type: z.ZodLiteral<"function">;
253
+ id: z.ZodString;
254
+ function: z.ZodObject<{
255
+ arguments: z.ZodString;
256
+ name: z.ZodString;
225
257
  }, z.core.$strip>;
226
258
  }, z.core.$strip>>>;
227
- reasoning: z.ZodMiniOptional<z.ZodMiniString<string>>;
228
- reasoning_content: z.ZodMiniOptional<z.ZodMiniString<string>>;
229
- }, z.core.$strip>, z.ZodMiniObject<{
230
- role: z.ZodMiniLiteral<"tool">;
231
- content: z.ZodMiniString<string>;
232
- tool_call_id: z.ZodMiniString<string>;
259
+ reasoning_content: z.ZodOptional<z.ZodString>;
260
+ }, z.core.$strip>, z.ZodObject<{
261
+ role: z.ZodLiteral<"tool">;
262
+ content: z.ZodString;
263
+ tool_call_id: z.ZodString;
233
264
  }, z.core.$strip>]>>;
234
- tools: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
235
- type: z.ZodMiniLiteral<"function">;
236
- function: z.ZodMiniObject<{
237
- name: z.ZodMiniString<string>;
238
- description: z.ZodMiniOptional<z.ZodMiniString<string>>;
239
- parameters: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniAny>;
265
+ tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
266
+ type: z.ZodLiteral<"function">;
267
+ function: z.ZodObject<{
268
+ name: z.ZodString;
269
+ description: z.ZodOptional<z.ZodString>;
270
+ parameters: z.ZodRecord<z.ZodString, z.ZodAny>;
240
271
  }, z.core.$strip>;
241
272
  }, z.core.$strip>>>;
242
- tool_choice: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"none">, z.ZodMiniLiteral<"auto">, z.ZodMiniLiteral<"required">, z.ZodMiniObject<{
243
- type: z.ZodMiniLiteral<"function">;
244
- function: z.ZodMiniObject<{
245
- name: z.ZodMiniString<string>;
273
+ tool_choice: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"auto">, z.ZodLiteral<"required">, z.ZodObject<{
274
+ type: z.ZodLiteral<"function">;
275
+ function: z.ZodObject<{
276
+ name: z.ZodString;
246
277
  }, z.core.$strip>;
247
278
  }, z.core.$strip>]>>;
248
- temperature: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
249
- model: z.ZodMiniString<string>;
250
- stream: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
251
- }, z.core.$strip>;
252
- export type CompletionsBody = z.infer<typeof CompletionsBodySchema>;
253
- export declare const CompletionsFinishReasonSchema: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"stop">, z.ZodMiniLiteral<"length">, z.ZodMiniLiteral<"content_filter">, z.ZodMiniLiteral<"tool_calls">]>;
254
- export type CompletionsFinishReason = z.infer<typeof CompletionsFinishReasonSchema>;
255
- export declare const CompletionsChoiceSchema: z.ZodMiniObject<{
256
- index: z.ZodMiniNumber<number>;
257
- message: z.ZodMiniObject<{
258
- role: z.ZodMiniLiteral<"assistant">;
259
- content: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNull]>;
260
- tool_calls: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
261
- type: z.ZodMiniLiteral<"function">;
262
- id: z.ZodMiniString<string>;
263
- function: z.ZodMiniObject<{
264
- arguments: z.ZodMiniString<string>;
265
- name: z.ZodMiniString<string>;
279
+ temperature: z.ZodOptional<z.ZodNumber>;
280
+ max_tokens: z.ZodOptional<z.ZodInt>;
281
+ max_completion_tokens: z.ZodOptional<z.ZodInt>;
282
+ frequency_penalty: z.ZodOptional<z.ZodNumber>;
283
+ presence_penalty: z.ZodOptional<z.ZodNumber>;
284
+ seed: z.ZodOptional<z.ZodInt>;
285
+ stop: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
286
+ top_p: z.ZodOptional<z.ZodNumber>;
287
+ reasoning_effort: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"minimal">, z.ZodLiteral<"low">, z.ZodLiteral<"medium">, z.ZodLiteral<"high">, z.ZodLiteral<"xhigh">]>>;
288
+ reasoning: z.ZodOptional<z.ZodObject<{
289
+ enabled: z.ZodOptional<z.ZodBoolean>;
290
+ effort: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodLiteral<"minimal">, z.ZodLiteral<"low">, z.ZodLiteral<"medium">, z.ZodLiteral<"high">, z.ZodLiteral<"xhigh">]>>;
291
+ max_tokens: z.ZodOptional<z.ZodNumber>;
292
+ exclude: z.ZodOptional<z.ZodBoolean>;
293
+ }, z.core.$strip>>;
294
+ model: z.ZodString;
295
+ stream: z.ZodOptional<z.ZodBoolean>;
296
+ }, z.core.$loose>;
297
+ export type ChatCompletionsBody = z.infer<typeof ChatCompletionsBodySchema>;
298
+ export declare const ChatCompletionsFinishReasonSchema: z.ZodUnion<readonly [z.ZodLiteral<"stop">, z.ZodLiteral<"length">, z.ZodLiteral<"content_filter">, z.ZodLiteral<"tool_calls">]>;
299
+ export type ChatCompletionsFinishReason = z.infer<typeof ChatCompletionsFinishReasonSchema>;
300
+ export declare const ChatCompletionsChoiceSchema: z.ZodObject<{
301
+ index: z.ZodInt;
302
+ message: z.ZodObject<{
303
+ role: z.ZodLiteral<"assistant">;
304
+ content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
305
+ name: z.ZodOptional<z.ZodString>;
306
+ tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
307
+ type: z.ZodLiteral<"function">;
308
+ id: z.ZodString;
309
+ function: z.ZodObject<{
310
+ arguments: z.ZodString;
311
+ name: z.ZodString;
266
312
  }, z.core.$strip>;
267
313
  }, z.core.$strip>>>;
268
- reasoning: z.ZodMiniOptional<z.ZodMiniString<string>>;
269
- reasoning_content: z.ZodMiniOptional<z.ZodMiniString<string>>;
314
+ reasoning_content: z.ZodOptional<z.ZodString>;
270
315
  }, z.core.$strip>;
271
- finish_reason: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"stop">, z.ZodMiniLiteral<"length">, z.ZodMiniLiteral<"content_filter">, z.ZodMiniLiteral<"tool_calls">]>;
272
- logprobs: z.ZodMiniOptional<z.ZodMiniAny>;
316
+ finish_reason: z.ZodUnion<readonly [z.ZodLiteral<"stop">, z.ZodLiteral<"length">, z.ZodLiteral<"content_filter">, z.ZodLiteral<"tool_calls">]>;
317
+ logprobs: z.ZodOptional<z.ZodAny>;
273
318
  }, z.core.$strip>;
274
- export type CompletionsChoice = z.infer<typeof CompletionsChoiceSchema>;
275
- export declare const CompletionsUsageSchema: z.ZodMiniObject<{
276
- prompt_tokens: z.ZodMiniNumber<number>;
277
- completion_tokens: z.ZodMiniNumber<number>;
278
- total_tokens: z.ZodMiniNumber<number>;
279
- completion_tokens_details: z.ZodMiniOptional<z.ZodMiniObject<{
280
- reasoning_tokens: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
319
+ export type ChatCompletionsChoice = z.infer<typeof ChatCompletionsChoiceSchema>;
320
+ export declare const ChatCompletionsUsageSchema: z.ZodObject<{
321
+ prompt_tokens: z.ZodOptional<z.ZodInt>;
322
+ completion_tokens: z.ZodOptional<z.ZodInt>;
323
+ total_tokens: z.ZodOptional<z.ZodInt>;
324
+ completion_tokens_details: z.ZodOptional<z.ZodObject<{
325
+ reasoning_tokens: z.ZodOptional<z.ZodInt>;
281
326
  }, z.core.$strip>>;
282
- prompt_tokens_details: z.ZodMiniOptional<z.ZodMiniObject<{
283
- cached_tokens: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
327
+ prompt_tokens_details: z.ZodOptional<z.ZodObject<{
328
+ cached_tokens: z.ZodOptional<z.ZodInt>;
284
329
  }, z.core.$strip>>;
285
330
  }, z.core.$strip>;
286
- export type CompletionsUsage = z.infer<typeof CompletionsUsageSchema>;
287
- export declare const CompletionsSchema: z.ZodMiniObject<{
288
- id: z.ZodMiniString<string>;
289
- object: z.ZodMiniLiteral<"chat.completion">;
290
- created: z.ZodMiniNumber<number>;
291
- model: z.ZodMiniString<string>;
292
- choices: z.ZodMiniArray<z.ZodMiniObject<{
293
- index: z.ZodMiniNumber<number>;
294
- message: z.ZodMiniObject<{
295
- role: z.ZodMiniLiteral<"assistant">;
296
- content: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNull]>;
297
- tool_calls: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
298
- type: z.ZodMiniLiteral<"function">;
299
- id: z.ZodMiniString<string>;
300
- function: z.ZodMiniObject<{
301
- arguments: z.ZodMiniString<string>;
302
- name: z.ZodMiniString<string>;
331
+ export type ChatCompletionsUsage = z.infer<typeof ChatCompletionsUsageSchema>;
332
+ export declare const ChatCompletionsSchema: z.ZodObject<{
333
+ id: z.ZodString;
334
+ object: z.ZodLiteral<"chat.completion">;
335
+ created: z.ZodInt;
336
+ model: z.ZodString;
337
+ choices: z.ZodArray<z.ZodObject<{
338
+ index: z.ZodInt;
339
+ message: z.ZodObject<{
340
+ role: z.ZodLiteral<"assistant">;
341
+ content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
342
+ name: z.ZodOptional<z.ZodString>;
343
+ tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
344
+ type: z.ZodLiteral<"function">;
345
+ id: z.ZodString;
346
+ function: z.ZodObject<{
347
+ arguments: z.ZodString;
348
+ name: z.ZodString;
303
349
  }, z.core.$strip>;
304
350
  }, z.core.$strip>>>;
305
- reasoning: z.ZodMiniOptional<z.ZodMiniString<string>>;
306
- reasoning_content: z.ZodMiniOptional<z.ZodMiniString<string>>;
351
+ reasoning_content: z.ZodOptional<z.ZodString>;
352
+ }, z.core.$strip>;
353
+ finish_reason: z.ZodUnion<readonly [z.ZodLiteral<"stop">, z.ZodLiteral<"length">, z.ZodLiteral<"content_filter">, z.ZodLiteral<"tool_calls">]>;
354
+ logprobs: z.ZodOptional<z.ZodAny>;
355
+ }, z.core.$strip>>;
356
+ usage: z.ZodNullable<z.ZodObject<{
357
+ prompt_tokens: z.ZodOptional<z.ZodInt>;
358
+ completion_tokens: z.ZodOptional<z.ZodInt>;
359
+ total_tokens: z.ZodOptional<z.ZodInt>;
360
+ completion_tokens_details: z.ZodOptional<z.ZodObject<{
361
+ reasoning_tokens: z.ZodOptional<z.ZodInt>;
362
+ }, z.core.$strip>>;
363
+ prompt_tokens_details: z.ZodOptional<z.ZodObject<{
364
+ cached_tokens: z.ZodOptional<z.ZodInt>;
365
+ }, z.core.$strip>>;
366
+ }, z.core.$strip>>;
367
+ provider_metadata: z.ZodOptional<z.ZodAny>;
368
+ }, z.core.$strip>;
369
+ export type ChatCompletions = z.infer<typeof ChatCompletionsSchema>;
370
+ export declare const ChatCompletionsToolCallDeltaSchema: z.ZodObject<{
371
+ type: z.ZodOptional<z.ZodLiteral<"function">>;
372
+ id: z.ZodOptional<z.ZodString>;
373
+ function: z.ZodOptional<z.ZodObject<{
374
+ arguments: z.ZodString;
375
+ name: z.ZodString;
376
+ }, z.core.$strip>>;
377
+ index: z.ZodInt;
378
+ }, z.core.$strip>;
379
+ export type ChatCompletionsToolCallDelta = z.infer<typeof ChatCompletionsToolCallDeltaSchema>;
380
+ export declare const ChatCompletionsAssistantMessageDeltaSchema: z.ZodObject<{
381
+ role: z.ZodOptional<z.ZodLiteral<"assistant">>;
382
+ content: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>>;
383
+ name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
384
+ reasoning_content: z.ZodOptional<z.ZodOptional<z.ZodString>>;
385
+ tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
386
+ type: z.ZodOptional<z.ZodLiteral<"function">>;
387
+ id: z.ZodOptional<z.ZodString>;
388
+ function: z.ZodOptional<z.ZodObject<{
389
+ arguments: z.ZodString;
390
+ name: z.ZodString;
391
+ }, z.core.$strip>>;
392
+ index: z.ZodInt;
393
+ }, z.core.$strip>>>;
394
+ }, z.core.$strip>;
395
+ export type ChatCompletionsAssistantMessageDelta = z.infer<typeof ChatCompletionsAssistantMessageDeltaSchema>;
396
+ export declare const ChatCompletionsChoiceDeltaSchema: z.ZodObject<{
397
+ index: z.ZodInt;
398
+ delta: z.ZodObject<{
399
+ role: z.ZodOptional<z.ZodLiteral<"assistant">>;
400
+ content: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>>;
401
+ name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
402
+ reasoning_content: z.ZodOptional<z.ZodOptional<z.ZodString>>;
403
+ tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
404
+ type: z.ZodOptional<z.ZodLiteral<"function">>;
405
+ id: z.ZodOptional<z.ZodString>;
406
+ function: z.ZodOptional<z.ZodObject<{
407
+ arguments: z.ZodString;
408
+ name: z.ZodString;
409
+ }, z.core.$strip>>;
410
+ index: z.ZodInt;
411
+ }, z.core.$strip>>>;
412
+ }, z.core.$strip>;
413
+ finish_reason: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<"stop">, z.ZodLiteral<"length">, z.ZodLiteral<"content_filter">, z.ZodLiteral<"tool_calls">]>>;
414
+ logprobs: z.ZodOptional<z.ZodAny>;
415
+ }, z.core.$strip>;
416
+ export type ChatCompletionsChoiceDelta = z.infer<typeof ChatCompletionsChoiceDeltaSchema>;
417
+ export declare const ChatCompletionsChunkSchema: z.ZodObject<{
418
+ id: z.ZodString;
419
+ object: z.ZodLiteral<"chat.completion.chunk">;
420
+ created: z.ZodInt;
421
+ model: z.ZodString;
422
+ choices: z.ZodArray<z.ZodObject<{
423
+ index: z.ZodInt;
424
+ delta: z.ZodObject<{
425
+ role: z.ZodOptional<z.ZodLiteral<"assistant">>;
426
+ content: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>>;
427
+ name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
428
+ reasoning_content: z.ZodOptional<z.ZodOptional<z.ZodString>>;
429
+ tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
430
+ type: z.ZodOptional<z.ZodLiteral<"function">>;
431
+ id: z.ZodOptional<z.ZodString>;
432
+ function: z.ZodOptional<z.ZodObject<{
433
+ arguments: z.ZodString;
434
+ name: z.ZodString;
435
+ }, z.core.$strip>>;
436
+ index: z.ZodInt;
437
+ }, z.core.$strip>>>;
307
438
  }, z.core.$strip>;
308
- finish_reason: z.ZodMiniUnion<readonly [z.ZodMiniLiteral<"stop">, z.ZodMiniLiteral<"length">, z.ZodMiniLiteral<"content_filter">, z.ZodMiniLiteral<"tool_calls">]>;
309
- logprobs: z.ZodMiniOptional<z.ZodMiniAny>;
439
+ finish_reason: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<"stop">, z.ZodLiteral<"length">, z.ZodLiteral<"content_filter">, z.ZodLiteral<"tool_calls">]>>;
440
+ logprobs: z.ZodOptional<z.ZodAny>;
310
441
  }, z.core.$strip>>;
311
- usage: z.ZodMiniOptional<z.ZodMiniObject<{
312
- prompt_tokens: z.ZodMiniNumber<number>;
313
- completion_tokens: z.ZodMiniNumber<number>;
314
- total_tokens: z.ZodMiniNumber<number>;
315
- completion_tokens_details: z.ZodMiniOptional<z.ZodMiniObject<{
316
- reasoning_tokens: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
442
+ usage: z.ZodNullable<z.ZodObject<{
443
+ prompt_tokens: z.ZodOptional<z.ZodInt>;
444
+ completion_tokens: z.ZodOptional<z.ZodInt>;
445
+ total_tokens: z.ZodOptional<z.ZodInt>;
446
+ completion_tokens_details: z.ZodOptional<z.ZodObject<{
447
+ reasoning_tokens: z.ZodOptional<z.ZodInt>;
317
448
  }, z.core.$strip>>;
318
- prompt_tokens_details: z.ZodMiniOptional<z.ZodMiniObject<{
319
- cached_tokens: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
449
+ prompt_tokens_details: z.ZodOptional<z.ZodObject<{
450
+ cached_tokens: z.ZodOptional<z.ZodInt>;
320
451
  }, z.core.$strip>>;
321
452
  }, z.core.$strip>>;
322
- system_fingerprint: z.ZodMiniOptional<z.ZodMiniString<string>>;
323
- providerMetadata: z.ZodMiniOptional<z.ZodMiniAny>;
453
+ provider_metadata: z.ZodOptional<z.ZodAny>;
324
454
  }, z.core.$strip>;
325
- export type Completions = z.infer<typeof CompletionsSchema>;
326
- export type CompletionsToolCallDelta = {
327
- id: string;
328
- index: number;
329
- type: "function";
330
- function: {
331
- name: string;
332
- arguments: string;
333
- };
334
- };
455
+ export type ChatCompletionsChunk = z.infer<typeof ChatCompletionsChunkSchema>;
456
+ export {};