@orq-ai/node 4.15.0-rc.53 → 4.15.0-rc.54

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 (137) hide show
  1. package/FUNCTIONS.md +38 -3
  2. package/README.md +252 -71
  3. package/examples/deploymentsInvoke.example.ts +62 -0
  4. package/funcs/deploymentsInvoke.d.ts +18 -0
  5. package/funcs/deploymentsInvoke.d.ts.map +1 -0
  6. package/funcs/deploymentsInvoke.js +116 -0
  7. package/funcs/deploymentsInvoke.js.map +1 -0
  8. package/funcs/deploymentsStream.d.ts +18 -0
  9. package/funcs/deploymentsStream.d.ts.map +1 -0
  10. package/funcs/deploymentsStream.js +129 -0
  11. package/funcs/deploymentsStream.js.map +1 -0
  12. package/funcs/skillsUpdate.d.ts +1 -1
  13. package/funcs/skillsUpdate.js +1 -1
  14. package/jsr.json +1 -1
  15. package/lib/config.d.ts +2 -2
  16. package/lib/config.js +2 -2
  17. package/models/components/agentresponserequest.d.ts +8 -8
  18. package/models/components/agentresponserequest.d.ts.map +1 -1
  19. package/models/components/agentresponserequest.js +10 -9
  20. package/models/components/agentresponserequest.js.map +1 -1
  21. package/models/components/agentthoughtstreamingevent.d.ts +12 -12
  22. package/models/components/agentthoughtstreamingevent.d.ts.map +1 -1
  23. package/models/components/agentthoughtstreamingevent.js +17 -17
  24. package/models/components/agentthoughtstreamingevent.js.map +1 -1
  25. package/models/components/index.d.ts +1 -0
  26. package/models/components/index.d.ts.map +1 -1
  27. package/models/components/index.js +1 -0
  28. package/models/components/index.js.map +1 -1
  29. package/models/components/invokedeploymentrequest.d.ts +1544 -0
  30. package/models/components/invokedeploymentrequest.d.ts.map +1 -0
  31. package/models/components/invokedeploymentrequest.js +1109 -0
  32. package/models/components/invokedeploymentrequest.js.map +1 -0
  33. package/models/components/reasoningpart.js +1 -1
  34. package/models/components/searchknowledgerequest.d.ts +176 -176
  35. package/models/components/searchknowledgerequest.d.ts.map +1 -1
  36. package/models/components/searchknowledgerequest.js +211 -222
  37. package/models/components/searchknowledgerequest.js.map +1 -1
  38. package/models/components/updatememorystorerequest.d.ts +5 -0
  39. package/models/components/updatememorystorerequest.d.ts.map +1 -1
  40. package/models/components/updatememorystorerequest.js +6 -0
  41. package/models/components/updatememorystorerequest.js.map +1 -1
  42. package/models/components/updateskillrequest.d.ts +1 -1
  43. package/models/operations/createchatcompletion.d.ts +58 -58
  44. package/models/operations/createchatcompletion.d.ts.map +1 -1
  45. package/models/operations/createchatcompletion.js +81 -80
  46. package/models/operations/createchatcompletion.js.map +1 -1
  47. package/models/operations/createdataset.js +1 -1
  48. package/models/operations/createdatasetitem.js +5 -5
  49. package/models/operations/createprompt.d.ts +4 -4
  50. package/models/operations/createprompt.d.ts.map +1 -1
  51. package/models/operations/createprompt.js +5 -6
  52. package/models/operations/createprompt.js.map +1 -1
  53. package/models/operations/createtool.js +4 -4
  54. package/models/operations/deploymentgetconfig.d.ts +442 -442
  55. package/models/operations/deploymentgetconfig.d.ts.map +1 -1
  56. package/models/operations/deploymentgetconfig.js +481 -485
  57. package/models/operations/deploymentgetconfig.js.map +1 -1
  58. package/models/operations/deploymentinvoke.d.ts +367 -0
  59. package/models/operations/deploymentinvoke.d.ts.map +1 -0
  60. package/models/operations/deploymentinvoke.js +373 -0
  61. package/models/operations/deploymentinvoke.js.map +1 -0
  62. package/models/operations/deployments.d.ts +16 -16
  63. package/models/operations/deployments.d.ts.map +1 -1
  64. package/models/operations/deployments.js +16 -18
  65. package/models/operations/deployments.js.map +1 -1
  66. package/models/operations/deploymentstream.d.ts +1899 -0
  67. package/models/operations/deploymentstream.d.ts.map +1 -0
  68. package/models/operations/deploymentstream.js +1488 -0
  69. package/models/operations/deploymentstream.js.map +1 -0
  70. package/models/operations/getalltools.js +4 -4
  71. package/models/operations/getv2humanevalsets.js +2 -2
  72. package/models/operations/getv2humanevalsetsid.js +2 -2
  73. package/models/operations/index.d.ts +2 -0
  74. package/models/operations/index.d.ts.map +1 -1
  75. package/models/operations/index.js +2 -0
  76. package/models/operations/index.js.map +1 -1
  77. package/models/operations/listdatasetdatapoints.js +5 -5
  78. package/models/operations/listdatasets.js +1 -1
  79. package/models/operations/patchv2humanevalsetsid.js +2 -2
  80. package/models/operations/postv2feedbackevaluation.js +4 -4
  81. package/models/operations/postv2humanevalsets.js +2 -2
  82. package/models/operations/retrievedatapoint.js +5 -5
  83. package/models/operations/retrievedataset.js +1 -1
  84. package/models/operations/retrievetool.js +4 -4
  85. package/models/operations/runagent.js +1 -1
  86. package/models/operations/streamrunagent.js +1 -1
  87. package/models/operations/updatedatapoint.js +5 -5
  88. package/models/operations/updatedataset.js +1 -1
  89. package/models/operations/updatetool.js +4 -4
  90. package/package.json +7 -7
  91. package/sdk/deployments.d.ts +16 -0
  92. package/sdk/deployments.d.ts.map +1 -1
  93. package/sdk/deployments.js +20 -0
  94. package/sdk/deployments.js.map +1 -1
  95. package/sdk/skills.d.ts +1 -1
  96. package/sdk/skills.js +1 -1
  97. package/src/funcs/deploymentsInvoke.ts +170 -0
  98. package/src/funcs/deploymentsStream.ts +180 -0
  99. package/src/funcs/skillsUpdate.ts +1 -1
  100. package/src/lib/config.ts +2 -2
  101. package/src/models/components/agentresponserequest.ts +17 -12
  102. package/src/models/components/agentthoughtstreamingevent.ts +55 -43
  103. package/src/models/components/index.ts +1 -0
  104. package/src/models/components/invokedeploymentrequest.ts +3444 -0
  105. package/src/models/components/reasoningpart.ts +1 -1
  106. package/src/models/components/searchknowledgerequest.ts +680 -469
  107. package/src/models/components/updatememorystorerequest.ts +11 -0
  108. package/src/models/components/updateskillrequest.ts +1 -1
  109. package/src/models/operations/createchatcompletion.ts +313 -248
  110. package/src/models/operations/createdataset.ts +1 -1
  111. package/src/models/operations/createdatasetitem.ts +5 -5
  112. package/src/models/operations/createprompt.ts +7 -6
  113. package/src/models/operations/createtool.ts +4 -4
  114. package/src/models/operations/deploymentgetconfig.ts +1631 -1141
  115. package/src/models/operations/deploymentinvoke.ts +732 -0
  116. package/src/models/operations/deployments.ts +46 -42
  117. package/src/models/operations/deploymentstream.ts +4102 -0
  118. package/src/models/operations/getalltools.ts +4 -4
  119. package/src/models/operations/getv2humanevalsets.ts +2 -2
  120. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  121. package/src/models/operations/index.ts +2 -0
  122. package/src/models/operations/listdatasetdatapoints.ts +5 -5
  123. package/src/models/operations/listdatasets.ts +1 -1
  124. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  125. package/src/models/operations/postv2feedbackevaluation.ts +4 -4
  126. package/src/models/operations/postv2humanevalsets.ts +2 -2
  127. package/src/models/operations/retrievedatapoint.ts +5 -5
  128. package/src/models/operations/retrievedataset.ts +1 -1
  129. package/src/models/operations/retrievetool.ts +4 -4
  130. package/src/models/operations/runagent.ts +1 -1
  131. package/src/models/operations/streamrunagent.ts +1 -1
  132. package/src/models/operations/updatedatapoint.ts +5 -5
  133. package/src/models/operations/updatedataset.ts +1 -1
  134. package/src/models/operations/updatetool.ts +4 -4
  135. package/src/sdk/deployments.ts +38 -0
  136. package/src/sdk/skills.ts +1 -1
  137. package/examples/deploymentsList.example.ts +0 -26
