llama-stack-client 0.4.4 → 0.4.5

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 (291) hide show
  1. package/.github/workflows/ci.yml +4 -4
  2. package/.github/workflows/release-doctor.yml +1 -1
  3. package/.release-please-manifest.json +1 -1
  4. package/.stats.yml +4 -4
  5. package/CHANGELOG.md +41 -0
  6. package/LICENSE +1 -1
  7. package/README.md +41 -27
  8. package/api.md +32 -25
  9. package/dist/CHANGELOG.md +41 -0
  10. package/dist/LICENSE +1 -1
  11. package/dist/README.md +41 -27
  12. package/dist/core.d.ts.map +1 -1
  13. package/dist/core.js +5 -0
  14. package/dist/core.js.map +1 -1
  15. package/dist/core.mjs +5 -0
  16. package/dist/core.mjs.map +1 -1
  17. package/dist/index.d.mts +12 -6
  18. package/dist/index.d.ts +12 -6
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js.map +1 -1
  21. package/dist/index.mjs.map +1 -1
  22. package/dist/package.json +1 -1
  23. package/dist/resources/alpha/admin.d.ts +41 -0
  24. package/dist/resources/alpha/admin.d.ts.map +1 -0
  25. package/dist/resources/alpha/admin.js +46 -0
  26. package/dist/resources/alpha/admin.js.map +1 -0
  27. package/dist/resources/alpha/admin.mjs +42 -0
  28. package/dist/resources/alpha/admin.mjs.map +1 -0
  29. package/dist/resources/alpha/alpha.d.ts +8 -4
  30. package/dist/resources/alpha/alpha.d.ts.map +1 -1
  31. package/dist/resources/alpha/alpha.js +6 -2
  32. package/dist/resources/alpha/alpha.js.map +1 -1
  33. package/dist/resources/alpha/alpha.mjs +6 -2
  34. package/dist/resources/alpha/alpha.mjs.map +1 -1
  35. package/dist/resources/alpha/benchmarks.d.ts +37 -1
  36. package/dist/resources/alpha/benchmarks.d.ts.map +1 -1
  37. package/dist/resources/alpha/eval/eval.d.ts +28 -7
  38. package/dist/resources/alpha/eval/eval.d.ts.map +1 -1
  39. package/dist/resources/alpha/eval/eval.js.map +1 -1
  40. package/dist/resources/alpha/eval/eval.mjs.map +1 -1
  41. package/dist/resources/alpha/index.d.ts +2 -1
  42. package/dist/resources/alpha/index.d.ts.map +1 -1
  43. package/dist/resources/alpha/index.js +3 -1
  44. package/dist/resources/alpha/index.js.map +1 -1
  45. package/dist/resources/alpha/index.mjs +1 -0
  46. package/dist/resources/alpha/index.mjs.map +1 -1
  47. package/dist/resources/alpha/inference.d.ts +58 -7
  48. package/dist/resources/alpha/inference.d.ts.map +1 -1
  49. package/dist/resources/alpha/post-training/index.d.ts +2 -2
  50. package/dist/resources/alpha/post-training/index.d.ts.map +1 -1
  51. package/dist/resources/alpha/post-training/index.js.map +1 -1
  52. package/dist/resources/alpha/post-training/index.mjs +1 -1
  53. package/dist/resources/alpha/post-training/index.mjs.map +1 -1
  54. package/dist/resources/alpha/post-training/job.d.ts +4 -16
  55. package/dist/resources/alpha/post-training/job.d.ts.map +1 -1
  56. package/dist/resources/alpha/post-training/job.js +5 -6
  57. package/dist/resources/alpha/post-training/job.js.map +1 -1
  58. package/dist/resources/alpha/post-training/job.mjs +5 -6
  59. package/dist/resources/alpha/post-training/job.mjs.map +1 -1
  60. package/dist/resources/alpha/post-training/post-training.d.ts +38 -11
  61. package/dist/resources/alpha/post-training/post-training.d.ts.map +1 -1
  62. package/dist/resources/alpha/post-training/post-training.js.map +1 -1
  63. package/dist/resources/alpha/post-training/post-training.mjs +1 -1
  64. package/dist/resources/alpha/post-training/post-training.mjs.map +1 -1
  65. package/dist/resources/beta/datasets.d.ts +102 -8
  66. package/dist/resources/beta/datasets.d.ts.map +1 -1
  67. package/dist/resources/chat/chat.d.ts +119 -17
  68. package/dist/resources/chat/chat.d.ts.map +1 -1
  69. package/dist/resources/chat/chat.js.map +1 -1
  70. package/dist/resources/chat/chat.mjs.map +1 -1
  71. package/dist/resources/chat/completions.d.ts +1130 -73
  72. package/dist/resources/chat/completions.d.ts.map +1 -1
  73. package/dist/resources/chat/completions.js +0 -2
  74. package/dist/resources/chat/completions.js.map +1 -1
  75. package/dist/resources/chat/completions.mjs +0 -2
  76. package/dist/resources/chat/completions.mjs.map +1 -1
  77. package/dist/resources/completions.d.ts +135 -26
  78. package/dist/resources/completions.d.ts.map +1 -1
  79. package/dist/resources/completions.js.map +1 -1
  80. package/dist/resources/completions.mjs.map +1 -1
  81. package/dist/resources/conversations/conversations.d.ts +56 -12
  82. package/dist/resources/conversations/conversations.d.ts.map +1 -1
  83. package/dist/resources/conversations/conversations.js +0 -8
  84. package/dist/resources/conversations/conversations.js.map +1 -1
  85. package/dist/resources/conversations/conversations.mjs +0 -8
  86. package/dist/resources/conversations/conversations.mjs.map +1 -1
  87. package/dist/resources/conversations/items.d.ts +364 -81
  88. package/dist/resources/conversations/items.d.ts.map +1 -1
  89. package/dist/resources/conversations/items.js +0 -6
  90. package/dist/resources/conversations/items.js.map +1 -1
  91. package/dist/resources/conversations/items.mjs +0 -6
  92. package/dist/resources/conversations/items.mjs.map +1 -1
  93. package/dist/resources/embeddings.d.ts +46 -8
  94. package/dist/resources/embeddings.d.ts.map +1 -1
  95. package/dist/resources/embeddings.js +0 -2
  96. package/dist/resources/embeddings.js.map +1 -1
  97. package/dist/resources/embeddings.mjs +0 -2
  98. package/dist/resources/embeddings.mjs.map +1 -1
  99. package/dist/resources/files.d.ts +58 -31
  100. package/dist/resources/files.d.ts.map +1 -1
  101. package/dist/resources/files.js +4 -16
  102. package/dist/resources/files.js.map +1 -1
  103. package/dist/resources/files.mjs +4 -16
  104. package/dist/resources/files.mjs.map +1 -1
  105. package/dist/resources/index.d.ts +3 -3
  106. package/dist/resources/index.d.ts.map +1 -1
  107. package/dist/resources/index.js.map +1 -1
  108. package/dist/resources/index.mjs.map +1 -1
  109. package/dist/resources/inspect.d.ts +3 -45
  110. package/dist/resources/inspect.d.ts.map +1 -1
  111. package/dist/resources/inspect.js +0 -4
  112. package/dist/resources/inspect.js.map +1 -1
  113. package/dist/resources/inspect.mjs +0 -4
  114. package/dist/resources/inspect.mjs.map +1 -1
  115. package/dist/resources/models/models.d.ts +21 -6
  116. package/dist/resources/models/models.d.ts.map +1 -1
  117. package/dist/resources/models/models.js +0 -6
  118. package/dist/resources/models/models.js.map +1 -1
  119. package/dist/resources/models/models.mjs +0 -6
  120. package/dist/resources/models/models.mjs.map +1 -1
  121. package/dist/resources/moderations.d.ts +38 -5
  122. package/dist/resources/moderations.d.ts.map +1 -1
  123. package/dist/resources/moderations.js +1 -3
  124. package/dist/resources/moderations.js.map +1 -1
  125. package/dist/resources/moderations.mjs +1 -3
  126. package/dist/resources/moderations.mjs.map +1 -1
  127. package/dist/resources/prompts/prompts.d.ts +24 -10
  128. package/dist/resources/prompts/prompts.d.ts.map +1 -1
  129. package/dist/resources/prompts/prompts.js +2 -10
  130. package/dist/resources/prompts/prompts.js.map +1 -1
  131. package/dist/resources/prompts/prompts.mjs +2 -10
  132. package/dist/resources/prompts/prompts.mjs.map +1 -1
  133. package/dist/resources/prompts/versions.d.ts +0 -2
  134. package/dist/resources/prompts/versions.d.ts.map +1 -1
  135. package/dist/resources/prompts/versions.js +0 -2
  136. package/dist/resources/prompts/versions.js.map +1 -1
  137. package/dist/resources/prompts/versions.mjs +0 -2
  138. package/dist/resources/prompts/versions.mjs.map +1 -1
  139. package/dist/resources/providers.d.ts +5 -12
  140. package/dist/resources/providers.d.ts.map +1 -1
  141. package/dist/resources/providers.js +0 -4
  142. package/dist/resources/providers.js.map +1 -1
  143. package/dist/resources/providers.mjs +0 -4
  144. package/dist/resources/providers.mjs.map +1 -1
  145. package/dist/resources/responses/input-items.d.ts +108 -9
  146. package/dist/resources/responses/input-items.d.ts.map +1 -1
  147. package/dist/resources/responses/responses.d.ts +881 -124
  148. package/dist/resources/responses/responses.d.ts.map +1 -1
  149. package/dist/resources/responses/responses.js.map +1 -1
  150. package/dist/resources/responses/responses.mjs.map +1 -1
  151. package/dist/resources/routes.d.ts +10 -9
  152. package/dist/resources/routes.d.ts.map +1 -1
  153. package/dist/resources/routes.js.map +1 -1
  154. package/dist/resources/routes.mjs.map +1 -1
  155. package/dist/resources/safety.d.ts +131 -9
  156. package/dist/resources/safety.d.ts.map +1 -1
  157. package/dist/resources/safety.js +1 -3
  158. package/dist/resources/safety.js.map +1 -1
  159. package/dist/resources/safety.mjs +1 -3
  160. package/dist/resources/safety.mjs.map +1 -1
  161. package/dist/resources/scoring-functions.d.ts +23 -1
  162. package/dist/resources/scoring-functions.d.ts.map +1 -1
  163. package/dist/resources/scoring.d.ts +24 -0
  164. package/dist/resources/scoring.d.ts.map +1 -1
  165. package/dist/resources/shared.d.ts +139 -7
  166. package/dist/resources/shared.d.ts.map +1 -1
  167. package/dist/resources/shields.d.ts +21 -0
  168. package/dist/resources/shields.d.ts.map +1 -1
  169. package/dist/resources/vector-io.d.ts +75 -58
  170. package/dist/resources/vector-io.d.ts.map +1 -1
  171. package/dist/resources/vector-io.js +1 -1
  172. package/dist/resources/vector-io.mjs +1 -1
  173. package/dist/resources/vector-stores/file-batches.d.ts +13 -7
  174. package/dist/resources/vector-stores/file-batches.d.ts.map +1 -1
  175. package/dist/resources/vector-stores/file-batches.js +3 -6
  176. package/dist/resources/vector-stores/file-batches.js.map +1 -1
  177. package/dist/resources/vector-stores/file-batches.mjs +3 -6
  178. package/dist/resources/vector-stores/file-batches.mjs.map +1 -1
  179. package/dist/resources/vector-stores/files.d.ts +31 -9
  180. package/dist/resources/vector-stores/files.d.ts.map +1 -1
  181. package/dist/resources/vector-stores/files.js +4 -4
  182. package/dist/resources/vector-stores/files.js.map +1 -1
  183. package/dist/resources/vector-stores/files.mjs +4 -4
  184. package/dist/resources/vector-stores/files.mjs.map +1 -1
  185. package/dist/resources/vector-stores/vector-stores.d.ts +87 -13
  186. package/dist/resources/vector-stores/vector-stores.d.ts.map +1 -1
  187. package/dist/resources/vector-stores/vector-stores.js +5 -10
  188. package/dist/resources/vector-stores/vector-stores.js.map +1 -1
  189. package/dist/resources/vector-stores/vector-stores.mjs +5 -10
  190. package/dist/resources/vector-stores/vector-stores.mjs.map +1 -1
  191. package/dist/src/core.ts +6 -0
  192. package/dist/src/index.ts +11 -16
  193. package/dist/src/resources/alpha/admin.ts +84 -0
  194. package/dist/src/resources/alpha/alpha.ts +16 -8
  195. package/dist/src/resources/alpha/benchmarks.ts +37 -1
  196. package/dist/src/resources/alpha/eval/eval.ts +28 -7
  197. package/dist/src/resources/alpha/index.ts +2 -0
  198. package/dist/src/resources/alpha/inference.ts +58 -7
  199. package/dist/src/resources/alpha/post-training/index.ts +2 -10
  200. package/dist/src/resources/alpha/post-training/job.ts +5 -26
  201. package/dist/src/resources/alpha/post-training/post-training.ts +38 -22
  202. package/dist/src/resources/beta/datasets.ts +103 -8
  203. package/dist/src/resources/chat/chat.ts +122 -20
  204. package/dist/src/resources/chat/completions.ts +1138 -79
  205. package/dist/src/resources/completions.ts +137 -28
  206. package/dist/src/resources/conversations/conversations.ts +67 -15
  207. package/dist/src/resources/conversations/items.ts +479 -110
  208. package/dist/src/resources/embeddings.ts +46 -8
  209. package/dist/src/resources/files.ts +58 -31
  210. package/dist/src/resources/index.ts +3 -3
  211. package/dist/src/resources/inspect.ts +3 -57
  212. package/dist/src/resources/models/models.ts +21 -6
  213. package/dist/src/resources/moderations.ts +38 -5
  214. package/dist/src/resources/prompts/prompts.ts +26 -12
  215. package/dist/src/resources/prompts/versions.ts +0 -2
  216. package/dist/src/resources/providers.ts +5 -16
  217. package/dist/src/resources/responses/input-items.ts +138 -15
  218. package/dist/src/resources/responses/responses.ts +1076 -196
  219. package/dist/src/resources/routes.ts +10 -14
  220. package/dist/src/resources/safety.ts +131 -8
  221. package/dist/src/resources/scoring-functions.ts +23 -1
  222. package/dist/src/resources/scoring.ts +24 -0
  223. package/dist/src/resources/shared.ts +148 -7
  224. package/dist/src/resources/shields.ts +21 -0
  225. package/dist/src/resources/vector-io.ts +95 -78
  226. package/dist/src/resources/vector-stores/file-batches.ts +13 -7
  227. package/dist/src/resources/vector-stores/files.ts +31 -11
  228. package/dist/src/resources/vector-stores/vector-stores.ts +89 -15
  229. package/dist/src/version.ts +1 -1
  230. package/dist/version.d.ts +1 -1
  231. package/dist/version.js +1 -1
  232. package/dist/version.mjs +1 -1
  233. package/package.json +1 -1
  234. package/src/core.ts +6 -0
  235. package/src/index.ts +11 -16
  236. package/src/resources/alpha/admin.ts +84 -0
  237. package/src/resources/alpha/alpha.ts +16 -8
  238. package/src/resources/alpha/benchmarks.ts +37 -1
  239. package/src/resources/alpha/eval/eval.ts +28 -7
  240. package/src/resources/alpha/index.ts +2 -0
  241. package/src/resources/alpha/inference.ts +58 -7
  242. package/src/resources/alpha/post-training/index.ts +2 -10
  243. package/src/resources/alpha/post-training/job.ts +5 -26
  244. package/src/resources/alpha/post-training/post-training.ts +38 -22
  245. package/src/resources/beta/datasets.ts +103 -8
  246. package/src/resources/chat/chat.ts +122 -20
  247. package/src/resources/chat/completions.ts +1138 -79
  248. package/src/resources/completions.ts +137 -28
  249. package/src/resources/conversations/conversations.ts +67 -15
  250. package/src/resources/conversations/items.ts +479 -110
  251. package/src/resources/embeddings.ts +46 -8
  252. package/src/resources/files.ts +58 -31
  253. package/src/resources/index.ts +3 -3
  254. package/src/resources/inspect.ts +3 -57
  255. package/src/resources/models/models.ts +21 -6
  256. package/src/resources/moderations.ts +38 -5
  257. package/src/resources/prompts/prompts.ts +26 -12
  258. package/src/resources/prompts/versions.ts +0 -2
  259. package/src/resources/providers.ts +5 -16
  260. package/src/resources/responses/input-items.ts +138 -15
  261. package/src/resources/responses/responses.ts +1076 -196
  262. package/src/resources/routes.ts +10 -14
  263. package/src/resources/safety.ts +131 -8
  264. package/src/resources/scoring-functions.ts +23 -1
  265. package/src/resources/scoring.ts +24 -0
  266. package/src/resources/shared.ts +148 -7
  267. package/src/resources/shields.ts +21 -0
  268. package/src/resources/vector-io.ts +95 -78
  269. package/src/resources/vector-stores/file-batches.ts +13 -7
  270. package/src/resources/vector-stores/files.ts +31 -11
  271. package/src/resources/vector-stores/vector-stores.ts +89 -15
  272. package/src/version.ts +1 -1
  273. package/tests/api-resources/alpha/admin.test.ts +111 -0
  274. package/tests/api-resources/alpha/eval/eval.test.ts +40 -20
  275. package/tests/api-resources/alpha/inference.test.ts +1 -1
  276. package/tests/api-resources/alpha/post-training/job.test.ts +21 -12
  277. package/tests/api-resources/alpha/post-training/post-training.test.ts +12 -2
  278. package/tests/api-resources/beta/datasets.test.ts +9 -3
  279. package/tests/api-resources/chat/completions.test.ts +20 -7
  280. package/tests/api-resources/completions.test.ts +5 -5
  281. package/tests/api-resources/conversations/items.test.ts +22 -3
  282. package/tests/api-resources/embeddings.test.ts +2 -2
  283. package/tests/api-resources/files.test.ts +6 -1
  284. package/tests/api-resources/responses/input-items.test.ts +7 -1
  285. package/tests/api-resources/responses/responses.test.ts +19 -5
  286. package/tests/api-resources/safety.test.ts +9 -5
  287. package/tests/api-resources/tool-runtime.test.ts +9 -2
  288. package/tests/api-resources/vector-io.test.ts +13 -4
  289. package/tests/api-resources/vector-stores/file-batches.test.ts +7 -1
  290. package/tests/api-resources/vector-stores/files.test.ts +7 -1
  291. package/tests/api-resources/vector-stores/vector-stores.test.ts +14 -2