@@ -1169,28 +1169,28 @@ export type CreateChatCompletion1In = {
1169
1169
  /**
1170
1170
  * Less than or equal to
1171
1171
  */
1172
- export type OneLte = {
1172
+ export type CreateChatCompletion1Lte = {
1173
1173
  lte: number;
1174
1174
  };
1175
1175
 
1176
1176
  /**
1177
1177
  * Less than
1178
1178
  */
1179
- export type OneLt = {
1179
+ export type CreateChatCompletion1Lt = {
1180
1180
  lt: number;
1181
1181
  };
1182
1182
 
1183
1183
  /**
1184
1184
  * Greater than or equal to
1185
1185
  */
1186
- export type OneGte = {
1186
+ export type CreateChatCompletion1Gte = {
1187
1187
  gte: number;
1188
1188
  };
1189
1189
 
1190
1190
  /**
1191
1191
  * Greater than
1192
1192
  */
1193
- export type OneGt = {
1193
+ export type CreateChatCompletion1Gt = {
1194
1194
  gt: number;
1195
1195
  };
1196
1196
 
@@ -1221,10 +1221,10 @@ export type CreateChatCompletion1Eq = {
1221
1221
  export type FilterBy1 =
1222
1222
  | CreateChatCompletion1Eq
1223
1223
  | CreateChatCompletion1Ne
1224
- | OneGt
1225
- | OneGte
1226
- | OneLt
1227
- | OneLte
1224
+ | CreateChatCompletion1Gt
1225
+ | CreateChatCompletion1Gte
1226
+ | CreateChatCompletion1Lt
1227
+ | CreateChatCompletion1Lte
1228
1228
  | CreateChatCompletion1In
1229
1229
  | CreateChatCompletion1Nin;
1230
1230
 
@@ -1235,10 +1235,10 @@ export type FilterBy = FilterByAnd | FilterByOr | {
1235
1235
  [k: string]:
1236
1236
  | CreateChatCompletion1Eq
1237
1237
  | CreateChatCompletion1Ne
1238
- | OneGt
1239
- | OneGte
1240
- | OneLt
1241
- | OneLte
1238
+ | CreateChatCompletion1Gt
1239
+ | CreateChatCompletion1Gte
1240
+ | CreateChatCompletion1Lt
1241
+ | CreateChatCompletion1Lte
1242
1242
  | CreateChatCompletion1In
1243
1243
  | CreateChatCompletion1Nin;
1244
1244
  };
@@ -1309,10 +1309,10 @@ export type CreateChatCompletionKnowledgeBases = {
1309
1309
  [k: string]:
1310
1310
  | CreateChatCompletion1Eq
1311
1311
  | CreateChatCompletion1Ne
1312
- | OneGt
1313
- | OneGte
1314
- | OneLt
1315
- | OneLte
1312
+ | CreateChatCompletion1Gt
1313
+ | CreateChatCompletion1Gte
1314
+ | CreateChatCompletion1Lt
1315
+ | CreateChatCompletion1Lte
1316
1316
  | CreateChatCompletion1In
1317
1317
  | CreateChatCompletion1Nin;
1318
1318
  } | undefined;
@@ -1821,7 +1821,7 @@ export type Delta = {
1821
1821
  | undefined;
1822
1822
  };
1823
1823
 
1824
- export type CreateChatCompletionChoices = {
1824
+ export type CreateChatCompletionRouterChatCompletionsChoices = {
1825
1825
  /**
1826
1826
  * The reason the model stopped generating tokens.
1827
1827
  */
@@ -1840,7 +1840,7 @@ export type CreateChatCompletionChoices = {
1840
1840
  delta: Delta;
1841
1841
  };
1842
1842
 
1843
- export type CreateChatCompletionPromptTokensDetails = {
1843
+ export type CreateChatCompletionRouterChatCompletionsPromptTokensDetails = {
1844
1844
  cachedTokens?: number | null | undefined;
1845
1845
  cacheCreationTokens?: number | null | undefined;
1846
1846
  /**
@@ -1849,7 +1849,7 @@ export type CreateChatCompletionPromptTokensDetails = {
1849
1849
  audioTokens?: number | null | undefined;
1850
1850
  };
1851
1851
 
1852
- export type CreateChatCompletionCompletionTokensDetails = {
1852
+ export type CreateChatCompletionRouterChatCompletionsCompletionTokensDetails = {
1853
1853
  reasoningTokens?: number | null | undefined;
1854
1854
  acceptedPredictionTokens?: number | null | undefined;
1855
1855
  rejectedPredictionTokens?: number | null | undefined;
@@ -1862,7 +1862,7 @@ export type CreateChatCompletionCompletionTokensDetails = {
1862
1862
  /**
1863
1863
  * Usage statistics for the completion request.
1864
1864
  */
1865
- export type CreateChatCompletionUsage = {
1865
+ export type CreateChatCompletionRouterChatCompletionsUsage = {
1866
1866
  /**
1867
1867
  * Number of tokens in the generated completion.
1868
1868
  */
@@ -1876,11 +1876,11 @@ export type CreateChatCompletionUsage = {
1876
1876
  */
1877
1877
  totalTokens?: number | undefined;
1878
1878
  promptTokensDetails?:
1879
- | CreateChatCompletionPromptTokensDetails
1879
+ | CreateChatCompletionRouterChatCompletionsPromptTokensDetails
1880
1880
  | null
1881
1881
  | undefined;
1882
1882
  completionTokensDetails?:
1883
- | CreateChatCompletionCompletionTokensDetails
1883
+ | CreateChatCompletionRouterChatCompletionsCompletionTokensDetails
1884
1884
  | null
1885
1885
  | undefined;
1886
1886
  };
@@ -1903,7 +1903,7 @@ export type CreateChatCompletionData = {
1903
1903
  /**
1904
1904
  * A list of chat completion choices. Can contain more than one elements if n is greater than 1. Can also be empty for the last chunk if you set stream_options: {"include_usage": true}.
1905
1905
  */
1906
- choices: Array<CreateChatCompletionChoices>;
1906
+ choices: Array<CreateChatCompletionRouterChatCompletionsChoices>;
1907
1907
  /**
1908
1908
  * The Unix timestamp (in seconds) of when the chat completion was created.
1909
1909
  */
@@ -1919,7 +1919,7 @@ export type CreateChatCompletionData = {
1919
1919
  /**
1920
1920
  * Usage statistics for the completion request.
1921
1921
  */
1922
- usage?: CreateChatCompletionUsage | null | undefined;
1922
+ usage?: CreateChatCompletionRouterChatCompletionsUsage | null | undefined;
1923
1923
  object: CreateChatCompletionRouterChatCompletionsObject;
1924
1924
  };
1925
1925
 
@@ -1997,7 +1997,7 @@ export type CreateChatCompletionRouterChatCompletionsAudio = {
1997
1997
  /**
1998
1998
  * A chat completion message generated by the model.
1999
1999
  */
2000
- export type Message = {
2000
+ export type CreateChatCompletionMessage = {
2001
2001
  content?: string | null | undefined;
2002
2002
  refusal?: string | null | undefined;
2003
2003
  toolCalls?: Array<CreateChatCompletionToolCalls> | undefined;
@@ -2102,7 +2102,7 @@ export type Logprobs = {
2102
2102
  refusal: Array<Refusal> | null;
2103
2103
  };
2104
2104
 
2105
- export type Choices = {
2105
+ export type CreateChatCompletionChoices = {
2106
2106
  /**
2107
2107
  * The reason the model stopped generating tokens.
2108
2108
  */
@@ -2114,14 +2114,14 @@ export type Choices = {
2114
2114
  /**
2115
2115
  * A chat completion message generated by the model.
2116
2116
  */
2117
- message: Message;
2117
+ message: CreateChatCompletionMessage;
2118
2118
  /**
2119
2119
  * Log probability information for the choice.
2120
2120
  */
2121
2121
  logprobs?: Logprobs | null | undefined;
2122
2122
  };
2123
2123
 
2124
- export type PromptTokensDetails = {
2124
+ export type CreateChatCompletionPromptTokensDetails = {
2125
2125
  cachedTokens?: number | null | undefined;
2126
2126
  cacheCreationTokens?: number | null | undefined;
2127
2127
  /**
@@ -2130,7 +2130,7 @@ export type PromptTokensDetails = {
2130
2130
  audioTokens?: number | null | undefined;
2131
2131
  };
2132
2132
 
2133
- export type CompletionTokensDetails = {
2133
+ export type CreateChatCompletionCompletionTokensDetails = {
2134
2134
  reasoningTokens?: number | null | undefined;
2135
2135
  acceptedPredictionTokens?: number | null | undefined;
2136
2136
  rejectedPredictionTokens?: number | null | undefined;
@@ -2143,7 +2143,7 @@ export type CompletionTokensDetails = {
2143
2143
  /**
2144
2144
  * Usage statistics for the completion request.
2145
2145
  */
2146
- export type Usage = {
2146
+ export type CreateChatCompletionUsage = {
2147
2147
  /**
2148
2148
  * Number of tokens in the generated completion.
2149
2149
  */
@@ -2156,8 +2156,14 @@ export type Usage = {
2156
2156
  * Total number of tokens used in the request (prompt + completion).
2157
2157
  */
2158
2158
  totalTokens?: number | undefined;
2159
- promptTokensDetails?: PromptTokensDetails | null | undefined;
2160
- completionTokensDetails?: CompletionTokensDetails | null | undefined;
2159
+ promptTokensDetails?:
2160
+ | CreateChatCompletionPromptTokensDetails
2161
+ | null
2162
+ | undefined;
2163
+ completionTokensDetails?:
2164
+ | CreateChatCompletionCompletionTokensDetails
2165
+ | null
2166
+ | undefined;
2161
2167
  };
2162
2168
 
2163
2169
  export const CreateChatCompletionObject = {
@@ -2178,7 +2184,7 @@ export type CreateChatCompletionResponseBody = {
2178
2184
  /**
2179
2185
  * A list of chat completion choices. Can be more than one if n is greater than 1.
2180
2186
  */
2181
- choices: Array<Choices>;
2187
+ choices: Array<CreateChatCompletionChoices>;
2182
2188
  /**
2183
2189
  * The Unix timestamp (in seconds) of when the chat completion was created.
2184
2190
  */
@@ -2194,7 +2200,7 @@ export type CreateChatCompletionResponseBody = {
2194
2200
  /**
2195
2201
  * Usage statistics for the completion request.
2196
2202
  */
2197
- usage?: Usage | null | undefined;
2203
+ usage?: CreateChatCompletionUsage | null | undefined;
2198
2204
  object: CreateChatCompletionObject;
2199
2205
  };
2200
2206
 
@@ -4663,75 +4669,91 @@ export function createChatCompletion1InToJSON(
4663
4669
  }
4664
4670
 
4665
4671
  /** @internal */
4666
- export type OneLte$Outbound = {
4672
+ export type CreateChatCompletion1Lte$Outbound = {
4667
4673
  lte: number;
4668
4674
  };
4669
4675
 
4670
4676
  /** @internal */
4671
- export const OneLte$outboundSchema: z.ZodType<
4672
- OneLte$Outbound,
4677
+ export const CreateChatCompletion1Lte$outboundSchema: z.ZodType<
4678
+ CreateChatCompletion1Lte$Outbound,
4673
4679
  z.ZodTypeDef,
4674
- OneLte
4680
+ CreateChatCompletion1Lte
4675
4681
  > = z.object({
4676
4682
  lte: z.number(),
4677
4683
  });
4678
4684
 
4679
- export function oneLteToJSON(oneLte: OneLte): string {
4680
- return JSON.stringify(OneLte$outboundSchema.parse(oneLte));
4685
+ export function createChatCompletion1LteToJSON(
4686
+ createChatCompletion1Lte: CreateChatCompletion1Lte,
4687
+ ): string {
4688
+ return JSON.stringify(
4689
+ CreateChatCompletion1Lte$outboundSchema.parse(createChatCompletion1Lte),
4690
+ );
4681
4691
  }
4682
4692
 
4683
4693
  /** @internal */
4684
- export type OneLt$Outbound = {
4694
+ export type CreateChatCompletion1Lt$Outbound = {
4685
4695
  lt: number;
4686
4696
  };
4687
4697
 
4688
4698
  /** @internal */
4689
- export const OneLt$outboundSchema: z.ZodType<
4690
- OneLt$Outbound,
4699
+ export const CreateChatCompletion1Lt$outboundSchema: z.ZodType<
4700
+ CreateChatCompletion1Lt$Outbound,
4691
4701
  z.ZodTypeDef,
4692
- OneLt
4702
+ CreateChatCompletion1Lt
4693
4703
  > = z.object({
4694
4704
  lt: z.number(),
4695
4705
  });
4696
4706
 
4697
- export function oneLtToJSON(oneLt: OneLt): string {
4698
- return JSON.stringify(OneLt$outboundSchema.parse(oneLt));
4707
+ export function createChatCompletion1LtToJSON(
4708
+ createChatCompletion1Lt: CreateChatCompletion1Lt,
4709
+ ): string {
4710
+ return JSON.stringify(
4711
+ CreateChatCompletion1Lt$outboundSchema.parse(createChatCompletion1Lt),
4712
+ );
4699
4713
  }
4700
4714
 
4701
4715
  /** @internal */
4702
- export type OneGte$Outbound = {
4716
+ export type CreateChatCompletion1Gte$Outbound = {
4703
4717
  gte: number;
4704
4718
  };
4705
4719
 
4706
4720
  /** @internal */
4707
- export const OneGte$outboundSchema: z.ZodType<
4708
- OneGte$Outbound,
4721
+ export const CreateChatCompletion1Gte$outboundSchema: z.ZodType<
4722
+ CreateChatCompletion1Gte$Outbound,
4709
4723
  z.ZodTypeDef,
4710
- OneGte
4724
+ CreateChatCompletion1Gte
4711
4725
  > = z.object({
4712
4726
  gte: z.number(),
4713
4727
  });
4714
4728
 
4715
- export function oneGteToJSON(oneGte: OneGte): string {
4716
- return JSON.stringify(OneGte$outboundSchema.parse(oneGte));
4729
+ export function createChatCompletion1GteToJSON(
4730
+ createChatCompletion1Gte: CreateChatCompletion1Gte,
4731
+ ): string {
4732
+ return JSON.stringify(
4733
+ CreateChatCompletion1Gte$outboundSchema.parse(createChatCompletion1Gte),
4734
+ );
4717
4735
  }
4718
4736
 
4719
4737
  /** @internal */
4720
- export type OneGt$Outbound = {
4738
+ export type CreateChatCompletion1Gt$Outbound = {
4721
4739
  gt: number;
4722
4740
  };
4723
4741
 
4724
4742
  /** @internal */
4725
- export const OneGt$outboundSchema: z.ZodType<
4726
- OneGt$Outbound,
4743
+ export const CreateChatCompletion1Gt$outboundSchema: z.ZodType<
4744
+ CreateChatCompletion1Gt$Outbound,
4727
4745
  z.ZodTypeDef,
4728
- OneGt
4746
+ CreateChatCompletion1Gt
4729
4747
  > = z.object({
4730
4748
  gt: z.number(),
4731
4749
  });
4732
4750
 
4733
- export function oneGtToJSON(oneGt: OneGt): string {
4734
- return JSON.stringify(OneGt$outboundSchema.parse(oneGt));
4751
+ export function createChatCompletion1GtToJSON(
4752
+ createChatCompletion1Gt: CreateChatCompletion1Gt,
4753
+ ): string {
4754
+ return JSON.stringify(
4755
+ CreateChatCompletion1Gt$outboundSchema.parse(createChatCompletion1Gt),
4756
+ );
4735
4757
  }
4736
4758
 
4737
4759
  /** @internal */
@@ -4832,10 +4854,10 @@ export function createChatCompletion1EqToJSON(
4832
4854
  export type FilterBy1$Outbound =
4833
4855
  | CreateChatCompletion1Eq$Outbound
4834
4856
  | CreateChatCompletion1Ne$Outbound
4835
- | OneGt$Outbound
4836
- | OneGte$Outbound
4837
- | OneLt$Outbound
4838
- | OneLte$Outbound
4857
+ | CreateChatCompletion1Gt$Outbound
4858
+ | CreateChatCompletion1Gte$Outbound
4859
+ | CreateChatCompletion1Lt$Outbound
4860
+ | CreateChatCompletion1Lte$Outbound
4839
4861
  | CreateChatCompletion1In$Outbound
4840
4862
  | CreateChatCompletion1Nin$Outbound;
4841
4863
 
@@ -4847,10 +4869,10 @@ export const FilterBy1$outboundSchema: z.ZodType<
4847
4869
  > = z.union([
4848
4870
  z.lazy(() => CreateChatCompletion1Eq$outboundSchema),
4849
4871
  z.lazy(() => CreateChatCompletion1Ne$outboundSchema),
4850
- z.lazy(() => OneGt$outboundSchema),
4851
- z.lazy(() => OneGte$outboundSchema),
4852
- z.lazy(() => OneLt$outboundSchema),
4853
- z.lazy(() => OneLte$outboundSchema),
4872
+ z.lazy(() => CreateChatCompletion1Gt$outboundSchema),
4873
+ z.lazy(() => CreateChatCompletion1Gte$outboundSchema),
4874
+ z.lazy(() => CreateChatCompletion1Lt$outboundSchema),
4875
+ z.lazy(() => CreateChatCompletion1Lte$outboundSchema),
4854
4876
  z.lazy(() => CreateChatCompletion1In$outboundSchema),
4855
4877
  z.lazy(() => CreateChatCompletion1Nin$outboundSchema),
4856
4878
  ]);
@@ -4864,10 +4886,10 @@ export type FilterBy$Outbound = FilterByAnd$Outbound | FilterByOr$Outbound | {
4864
4886
  [k: string]:
4865
4887
  | CreateChatCompletion1Eq$Outbound
4866
4888
  | CreateChatCompletion1Ne$Outbound
4867
- | OneGt$Outbound
4868
- | OneGte$Outbound
4869
- | OneLt$Outbound
4870
- | OneLte$Outbound
4889
+ | CreateChatCompletion1Gt$Outbound
4890
+ | CreateChatCompletion1Gte$Outbound
4891
+ | CreateChatCompletion1Lt$Outbound
4892
+ | CreateChatCompletion1Lte$Outbound
4871
4893
  | CreateChatCompletion1In$Outbound
4872
4894
  | CreateChatCompletion1Nin$Outbound;
4873
4895
  };
@@ -4883,10 +4905,10 @@ export const FilterBy$outboundSchema: z.ZodType<
4883
4905
  z.record(z.union([
4884
4906
  z.lazy(() => CreateChatCompletion1Eq$outboundSchema),
4885
4907
  z.lazy(() => CreateChatCompletion1Ne$outboundSchema),
4886
- z.lazy(() => OneGt$outboundSchema),
4887
- z.lazy(() => OneGte$outboundSchema),
4888
- z.lazy(() => OneLt$outboundSchema),
4889
- z.lazy(() => OneLte$outboundSchema),
4908
+ z.lazy(() => CreateChatCompletion1Gt$outboundSchema),
4909
+ z.lazy(() => CreateChatCompletion1Gte$outboundSchema),
4910
+ z.lazy(() => CreateChatCompletion1Lt$outboundSchema),
4911
+ z.lazy(() => CreateChatCompletion1Lte$outboundSchema),
4890
4912
  z.lazy(() => CreateChatCompletion1In$outboundSchema),
4891
4913
  z.lazy(() => CreateChatCompletion1Nin$outboundSchema),
4892
4914
  ])),
@@ -4981,10 +5003,10 @@ export type CreateChatCompletionKnowledgeBases$Outbound = {
4981
5003
  [k: string]:
4982
5004
  | CreateChatCompletion1Eq$Outbound
4983
5005
  | CreateChatCompletion1Ne$Outbound
4984
- | OneGt$Outbound
4985
- | OneGte$Outbound
4986
- | OneLt$Outbound
4987
- | OneLte$Outbound
5006
+ | CreateChatCompletion1Gt$Outbound
5007
+ | CreateChatCompletion1Gte$Outbound
5008
+ | CreateChatCompletion1Lt$Outbound
5009
+ | CreateChatCompletion1Lte$Outbound
4988
5010
  | CreateChatCompletion1In$Outbound
4989
5011
  | CreateChatCompletion1Nin$Outbound;
4990
5012
  } | undefined;
@@ -5010,10 +5032,10 @@ export const CreateChatCompletionKnowledgeBases$outboundSchema: z.ZodType<
5010
5032
  z.record(z.union([
5011
5033
  z.lazy(() => CreateChatCompletion1Eq$outboundSchema),
5012
5034
  z.lazy(() => CreateChatCompletion1Ne$outboundSchema),
5013
- z.lazy(() => OneGt$outboundSchema),
5014
- z.lazy(() => OneGte$outboundSchema),
5015
- z.lazy(() => OneLt$outboundSchema),
5016
- z.lazy(() => OneLte$outboundSchema),
5035
+ z.lazy(() => CreateChatCompletion1Gt$outboundSchema),
5036
+ z.lazy(() => CreateChatCompletion1Gte$outboundSchema),
5037
+ z.lazy(() => CreateChatCompletion1Lt$outboundSchema),
5038
+ z.lazy(() => CreateChatCompletion1Lte$outboundSchema),
5017
5039
  z.lazy(() => CreateChatCompletion1In$outboundSchema),
5018
5040
  z.lazy(() => CreateChatCompletion1Nin$outboundSchema),
5019
5041
  ])),
@@ -5713,69 +5735,77 @@ export function deltaFromJSON(
5713
5735
  }
5714
5736
 
5715
5737
  /** @internal */
5716
- export const CreateChatCompletionChoices$inboundSchema: z.ZodType<
5717
- CreateChatCompletionChoices,
5718
- z.ZodTypeDef,
5719
- unknown
5720
- > = z.object({
5721
- finish_reason: z.nullable(CreateChatCompletionFinishReason$inboundSchema),
5722
- index: z.number().default(0),
5723
- logprobs: z.nullable(z.lazy(() => CreateChatCompletionLogprobs$inboundSchema))
5724
- .optional(),
5725
- delta: z.lazy(() => Delta$inboundSchema),
5726
- }).transform((v) => {
5727
- return remap$(v, {
5728
- "finish_reason": "finishReason",
5738
+ export const CreateChatCompletionRouterChatCompletionsChoices$inboundSchema:
5739
+ z.ZodType<
5740
+ CreateChatCompletionRouterChatCompletionsChoices,
5741
+ z.ZodTypeDef,
5742
+ unknown
5743
+ > = z.object({
5744
+ finish_reason: z.nullable(CreateChatCompletionFinishReason$inboundSchema),
5745
+ index: z.number().default(0),
5746
+ logprobs: z.nullable(
5747
+ z.lazy(() => CreateChatCompletionLogprobs$inboundSchema),
5748
+ ).optional(),
5749
+ delta: z.lazy(() => Delta$inboundSchema),
5750
+ }).transform((v) => {
5751
+ return remap$(v, {
5752
+ "finish_reason": "finishReason",
5753
+ });
5729
5754
  });
5730
- });
5731
5755
 
5732
- export function createChatCompletionChoicesFromJSON(
5756
+ export function createChatCompletionRouterChatCompletionsChoicesFromJSON(
5733
5757
  jsonString: string,
5734
- ): SafeParseResult<CreateChatCompletionChoices, SDKValidationError> {
5758
+ ): SafeParseResult<
5759
+ CreateChatCompletionRouterChatCompletionsChoices,
5760
+ SDKValidationError
5761
+ > {
5735
5762
  return safeParse(
5736
5763
  jsonString,
5737
- (x) => CreateChatCompletionChoices$inboundSchema.parse(JSON.parse(x)),
5738
- `Failed to parse 'CreateChatCompletionChoices' from JSON`,
5764
+ (x) =>
5765
+ CreateChatCompletionRouterChatCompletionsChoices$inboundSchema.parse(
5766
+ JSON.parse(x),
5767
+ ),
5768
+ `Failed to parse 'CreateChatCompletionRouterChatCompletionsChoices' from JSON`,
5739
5769
  );
5740
5770
  }
5741
5771
 
5742
5772
  /** @internal */
5743
- export const CreateChatCompletionPromptTokensDetails$inboundSchema: z.ZodType<
5744
- CreateChatCompletionPromptTokensDetails,
5745
- z.ZodTypeDef,
5746
- unknown
5747
- > = z.object({
5748
- cached_tokens: z.nullable(z.number().int()).optional(),
5749
- cache_creation_tokens: z.nullable(z.number().int()).optional(),
5750
- audio_tokens: z.nullable(z.number().int()).optional(),
5751
- }).transform((v) => {
5752
- return remap$(v, {
5753
- "cached_tokens": "cachedTokens",
5754
- "cache_creation_tokens": "cacheCreationTokens",
5755
- "audio_tokens": "audioTokens",
5773
+ export const CreateChatCompletionRouterChatCompletionsPromptTokensDetails$inboundSchema:
5774
+ z.ZodType<
5775
+ CreateChatCompletionRouterChatCompletionsPromptTokensDetails,
5776
+ z.ZodTypeDef,
5777
+ unknown
5778
+ > = z.object({
5779
+ cached_tokens: z.nullable(z.number().int()).optional(),
5780
+ cache_creation_tokens: z.nullable(z.number().int()).optional(),
5781
+ audio_tokens: z.nullable(z.number().int()).optional(),
5782
+ }).transform((v) => {
5783
+ return remap$(v, {
5784
+ "cached_tokens": "cachedTokens",
5785
+ "cache_creation_tokens": "cacheCreationTokens",
5786
+ "audio_tokens": "audioTokens",
5787
+ });
5756
5788
  });
5757
- });
5758
5789
 
5759
- export function createChatCompletionPromptTokensDetailsFromJSON(
5790
+ export function createChatCompletionRouterChatCompletionsPromptTokensDetailsFromJSON(
5760
5791
  jsonString: string,
5761
5792
  ): SafeParseResult<
5762
- CreateChatCompletionPromptTokensDetails,
5793
+ CreateChatCompletionRouterChatCompletionsPromptTokensDetails,
5763
5794
  SDKValidationError
5764
5795
  > {
5765
5796
  return safeParse(
5766
5797
  jsonString,
5767
5798
  (x) =>
5768
- CreateChatCompletionPromptTokensDetails$inboundSchema.parse(
5769
- JSON.parse(x),
5770
- ),
5771
- `Failed to parse 'CreateChatCompletionPromptTokensDetails' from JSON`,
5799
+ CreateChatCompletionRouterChatCompletionsPromptTokensDetails$inboundSchema
5800
+ .parse(JSON.parse(x)),
5801
+ `Failed to parse 'CreateChatCompletionRouterChatCompletionsPromptTokensDetails' from JSON`,
5772
5802
  );
5773
5803
  }
5774
5804
 
5775
5805
  /** @internal */
5776
- export const CreateChatCompletionCompletionTokensDetails$inboundSchema:
5806
+ export const CreateChatCompletionRouterChatCompletionsCompletionTokensDetails$inboundSchema:
5777
5807
  z.ZodType<
5778
- CreateChatCompletionCompletionTokensDetails,
5808
+ CreateChatCompletionRouterChatCompletionsCompletionTokensDetails,
5779
5809
  z.ZodTypeDef,
5780
5810
  unknown
5781
5811
  > = z.object({
@@ -5792,54 +5822,64 @@ export const CreateChatCompletionCompletionTokensDetails$inboundSchema:
5792
5822
  });
5793
5823
  });
5794
5824
 
5795
- export function createChatCompletionCompletionTokensDetailsFromJSON(
5825
+ export function createChatCompletionRouterChatCompletionsCompletionTokensDetailsFromJSON(
5796
5826
  jsonString: string,
5797
5827
  ): SafeParseResult<
5798
- CreateChatCompletionCompletionTokensDetails,
5828
+ CreateChatCompletionRouterChatCompletionsCompletionTokensDetails,
5799
5829
  SDKValidationError
5800
5830
  > {
5801
5831
  return safeParse(
5802
5832
  jsonString,
5803
5833
  (x) =>
5804
- CreateChatCompletionCompletionTokensDetails$inboundSchema.parse(
5805
- JSON.parse(x),
5806
- ),
5807
- `Failed to parse 'CreateChatCompletionCompletionTokensDetails' from JSON`,
5834
+ CreateChatCompletionRouterChatCompletionsCompletionTokensDetails$inboundSchema
5835
+ .parse(JSON.parse(x)),
5836
+ `Failed to parse 'CreateChatCompletionRouterChatCompletionsCompletionTokensDetails' from JSON`,
5808
5837
  );
5809
5838
  }
5810
5839
 
5811
5840
  /** @internal */
5812
- export const CreateChatCompletionUsage$inboundSchema: z.ZodType<
5813
- CreateChatCompletionUsage,
5814
- z.ZodTypeDef,
5815
- unknown
5816
- > = z.object({
5817
- completion_tokens: z.number().optional(),
5818
- prompt_tokens: z.number().optional(),
5819
- total_tokens: z.number().optional(),
5820
- prompt_tokens_details: z.nullable(
5821
- z.lazy(() => CreateChatCompletionPromptTokensDetails$inboundSchema),
5822
- ).optional(),
5823
- completion_tokens_details: z.nullable(
5824
- z.lazy(() => CreateChatCompletionCompletionTokensDetails$inboundSchema),
5825
- ).optional(),
5826
- }).transform((v) => {
5827
- return remap$(v, {
5828
- "completion_tokens": "completionTokens",
5829
- "prompt_tokens": "promptTokens",
5830
- "total_tokens": "totalTokens",
5831
- "prompt_tokens_details": "promptTokensDetails",
5832
- "completion_tokens_details": "completionTokensDetails",
5841
+ export const CreateChatCompletionRouterChatCompletionsUsage$inboundSchema:
5842
+ z.ZodType<
5843
+ CreateChatCompletionRouterChatCompletionsUsage,
5844
+ z.ZodTypeDef,
5845
+ unknown
5846
+ > = z.object({
5847
+ completion_tokens: z.number().optional(),
5848
+ prompt_tokens: z.number().optional(),
5849
+ total_tokens: z.number().optional(),
5850
+ prompt_tokens_details: z.nullable(
5851
+ z.lazy(() =>
5852
+ CreateChatCompletionRouterChatCompletionsPromptTokensDetails$inboundSchema
5853
+ ),
5854
+ ).optional(),
5855
+ completion_tokens_details: z.nullable(
5856
+ z.lazy(() =>
5857
+ CreateChatCompletionRouterChatCompletionsCompletionTokensDetails$inboundSchema
5858
+ ),
5859
+ ).optional(),
5860
+ }).transform((v) => {
5861
+ return remap$(v, {
5862
+ "completion_tokens": "completionTokens",
5863
+ "prompt_tokens": "promptTokens",
5864
+ "total_tokens": "totalTokens",
5865
+ "prompt_tokens_details": "promptTokensDetails",
5866
+ "completion_tokens_details": "completionTokensDetails",
5867
+ });
5833
5868
  });
5834
- });
5835
5869
 
5836
- export function createChatCompletionUsageFromJSON(
5870
+ export function createChatCompletionRouterChatCompletionsUsageFromJSON(
5837
5871
  jsonString: string,
5838
- ): SafeParseResult<CreateChatCompletionUsage, SDKValidationError> {
5872
+ ): SafeParseResult<
5873
+ CreateChatCompletionRouterChatCompletionsUsage,
5874
+ SDKValidationError
5875
+ > {
5839
5876
  return safeParse(
5840
5877
  jsonString,
5841
- (x) => CreateChatCompletionUsage$inboundSchema.parse(JSON.parse(x)),
5842
- `Failed to parse 'CreateChatCompletionUsage' from JSON`,
5878
+ (x) =>
5879
+ CreateChatCompletionRouterChatCompletionsUsage$inboundSchema.parse(
5880
+ JSON.parse(x),
5881
+ ),
5882
+ `Failed to parse 'CreateChatCompletionRouterChatCompletionsUsage' from JSON`,
5843
5883
  );
5844
5884
  }
5845
5885
 
@@ -5855,12 +5895,17 @@ export const CreateChatCompletionData$inboundSchema: z.ZodType<
5855
5895
  unknown
5856
5896
  > = z.object({
5857
5897
  id: z.string(),
5858
- choices: z.array(z.lazy(() => CreateChatCompletionChoices$inboundSchema)),
5898
+ choices: z.array(
5899
+ z.lazy(() =>
5900
+ CreateChatCompletionRouterChatCompletionsChoices$inboundSchema
5901
+ ),
5902
+ ),
5859
5903
  created: z.number(),
5860
5904
  model: z.string(),
5861
5905
  system_fingerprint: z.nullable(z.string()).optional(),
5862
- usage: z.nullable(z.lazy(() => CreateChatCompletionUsage$inboundSchema))
5863
- .optional(),
5906
+ usage: z.nullable(
5907
+ z.lazy(() => CreateChatCompletionRouterChatCompletionsUsage$inboundSchema),
5908
+ ).optional(),
5864
5909
  object: CreateChatCompletionRouterChatCompletionsObject$inboundSchema,
5865
5910
  }).transform((v) => {
5866
5911
  return remap$(v, {
@@ -6019,37 +6064,37 @@ export function createChatCompletionRouterChatCompletionsAudioFromJSON(
6019
6064
  }
6020
6065
 
6021
6066
  /** @internal */
6022
- export const Message$inboundSchema: z.ZodType<Message, z.ZodTypeDef, unknown> =
6023
- z.object({
6024
- content: z.nullable(z.string()).optional(),
6025
- refusal: z.nullable(z.string()).optional(),
6026
- tool_calls: z.array(
6027
- z.lazy(() => CreateChatCompletionToolCalls$inboundSchema),
6028
- ).optional(),
6029
- role: CreateChatCompletionRole$inboundSchema.optional(),
6030
- reasoning: z.nullable(z.string()).optional(),
6031
- reasoning_signature: z.nullable(z.string()).optional(),
6032
- redacted_reasoning: z.string().optional(),
6033
- audio: z.nullable(
6034
- z.lazy(() =>
6035
- CreateChatCompletionRouterChatCompletionsAudio$inboundSchema
6036
- ),
6037
- ).optional(),
6038
- }).transform((v) => {
6039
- return remap$(v, {
6040
- "tool_calls": "toolCalls",
6041
- "reasoning_signature": "reasoningSignature",
6042
- "redacted_reasoning": "redactedReasoning",
6043
- });
6067
+ export const CreateChatCompletionMessage$inboundSchema: z.ZodType<
6068
+ CreateChatCompletionMessage,
6069
+ z.ZodTypeDef,
6070
+ unknown
6071
+ > = z.object({
6072
+ content: z.nullable(z.string()).optional(),
6073
+ refusal: z.nullable(z.string()).optional(),
6074
+ tool_calls: z.array(z.lazy(() => CreateChatCompletionToolCalls$inboundSchema))
6075
+ .optional(),
6076
+ role: CreateChatCompletionRole$inboundSchema.optional(),
6077
+ reasoning: z.nullable(z.string()).optional(),
6078
+ reasoning_signature: z.nullable(z.string()).optional(),
6079
+ redacted_reasoning: z.string().optional(),
6080
+ audio: z.nullable(
6081
+ z.lazy(() => CreateChatCompletionRouterChatCompletionsAudio$inboundSchema),
6082
+ ).optional(),
6083
+ }).transform((v) => {
6084
+ return remap$(v, {
6085
+ "tool_calls": "toolCalls",
6086
+ "reasoning_signature": "reasoningSignature",
6087
+ "redacted_reasoning": "redactedReasoning",
6044
6088
  });
6089
+ });
6045
6090
 
6046
- export function messageFromJSON(
6091
+ export function createChatCompletionMessageFromJSON(
6047
6092
  jsonString: string,
6048
- ): SafeParseResult<Message, SDKValidationError> {
6093
+ ): SafeParseResult<CreateChatCompletionMessage, SDKValidationError> {
6049
6094
  return safeParse(
6050
6095
  jsonString,
6051
- (x) => Message$inboundSchema.parse(JSON.parse(x)),
6052
- `Failed to parse 'Message' from JSON`,
6096
+ (x) => CreateChatCompletionMessage$inboundSchema.parse(JSON.parse(x)),
6097
+ `Failed to parse 'CreateChatCompletionMessage' from JSON`,
6053
6098
  );
6054
6099
  }
6055
6100
 
@@ -6169,31 +6214,34 @@ export function logprobsFromJSON(
6169
6214
  }
6170
6215
 
6171
6216
  /** @internal */
6172
- export const Choices$inboundSchema: z.ZodType<Choices, z.ZodTypeDef, unknown> =
6173
- z.object({
6174
- finish_reason: z.nullable(FinishReason$inboundSchema),
6175
- index: z.number().default(0),
6176
- message: z.lazy(() => Message$inboundSchema),
6177
- logprobs: z.nullable(z.lazy(() => Logprobs$inboundSchema)).optional(),
6178
- }).transform((v) => {
6179
- return remap$(v, {
6180
- "finish_reason": "finishReason",
6181
- });
6217
+ export const CreateChatCompletionChoices$inboundSchema: z.ZodType<
6218
+ CreateChatCompletionChoices,
6219
+ z.ZodTypeDef,
6220
+ unknown
6221
+ > = z.object({
6222
+ finish_reason: z.nullable(FinishReason$inboundSchema),
6223
+ index: z.number().default(0),
6224
+ message: z.lazy(() => CreateChatCompletionMessage$inboundSchema),
6225
+ logprobs: z.nullable(z.lazy(() => Logprobs$inboundSchema)).optional(),
6226
+ }).transform((v) => {
6227
+ return remap$(v, {
6228
+ "finish_reason": "finishReason",
6182
6229
  });
6230
+ });
6183
6231
 
6184
- export function choicesFromJSON(
6232
+ export function createChatCompletionChoicesFromJSON(
6185
6233
  jsonString: string,
6186
- ): SafeParseResult<Choices, SDKValidationError> {
6234
+ ): SafeParseResult<CreateChatCompletionChoices, SDKValidationError> {
6187
6235
  return safeParse(
6188
6236
  jsonString,
6189
- (x) => Choices$inboundSchema.parse(JSON.parse(x)),
6190
- `Failed to parse 'Choices' from JSON`,
6237
+ (x) => CreateChatCompletionChoices$inboundSchema.parse(JSON.parse(x)),
6238
+ `Failed to parse 'CreateChatCompletionChoices' from JSON`,
6191
6239
  );
6192
6240
  }
6193
6241
 
6194
6242
  /** @internal */
6195
- export const PromptTokensDetails$inboundSchema: z.ZodType<
6196
- PromptTokensDetails,
6243
+ export const CreateChatCompletionPromptTokensDetails$inboundSchema: z.ZodType<
6244
+ CreateChatCompletionPromptTokensDetails,
6197
6245
  z.ZodTypeDef,
6198
6246
  unknown
6199
6247
  > = z.object({
@@ -6208,74 +6256,90 @@ export const PromptTokensDetails$inboundSchema: z.ZodType<
6208
6256
  });
6209
6257
  });
6210
6258
 
6211
- export function promptTokensDetailsFromJSON(
6259
+ export function createChatCompletionPromptTokensDetailsFromJSON(
6212
6260
  jsonString: string,
6213
- ): SafeParseResult<PromptTokensDetails, SDKValidationError> {
6261
+ ): SafeParseResult<
6262
+ CreateChatCompletionPromptTokensDetails,
6263
+ SDKValidationError
6264
+ > {
6214
6265
  return safeParse(
6215
6266
  jsonString,
6216
- (x) => PromptTokensDetails$inboundSchema.parse(JSON.parse(x)),
6217
- `Failed to parse 'PromptTokensDetails' from JSON`,
6267
+ (x) =>
6268
+ CreateChatCompletionPromptTokensDetails$inboundSchema.parse(
6269
+ JSON.parse(x),
6270
+ ),
6271
+ `Failed to parse 'CreateChatCompletionPromptTokensDetails' from JSON`,
6218
6272
  );
6219
6273
  }
6220
6274
 
6221
6275
  /** @internal */
6222
- export const CompletionTokensDetails$inboundSchema: z.ZodType<
6223
- CompletionTokensDetails,
6224
- z.ZodTypeDef,
6225
- unknown
6226
- > = z.object({
6227
- reasoning_tokens: z.nullable(z.number()).optional(),
6228
- accepted_prediction_tokens: z.nullable(z.number()).optional(),
6229
- rejected_prediction_tokens: z.nullable(z.number()).optional(),
6230
- audio_tokens: z.nullable(z.number().int()).optional(),
6231
- }).transform((v) => {
6232
- return remap$(v, {
6233
- "reasoning_tokens": "reasoningTokens",
6234
- "accepted_prediction_tokens": "acceptedPredictionTokens",
6235
- "rejected_prediction_tokens": "rejectedPredictionTokens",
6236
- "audio_tokens": "audioTokens",
6276
+ export const CreateChatCompletionCompletionTokensDetails$inboundSchema:
6277
+ z.ZodType<
6278
+ CreateChatCompletionCompletionTokensDetails,
6279
+ z.ZodTypeDef,
6280
+ unknown
6281
+ > = z.object({
6282
+ reasoning_tokens: z.nullable(z.number()).optional(),
6283
+ accepted_prediction_tokens: z.nullable(z.number()).optional(),
6284
+ rejected_prediction_tokens: z.nullable(z.number()).optional(),
6285
+ audio_tokens: z.nullable(z.number().int()).optional(),
6286
+ }).transform((v) => {
6287
+ return remap$(v, {
6288
+ "reasoning_tokens": "reasoningTokens",
6289
+ "accepted_prediction_tokens": "acceptedPredictionTokens",
6290
+ "rejected_prediction_tokens": "rejectedPredictionTokens",
6291
+ "audio_tokens": "audioTokens",
6292
+ });
6237
6293
  });
6238
- });
6239
6294
 
6240
- export function completionTokensDetailsFromJSON(
6295
+ export function createChatCompletionCompletionTokensDetailsFromJSON(
6241
6296
  jsonString: string,
6242
- ): SafeParseResult<CompletionTokensDetails, SDKValidationError> {
6297
+ ): SafeParseResult<
6298
+ CreateChatCompletionCompletionTokensDetails,
6299
+ SDKValidationError
6300
+ > {
6243
6301
  return safeParse(
6244
6302
  jsonString,
6245
- (x) => CompletionTokensDetails$inboundSchema.parse(JSON.parse(x)),
6246
- `Failed to parse 'CompletionTokensDetails' from JSON`,
6303
+ (x) =>
6304
+ CreateChatCompletionCompletionTokensDetails$inboundSchema.parse(
6305
+ JSON.parse(x),
6306
+ ),
6307
+ `Failed to parse 'CreateChatCompletionCompletionTokensDetails' from JSON`,
6247
6308
  );
6248
6309
  }
6249
6310
 
6250
6311
  /** @internal */
6251
- export const Usage$inboundSchema: z.ZodType<Usage, z.ZodTypeDef, unknown> = z
6252
- .object({
6253
- completion_tokens: z.number().optional(),
6254
- prompt_tokens: z.number().optional(),
6255
- total_tokens: z.number().optional(),
6256
- prompt_tokens_details: z.nullable(
6257
- z.lazy(() => PromptTokensDetails$inboundSchema),
6258
- ).optional(),
6259
- completion_tokens_details: z.nullable(
6260
- z.lazy(() => CompletionTokensDetails$inboundSchema),
6261
- ).optional(),
6262
- }).transform((v) => {
6263
- return remap$(v, {
6264
- "completion_tokens": "completionTokens",
6265
- "prompt_tokens": "promptTokens",
6266
- "total_tokens": "totalTokens",
6267
- "prompt_tokens_details": "promptTokensDetails",
6268
- "completion_tokens_details": "completionTokensDetails",
6269
- });
6312
+ export const CreateChatCompletionUsage$inboundSchema: z.ZodType<
6313
+ CreateChatCompletionUsage,
6314
+ z.ZodTypeDef,
6315
+ unknown
6316
+ > = z.object({
6317
+ completion_tokens: z.number().optional(),
6318
+ prompt_tokens: z.number().optional(),
6319
+ total_tokens: z.number().optional(),
6320
+ prompt_tokens_details: z.nullable(
6321
+ z.lazy(() => CreateChatCompletionPromptTokensDetails$inboundSchema),
6322
+ ).optional(),
6323
+ completion_tokens_details: z.nullable(
6324
+ z.lazy(() => CreateChatCompletionCompletionTokensDetails$inboundSchema),
6325
+ ).optional(),
6326
+ }).transform((v) => {
6327
+ return remap$(v, {
6328
+ "completion_tokens": "completionTokens",
6329
+ "prompt_tokens": "promptTokens",
6330
+ "total_tokens": "totalTokens",
6331
+ "prompt_tokens_details": "promptTokensDetails",
6332
+ "completion_tokens_details": "completionTokensDetails",
6270
6333
  });
6334
+ });
6271
6335
 
6272
- export function usageFromJSON(
6336
+ export function createChatCompletionUsageFromJSON(
6273
6337
  jsonString: string,
6274
- ): SafeParseResult<Usage, SDKValidationError> {
6338
+ ): SafeParseResult<CreateChatCompletionUsage, SDKValidationError> {
6275
6339
  return safeParse(
6276
6340
  jsonString,
6277
- (x) => Usage$inboundSchema.parse(JSON.parse(x)),
6278
- `Failed to parse 'Usage' from JSON`,
6341
+ (x) => CreateChatCompletionUsage$inboundSchema.parse(JSON.parse(x)),
6342
+ `Failed to parse 'CreateChatCompletionUsage' from JSON`,
6279
6343
  );
6280
6344
  }
6281
6345
 
@@ -6291,11 +6355,12 @@ export const CreateChatCompletionResponseBody$inboundSchema: z.ZodType<
6291
6355
  unknown
6292
6356
  > = z.object({
6293
6357
  id: z.string(),
6294
- choices: z.array(z.lazy(() => Choices$inboundSchema)),
6358
+ choices: z.array(z.lazy(() => CreateChatCompletionChoices$inboundSchema)),
6295
6359
  created: z.number(),
6296
6360
  model: z.string(),
6297
6361
  system_fingerprint: z.nullable(z.string()).optional(),
6298
- usage: z.nullable(z.lazy(() => Usage$inboundSchema)).optional(),
6362
+ usage: z.nullable(z.lazy(() => CreateChatCompletionUsage$inboundSchema))
6363
+ .optional(),
6299
6364
  object: CreateChatCompletionObject$inboundSchema,
6300
6365
  }).transform((v) => {
6301
6366
  return remap$(v, {