@@ -13,8 +13,6 @@ import { OpenAICursorPage, type OpenAICursorPageParams } from '../../pagination'
13
13
 
14
14
  export class Items extends APIResource {
15
15
  /**
16
- * Create items.
17
- *
18
16
  * Create items in the conversation.
19
17
  */
20
18
  create(
@@ -26,8 +24,6 @@ export class Items extends APIResource {
26
24
  }
27
25
 
28
26
  /**
29
- * List items.
30
- *
31
27
  * List items in the conversation.
32
28
  */
33
29
  list(
@@ -55,8 +51,6 @@ export class Items extends APIResource {
55
51
  }
56
52
 
57
53
  /**
58
- * Delete an item.
59
- *
60
54
  * Delete a conversation item.
61
55
  */
62
56
  delete(
@@ -68,8 +62,6 @@ export class Items extends APIResource {
68
62
  }
69
63
 
70
64
  /**
71
- * Retrieve an item.
72
- *
73
65
  * Retrieve a conversation item.
74
66
  */
75
67
  get(
@@ -138,7 +130,7 @@ export namespace ItemCreateResponse {
138
130
  | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile
139
131
  >
140
132
  | Array<
141
- | OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputText
133
+ | OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput
142
134
  | OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal
143
135
  >;
144
136
 
@@ -189,20 +181,22 @@ export namespace ItemCreateResponse {
189
181
  type?: 'input_file';
190
182
  }
191
183
 
192
- export interface OpenAIResponseOutputMessageContentOutputText {
184
+ export interface OpenAIResponseOutputMessageContentOutputTextOutput {
193
185
  text: string;
194
186
 
195
187
  annotations?: Array<
196
- | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFileCitation
197
- | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationCitation
198
- | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationContainerFileCitation
199
- | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFilePath
188
+ | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation
189
+ | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation
190
+ | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation
191
+ | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath
200
192
  >;
201
193
 
194
+ logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
195
+
202
196
  type?: 'output_text';
203
197
  }
204
198
 
205
- export namespace OpenAIResponseOutputMessageContentOutputText {
199
+ export namespace OpenAIResponseOutputMessageContentOutputTextOutput {
206
200
  /**
207
201
  * File citation annotation for referencing specific files in response content.
208
202
  */
@@ -252,6 +246,55 @@ export namespace ItemCreateResponse {
252
246
 
253
247
  type?: 'file_path';
254
248
  }
249
+
250
+ /**
251
+ * The log probability for a token from an OpenAI-compatible chat completion
252
+ * response.
253
+ */
254
+ export interface Logprob {
255
+ /**
256
+ * The token.
257
+ */
258
+ token: string;
259
+
260
+ /**
261
+ * The log probability of the token.
262
+ */
263
+ logprob: number;
264
+
265
+ /**
266
+ * The bytes for the token.
267
+ */
268
+ bytes?: Array<number> | null;
269
+
270
+ /**
271
+ * The top log probabilities for the token.
272
+ */
273
+ top_logprobs?: Array<Logprob.TopLogprob> | null;
274
+ }
275
+
276
+ export namespace Logprob {
277
+ /**
278
+ * The top log probability for a token from an OpenAI-compatible chat completion
279
+ * response.
280
+ */
281
+ export interface TopLogprob {
282
+ /**
283
+ * The token.
284
+ */
285
+ token: string;
286
+
287
+ /**
288
+ * The log probability of the token.
289
+ */
290
+ logprob: number;
291
+
292
+ /**
293
+ * The bytes for the token.
294
+ */
295
+ bytes?: Array<number> | null;
296
+ }
297
+ }
255
298
  }
256
299
 
257
300
  /**
@@ -447,7 +490,7 @@ export namespace ItemListResponse {
447
490
  | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile
448
491
  >
449
492
  | Array<
450
- | OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputText
493
+ | OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput
451
494
  | OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal
452
495
  >;
453
496
 
@@ -498,20 +541,22 @@ export namespace ItemListResponse {
498
541
  type?: 'input_file';
499
542
  }
500
543
 
501
- export interface OpenAIResponseOutputMessageContentOutputText {
544
+ export interface OpenAIResponseOutputMessageContentOutputTextOutput {
502
545
  text: string;
503
546
 
504
547
  annotations?: Array<
505
- | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFileCitation
506
- | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationCitation
507
- | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationContainerFileCitation
508
- | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFilePath
548
+ | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation
549
+ | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation
550
+ | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation
551
+ | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath
509
552
  >;
510
553
 
554
+ logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
555
+
511
556
  type?: 'output_text';
512
557
  }
513
558
 
514
- export namespace OpenAIResponseOutputMessageContentOutputText {
559
+ export namespace OpenAIResponseOutputMessageContentOutputTextOutput {
515
560
  /**
516
561
  * File citation annotation for referencing specific files in response content.
517
562
  */
@@ -561,6 +606,55 @@ export namespace ItemListResponse {
561
606
 
562
607
  type?: 'file_path';
563
608
  }
609
+
610
+ /**
611
+ * The log probability for a token from an OpenAI-compatible chat completion
612
+ * response.
613
+ */
614
+ export interface Logprob {
615
+ /**
616
+ * The token.
617
+ */
618
+ token: string;
619
+
620
+ /**
621
+ * The log probability of the token.
622
+ */
623
+ logprob: number;
624
+
625
+ /**
626
+ * The bytes for the token.
627
+ */
628
+ bytes?: Array<number> | null;
629
+
630
+ /**
631
+ * The top log probabilities for the token.
632
+ */
633
+ top_logprobs?: Array<Logprob.TopLogprob> | null;
634
+ }
635
+
636
+ export namespace Logprob {
637
+ /**
638
+ * The top log probability for a token from an OpenAI-compatible chat completion
639
+ * response.
640
+ */
641
+ export interface TopLogprob {
642
+ /**
643
+ * The token.
644
+ */
645
+ token: string;
646
+
647
+ /**
648
+ * The log probability of the token.
649
+ */
650
+ logprob: number;
651
+
652
+ /**
653
+ * The bytes for the token.
654
+ */
655
+ bytes?: Array<number> | null;
656
+ }
657
+ }
564
658
  }
565
659
 
566
660
  /**
@@ -750,142 +844,366 @@ export interface ItemDeleteResponse {
750
844
  * under one type because the Responses API gives them all the same "type" value,
751
845
  * and there is no way to tell them apart in certain scenarios.
752
846
  */
753
- export interface ItemGetResponse {
754
- content:
755
- | string
756
- | Array<
757
- | ItemGetResponse.OpenAIResponseInputMessageContentText
758
- | ItemGetResponse.OpenAIResponseInputMessageContentImage
759
- | ItemGetResponse.OpenAIResponseInputMessageContentFile
760
- >
761
- | Array<
762
- | ItemGetResponse.OpenAIResponseOutputMessageContentOutputText
763
- | ItemGetResponse.OpenAIResponseContentPartRefusal
847
+ export type ItemGetResponse =
848
+ | ItemGetResponse.OpenAIResponseMessageOutput
849
+ | ItemGetResponse.OpenAIResponseOutputMessageWebSearchToolCall
850
+ | ItemGetResponse.OpenAIResponseOutputMessageFileSearchToolCall
851
+ | ItemGetResponse.OpenAIResponseOutputMessageFunctionToolCall
852
+ | ItemGetResponse.OpenAIResponseInputFunctionToolCallOutput
853
+ | ItemGetResponse.OpenAIResponseMcpApprovalRequest
854
+ | ItemGetResponse.OpenAIResponseMcpApprovalResponse
855
+ | ItemGetResponse.OpenAIResponseOutputMessageMcpCall
856
+ | ItemGetResponse.OpenAIResponseOutputMessageMcpListTools;
857
+
858
+ export namespace ItemGetResponse {
859
+ /**
860
+ * Corresponds to the various Message types in the Responses API. They are all
861
+ * under one type because the Responses API gives them all the same "type" value,
862
+ * and there is no way to tell them apart in certain scenarios.
863
+ */
864
+ export interface OpenAIResponseMessageOutput {
865
+ content:
866
+ | string
867
+ | Array<
868
+ | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText
869
+ | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage
870
+ | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile
871
+ >
872
+ | Array<
873
+ | OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput
874
+ | OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal
875
+ >;
876
+
877
+ role: 'system' | 'developer' | 'user' | 'assistant';
878
+
879
+ id?: string | null;
880
+
881
+ status?: string | null;
882
+
883
+ type?: 'message';
884
+ }
885
+
886
+ export namespace OpenAIResponseMessageOutput {
887
+ /**
888
+ * Text content for input messages in OpenAI response format.
889
+ */
890
+ export interface OpenAIResponseInputMessageContentText {
891
+ text: string;
892
+
893
+ type?: 'input_text';
894
+ }
895
+
896
+ /**
897
+ * Image content for input messages in OpenAI response format.
898
+ */
899
+ export interface OpenAIResponseInputMessageContentImage {
900
+ detail?: 'low' | 'high' | 'auto';
901
+
902
+ file_id?: string | null;
903
+
904
+ image_url?: string | null;
905
+
906
+ type?: 'input_image';
907
+ }
908
+
909
+ /**
910
+ * File content for input messages in OpenAI response format.
911
+ */
912
+ export interface OpenAIResponseInputMessageContentFile {
913
+ file_data?: string | null;
914
+
915
+ file_id?: string | null;
916
+
917
+ file_url?: string | null;
918
+
919
+ filename?: string | null;
920
+
921
+ type?: 'input_file';
922
+ }
923
+
924
+ export interface OpenAIResponseOutputMessageContentOutputTextOutput {
925
+ text: string;
926
+
927
+ annotations?: Array<
928
+ | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation
929
+ | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation
930
+ | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation
931
+ | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath
764
932
  >;
765
933
 
766
- role: 'system' | 'developer' | 'user' | 'assistant';
934
+ logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
767
935
 
768
- id?: string | null;
936
+ type?: 'output_text';
937
+ }
769
938
 
770
- status?: string | null;
939
+ export namespace OpenAIResponseOutputMessageContentOutputTextOutput {
940
+ /**
941
+ * File citation annotation for referencing specific files in response content.
942
+ */
943
+ export interface OpenAIResponseAnnotationFileCitation {
944
+ file_id: string;
771
945
 
772
- type?: 'message';
773
- }
946
+ filename: string;
774
947
 
775
- export namespace ItemGetResponse {
776
- /**
777
- * Text content for input messages in OpenAI response format.
778
- */
779
- export interface OpenAIResponseInputMessageContentText {
780
- text: string;
948
+ index: number;
781
949
 
782
- type?: 'input_text';
783
- }
950
+ type?: 'file_citation';
951
+ }
784
952
 
785
- /**
786
- * Image content for input messages in OpenAI response format.
787
- */
788
- export interface OpenAIResponseInputMessageContentImage {
789
- detail?: 'low' | 'high' | 'auto';
953
+ /**
954
+ * URL citation annotation for referencing external web resources.
955
+ */
956
+ export interface OpenAIResponseAnnotationCitation {
957
+ end_index: number;
958
+
959
+ start_index: number;
960
+
961
+ title: string;
962
+
963
+ url: string;
964
+
965
+ type?: 'url_citation';
966
+ }
790
967
 
791
- file_id?: string | null;
968
+ export interface OpenAIResponseAnnotationContainerFileCitation {
969
+ container_id: string;
792
970
 
793
- image_url?: string | null;
971
+ end_index: number;
794
972
 
795
- type?: 'input_image';
973
+ file_id: string;
974
+
975
+ filename: string;
976
+
977
+ start_index: number;
978
+
979
+ type?: 'container_file_citation';
980
+ }
981
+
982
+ export interface OpenAIResponseAnnotationFilePath {
983
+ file_id: string;
984
+
985
+ index: number;
986
+
987
+ type?: 'file_path';
988
+ }
989
+
990
+ /**
991
+ * The log probability for a token from an OpenAI-compatible chat completion
992
+ * response.
993
+ */
994
+ export interface Logprob {
995
+ /**
996
+ * The token.
997
+ */
998
+ token: string;
999
+
1000
+ /**
1001
+ * The log probability of the token.
1002
+ */
1003
+ logprob: number;
1004
+
1005
+ /**
1006
+ * The bytes for the token.
1007
+ */
1008
+ bytes?: Array<number> | null;
1009
+
1010
+ /**
1011
+ * The top log probabilities for the token.
1012
+ */
1013
+ top_logprobs?: Array<Logprob.TopLogprob> | null;
1014
+ }
1015
+
1016
+ export namespace Logprob {
1017
+ /**
1018
+ * The top log probability for a token from an OpenAI-compatible chat completion
1019
+ * response.
1020
+ */
1021
+ export interface TopLogprob {
1022
+ /**
1023
+ * The token.
1024
+ */
1025
+ token: string;
1026
+
1027
+ /**
1028
+ * The log probability of the token.
1029
+ */
1030
+ logprob: number;
1031
+
1032
+ /**
1033
+ * The bytes for the token.
1034
+ */
1035
+ bytes?: Array<number> | null;
1036
+ }
1037
+ }
1038
+ }
1039
+
1040
+ /**
1041
+ * Refusal content within a streamed response part.
1042
+ */
1043
+ export interface OpenAIResponseContentPartRefusal {
1044
+ refusal: string;
1045
+
1046
+ type?: 'refusal';
1047
+ }
796
1048
  }
797
1049
 
798
1050
  /**
799
- * File content for input messages in OpenAI response format.
1051
+ * Web search tool call output message for OpenAI responses.
800
1052
  */
801
- export interface OpenAIResponseInputMessageContentFile {
802
- file_data?: string | null;
1053
+ export interface OpenAIResponseOutputMessageWebSearchToolCall {
1054
+ id: string;
803
1055
 
804
- file_id?: string | null;
1056
+ status: string;
805
1057
 
806
- file_url?: string | null;
1058
+ type?: 'web_search_call';
1059
+ }
807
1060
 
808
- filename?: string | null;
1061
+ /**
1062
+ * File search tool call output message for OpenAI responses.
1063
+ */
1064
+ export interface OpenAIResponseOutputMessageFileSearchToolCall {
1065
+ id: string;
809
1066
 
810
- type?: 'input_file';
811
- }
1067
+ queries: Array<string>;
812
1068
 
813
- export interface OpenAIResponseOutputMessageContentOutputText {
814
- text: string;
1069
+ status: string;
815
1070
 
816
- annotations?: Array<
817
- | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFileCitation
818
- | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationCitation
819
- | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationContainerFileCitation
820
- | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFilePath
821
- >;
1071
+ results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result> | null;
822
1072
 
823
- type?: 'output_text';
1073
+ type?: 'file_search_call';
824
1074
  }
825
1075
 
826
- export namespace OpenAIResponseOutputMessageContentOutputText {
1076
+ export namespace OpenAIResponseOutputMessageFileSearchToolCall {
827
1077
  /**
828
- * File citation annotation for referencing specific files in response content.
1078
+ * Search results returned by the file search operation.
829
1079
  */
830
- export interface OpenAIResponseAnnotationFileCitation {
1080
+ export interface Result {
1081
+ attributes: { [key: string]: unknown };
1082
+
831
1083
  file_id: string;
832
1084
 
833
1085
  filename: string;
834
1086
 
835
- index: number;
1087
+ score: number;
836
1088
 
837
- type?: 'file_citation';
1089
+ text: string;
838
1090
  }
1091
+ }
839
1092
 
840
- /**
841
- * URL citation annotation for referencing external web resources.
842
- */
843
- export interface OpenAIResponseAnnotationCitation {
844
- end_index: number;
1093
+ /**
1094
+ * Function tool call output message for OpenAI responses.
1095
+ */
1096
+ export interface OpenAIResponseOutputMessageFunctionToolCall {
1097
+ arguments: string;
845
1098
 
846
- start_index: number;
1099
+ call_id: string;
847
1100
 
848
- title: string;
1101
+ name: string;
849
1102
 
850
- url: string;
1103
+ id?: string | null;
851
1104
 
852
- type?: 'url_citation';
853
- }
1105
+ status?: string | null;
854
1106
 
855
- export interface OpenAIResponseAnnotationContainerFileCitation {
856
- container_id: string;
1107
+ type?: 'function_call';
1108
+ }
857
1109
 
858
- end_index: number;
1110
+ /**
1111
+ * This represents the output of a function call that gets passed back to the
1112
+ * model.
1113
+ */
1114
+ export interface OpenAIResponseInputFunctionToolCallOutput {
1115
+ call_id: string;
859
1116
 
860
- file_id: string;
1117
+ output: string;
861
1118
 
862
- filename: string;
1119
+ id?: string | null;
863
1120
 
864
- start_index: number;
1121
+ status?: string | null;
865
1122
 
866
- type?: 'container_file_citation';
867
- }
1123
+ type?: 'function_call_output';
1124
+ }
868
1125
 
869
- export interface OpenAIResponseAnnotationFilePath {
870
- file_id: string;
1126
+ /**
1127
+ * A request for human approval of a tool invocation.
1128
+ */
1129
+ export interface OpenAIResponseMcpApprovalRequest {
1130
+ id: string;
871
1131
 
872
- index: number;
1132
+ arguments: string;
873
1133
 
874
- type?: 'file_path';
875
- }
1134
+ name: string;
1135
+
1136
+ server_label: string;
1137
+
1138
+ type?: 'mcp_approval_request';
876
1139
  }
877
1140
 
878
1141
  /**
879
- * Refusal content within a streamed response part.
1142
+ * A response to an MCP approval request.
880
1143
  */
881
- export interface OpenAIResponseContentPartRefusal {
882
- refusal: string;
1144
+ export interface OpenAIResponseMcpApprovalResponse {
1145
+ approval_request_id: string;
1146
+
1147
+ approve: boolean;
1148
+
1149
+ id?: string | null;
1150
+
1151
+ reason?: string | null;
883
1152
 
884
- type?: 'refusal';
1153
+ type?: 'mcp_approval_response';
1154
+ }
1155
+
1156
+ /**
1157
+ * Model Context Protocol (MCP) call output message for OpenAI responses.
1158
+ */
1159
+ export interface OpenAIResponseOutputMessageMcpCall {
1160
+ id: string;
1161
+
1162
+ arguments: string;
1163
+
1164
+ name: string;
1165
+
1166
+ server_label: string;
1167
+
1168
+ error?: string | null;
1169
+
1170
+ output?: string | null;
1171
+
1172
+ type?: 'mcp_call';
1173
+ }
1174
+
1175
+ /**
1176
+ * MCP list tools output message containing available tools from an MCP server.
1177
+ */
1178
+ export interface OpenAIResponseOutputMessageMcpListTools {
1179
+ id: string;
1180
+
1181
+ server_label: string;
1182
+
1183
+ tools: Array<OpenAIResponseOutputMessageMcpListTools.Tool>;
1184
+
1185
+ type?: 'mcp_list_tools';
1186
+ }
1187
+
1188
+ export namespace OpenAIResponseOutputMessageMcpListTools {
1189
+ /**
1190
+ * Tool definition returned by MCP list tools operation.
1191
+ */
1192
+ export interface Tool {
1193
+ input_schema: { [key: string]: unknown };
1194
+
1195
+ name: string;
1196
+
1197
+ description?: string | null;
1198
+ }
885
1199
  }
886
1200
  }
887
1201
 
888
1202
  export interface ItemCreateParams {
1203
+ /**
1204
+ * Items to include in the conversation context. You may add up to 20 items at a
1205
+ * time.
1206
+ */
889
1207
  items: Array<
890
1208
  | ItemCreateParams.OpenAIResponseMessageInput
891
1209
  | ItemCreateParams.OpenAIResponseOutputMessageWebSearchToolCall
@@ -914,7 +1232,7 @@ export namespace ItemCreateParams {
914
1232
  | OpenAIResponseMessageInput.OpenAIResponseInputMessageContentFile
915
1233
  >
916
1234
  | Array<
917
- | OpenAIResponseMessageInput.OpenAIResponseOutputMessageContentOutputText
1235
+ | OpenAIResponseMessageInput.OpenAIResponseOutputMessageContentOutputTextInput
918
1236
  | OpenAIResponseMessageInput.OpenAIResponseContentPartRefusal
919
1237
  >;
920
1238
 
@@ -965,20 +1283,22 @@ export namespace ItemCreateParams {
965
1283
  type?: 'input_file';
966
1284
  }
967
1285
 
968
- export interface OpenAIResponseOutputMessageContentOutputText {
1286
+ export interface OpenAIResponseOutputMessageContentOutputTextInput {
969
1287
  text: string;
970
1288
 
971
1289
  annotations?: Array<
972
- | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFileCitation
973
- | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationCitation
974
- | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationContainerFileCitation
975
- | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFilePath
1290
+ | OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationFileCitation
1291
+ | OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationCitation
1292
+ | OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationContainerFileCitation
1293
+ | OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationFilePath
976
1294
  >;
977
1295
 
1296
+ logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextInput.Logprob> | null;
1297
+
978
1298
  type?: 'output_text';
979
1299
  }
980
1300
 
981
- export namespace OpenAIResponseOutputMessageContentOutputText {
1301
+ export namespace OpenAIResponseOutputMessageContentOutputTextInput {
982
1302
  /**
983
1303
  * File citation annotation for referencing specific files in response content.
984
1304
  */
@@ -1028,6 +1348,55 @@ export namespace ItemCreateParams {
1028
1348
 
1029
1349
  type?: 'file_path';
1030
1350
  }
1351
+
1352
+ /**
1353
+ * The log probability for a token from an OpenAI-compatible chat completion
1354
+ * response.
1355
+ */
1356
+ export interface Logprob {
1357
+ /**
1358
+ * The token.
1359
+ */
1360
+ token: string;
1361
+
1362
+ /**
1363
+ * The log probability of the token.
1364
+ */
1365
+ logprob: number;
1366
+
1367
+ /**
1368
+ * The bytes for the token.
1369
+ */
1370
+ bytes?: Array<number> | null;
1371
+
1372
+ /**
1373
+ * The top log probabilities for the token.
1374
+ */
1375
+ top_logprobs?: Array<Logprob.TopLogprob> | null;
1376
+ }
1377
+
1378
+ export namespace Logprob {
1379
+ /**
1380
+ * The top log probability for a token from an OpenAI-compatible chat completion
1381
+ * response.
1382
+ */
1383
+ export interface TopLogprob {
1384
+ /**
1385
+ * The token.
1386
+ */
1387
+ token: string;
1388
+
1389
+ /**
1390
+ * The log probability of the token.
1391
+ */
1392
+ logprob: number;
1393
+
1394
+ /**
1395
+ * The bytes for the token.
1396
+ */
1397
+ bytes?: Array<number> | null;
1398
+ }
1399
+ }
1031
1400
  }
1032
1401
 
1033
1402
  /**