openai 7.28.0 → 7.30.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 (291) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/client.d.mts +3 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +3 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/helpers/standard-schema.d.mts +8 -3
  11. package/helpers/standard-schema.d.mts.map +1 -1
  12. package/helpers/standard-schema.d.ts +8 -3
  13. package/helpers/standard-schema.d.ts.map +1 -1
  14. package/helpers/standard-schema.js +1 -0
  15. package/helpers/standard-schema.js.map +1 -1
  16. package/helpers/standard-schema.mjs +1 -0
  17. package/helpers/standard-schema.mjs.map +1 -1
  18. package/helpers/zod.d.mts +2 -0
  19. package/helpers/zod.d.mts.map +1 -1
  20. package/helpers/zod.d.ts +2 -0
  21. package/helpers/zod.d.ts.map +1 -1
  22. package/helpers/zod.js +1 -0
  23. package/helpers/zod.js.map +1 -1
  24. package/helpers/zod.mjs +1 -0
  25. package/helpers/zod.mjs.map +1 -1
  26. package/lib/ChatCompletionStream.d.mts +2 -1
  27. package/lib/ChatCompletionStream.d.mts.map +1 -1
  28. package/lib/ChatCompletionStream.d.ts +2 -1
  29. package/lib/ChatCompletionStream.d.ts.map +1 -1
  30. package/lib/ChatCompletionStream.js +9 -2
  31. package/lib/ChatCompletionStream.js.map +1 -1
  32. package/lib/ChatCompletionStream.mjs +9 -2
  33. package/lib/ChatCompletionStream.mjs.map +1 -1
  34. package/lib/ResponsesParser.d.mts.map +1 -1
  35. package/lib/ResponsesParser.d.ts.map +1 -1
  36. package/lib/ResponsesParser.js +5 -0
  37. package/lib/ResponsesParser.js.map +1 -1
  38. package/lib/ResponsesParser.mjs +5 -0
  39. package/lib/ResponsesParser.mjs.map +1 -1
  40. package/lib/agents/agent-session-stream.d.mts +7 -0
  41. package/lib/agents/agent-session-stream.d.mts.map +1 -1
  42. package/lib/agents/agent-session-stream.d.ts +7 -0
  43. package/lib/agents/agent-session-stream.d.ts.map +1 -1
  44. package/lib/agents/agent-session-stream.js +8 -110
  45. package/lib/agents/agent-session-stream.js.map +1 -1
  46. package/lib/agents/agent-session-stream.mjs +9 -111
  47. package/lib/agents/agent-session-stream.mjs.map +1 -1
  48. package/lib/beta/agents/agent-session-create-stream.d.mts +41 -1
  49. package/lib/beta/agents/agent-session-create-stream.d.mts.map +1 -1
  50. package/lib/beta/agents/agent-session-create-stream.d.ts +41 -1
  51. package/lib/beta/agents/agent-session-create-stream.d.ts.map +1 -1
  52. package/lib/beta/agents/agent-session-create-stream.js +70 -2
  53. package/lib/beta/agents/agent-session-create-stream.js.map +1 -1
  54. package/lib/beta/agents/agent-session-create-stream.mjs +69 -2
  55. package/lib/beta/agents/agent-session-create-stream.mjs.map +1 -1
  56. package/lib/beta/agents/function-tool.d.mts.map +1 -1
  57. package/lib/beta/agents/function-tool.d.ts.map +1 -1
  58. package/lib/beta/agents/function-tool.js +22 -15
  59. package/lib/beta/agents/function-tool.js.map +1 -1
  60. package/lib/beta/agents/function-tool.mjs +22 -15
  61. package/lib/beta/agents/function-tool.mjs.map +1 -1
  62. package/lib/beta/agents/parse-result.d.mts +2 -0
  63. package/lib/beta/agents/parse-result.d.mts.map +1 -1
  64. package/lib/beta/agents/parse-result.d.ts +2 -0
  65. package/lib/beta/agents/parse-result.d.ts.map +1 -1
  66. package/lib/beta/agents/tool-dispatcher.d.mts +13 -0
  67. package/lib/beta/agents/tool-dispatcher.d.mts.map +1 -0
  68. package/lib/beta/agents/tool-dispatcher.d.ts +13 -0
  69. package/lib/beta/agents/tool-dispatcher.d.ts.map +1 -0
  70. package/lib/beta/agents/tool-dispatcher.js +185 -0
  71. package/lib/beta/agents/tool-dispatcher.js.map +1 -0
  72. package/lib/beta/agents/tool-dispatcher.mjs +181 -0
  73. package/lib/beta/agents/tool-dispatcher.mjs.map +1 -0
  74. package/lib/beta/agents/tool-error.d.mts +13 -0
  75. package/lib/beta/agents/tool-error.d.mts.map +1 -0
  76. package/lib/beta/agents/tool-error.d.ts +13 -0
  77. package/lib/beta/agents/tool-error.d.ts.map +1 -0
  78. package/lib/beta/agents/tool-error.js +3 -0
  79. package/lib/beta/agents/tool-error.js.map +1 -0
  80. package/lib/beta/agents/tool-error.mjs +2 -0
  81. package/lib/beta/agents/tool-error.mjs.map +1 -0
  82. package/lib/beta/agents/tool-stages.d.mts +12 -0
  83. package/lib/beta/agents/tool-stages.d.mts.map +1 -0
  84. package/lib/beta/agents/tool-stages.d.ts +12 -0
  85. package/lib/beta/agents/tool-stages.d.ts.map +1 -0
  86. package/lib/beta/agents/tool-stages.js +6 -0
  87. package/lib/beta/agents/tool-stages.js.map +1 -0
  88. package/lib/beta/agents/tool-stages.mjs +3 -0
  89. package/lib/beta/agents/tool-stages.mjs.map +1 -0
  90. package/lib/chat-completions/streaming.d.mts +11 -0
  91. package/lib/chat-completions/streaming.d.mts.map +1 -0
  92. package/lib/chat-completions/streaming.d.ts +11 -0
  93. package/lib/chat-completions/streaming.d.ts.map +1 -0
  94. package/lib/chat-completions/streaming.js +27 -0
  95. package/lib/chat-completions/streaming.js.map +1 -0
  96. package/lib/chat-completions/streaming.mjs +23 -0
  97. package/lib/chat-completions/streaming.mjs.map +1 -0
  98. package/package.json +1 -1
  99. package/resources/admin/organization/usage.d.mts +304 -9
  100. package/resources/admin/organization/usage.d.mts.map +1 -1
  101. package/resources/admin/organization/usage.d.ts +304 -9
  102. package/resources/admin/organization/usage.d.ts.map +1 -1
  103. package/resources/beta/agents/agents.d.mts +12 -6
  104. package/resources/beta/agents/agents.d.mts.map +1 -1
  105. package/resources/beta/agents/agents.d.ts +12 -6
  106. package/resources/beta/agents/agents.d.ts.map +1 -1
  107. package/resources/beta/agents/agents.js.map +1 -1
  108. package/resources/beta/agents/agents.mjs.map +1 -1
  109. package/resources/beta/agents/environments/templates.d.mts +6 -8
  110. package/resources/beta/agents/environments/templates.d.mts.map +1 -1
  111. package/resources/beta/agents/environments/templates.d.ts +6 -8
  112. package/resources/beta/agents/environments/templates.d.ts.map +1 -1
  113. package/resources/beta/agents/sessions/index.d.mts +1 -1
  114. package/resources/beta/agents/sessions/index.d.mts.map +1 -1
  115. package/resources/beta/agents/sessions/index.d.ts +1 -1
  116. package/resources/beta/agents/sessions/index.d.ts.map +1 -1
  117. package/resources/beta/agents/sessions/index.js +2 -2
  118. package/resources/beta/agents/sessions/index.js.map +1 -1
  119. package/resources/beta/agents/sessions/index.mjs +1 -1
  120. package/resources/beta/agents/sessions/index.mjs.map +1 -1
  121. package/resources/beta/agents/sessions/sessions.d.mts +6 -3
  122. package/resources/beta/agents/sessions/sessions.d.mts.map +1 -1
  123. package/resources/beta/agents/sessions/sessions.d.ts +6 -3
  124. package/resources/beta/agents/sessions/sessions.d.ts.map +1 -1
  125. package/resources/beta/agents/sessions/sessions.js +7 -4
  126. package/resources/beta/agents/sessions/sessions.js.map +1 -1
  127. package/resources/beta/agents/sessions/sessions.mjs +8 -5
  128. package/resources/beta/agents/sessions/sessions.mjs.map +1 -1
  129. package/resources/beta/agents/sessions/subagents/turns/turns.d.mts +2 -2
  130. package/resources/beta/agents/sessions/subagents/turns/turns.d.mts.map +1 -1
  131. package/resources/beta/agents/sessions/subagents/turns/turns.d.ts +2 -2
  132. package/resources/beta/agents/sessions/subagents/turns/turns.d.ts.map +1 -1
  133. package/resources/beta/agents/sessions/turns/index.d.mts +3 -0
  134. package/resources/beta/agents/sessions/turns/index.d.mts.map +1 -0
  135. package/resources/beta/agents/sessions/turns/index.d.ts +3 -0
  136. package/resources/beta/agents/sessions/turns/index.d.ts.map +1 -0
  137. package/resources/beta/agents/sessions/turns/index.js +9 -0
  138. package/resources/beta/agents/sessions/turns/index.js.map +1 -0
  139. package/resources/beta/agents/sessions/turns/index.mjs +4 -0
  140. package/resources/beta/agents/sessions/turns/index.mjs.map +1 -0
  141. package/resources/beta/agents/sessions/turns/items.d.mts +43 -0
  142. package/resources/beta/agents/sessions/turns/items.d.mts.map +1 -0
  143. package/resources/beta/agents/sessions/turns/items.d.ts +43 -0
  144. package/resources/beta/agents/sessions/turns/items.d.ts.map +1 -0
  145. package/resources/beta/agents/sessions/turns/items.js +40 -0
  146. package/resources/beta/agents/sessions/turns/items.js.map +1 -0
  147. package/resources/beta/agents/sessions/turns/items.mjs +36 -0
  148. package/resources/beta/agents/sessions/turns/items.mjs.map +1 -0
  149. package/resources/beta/agents/sessions/turns/turns.d.mts +128 -0
  150. package/resources/beta/agents/sessions/turns/turns.d.mts.map +1 -0
  151. package/resources/beta/agents/sessions/turns/turns.d.ts +128 -0
  152. package/resources/beta/agents/sessions/turns/turns.d.ts.map +1 -0
  153. package/resources/beta/agents/sessions/turns/turns.js +111 -0
  154. package/resources/beta/agents/sessions/turns/turns.js.map +1 -0
  155. package/resources/beta/agents/sessions/turns/turns.mjs +106 -0
  156. package/resources/beta/agents/sessions/turns/turns.mjs.map +1 -0
  157. package/resources/beta/agents/sessions/turns.d.mts +1 -123
  158. package/resources/beta/agents/sessions/turns.d.mts.map +1 -1
  159. package/resources/beta/agents/sessions/turns.d.ts +1 -123
  160. package/resources/beta/agents/sessions/turns.d.ts.map +1 -1
  161. package/resources/beta/agents/sessions/turns.js +2 -99
  162. package/resources/beta/agents/sessions/turns.js.map +1 -1
  163. package/resources/beta/agents/sessions/turns.mjs +1 -97
  164. package/resources/beta/agents/sessions/turns.mjs.map +1 -1
  165. package/resources/beta/beta.d.mts +2 -2
  166. package/resources/beta/beta.d.mts.map +1 -1
  167. package/resources/beta/beta.d.ts +2 -2
  168. package/resources/beta/beta.d.ts.map +1 -1
  169. package/resources/beta/beta.js.map +1 -1
  170. package/resources/beta/beta.mjs.map +1 -1
  171. package/resources/beta/index.d.mts +1 -1
  172. package/resources/beta/index.d.mts.map +1 -1
  173. package/resources/beta/index.d.ts +1 -1
  174. package/resources/beta/index.d.ts.map +1 -1
  175. package/resources/beta/index.js.map +1 -1
  176. package/resources/beta/index.mjs.map +1 -1
  177. package/resources/beta/responses/index.d.mts +1 -1
  178. package/resources/beta/responses/index.d.mts.map +1 -1
  179. package/resources/beta/responses/index.d.ts +1 -1
  180. package/resources/beta/responses/index.d.ts.map +1 -1
  181. package/resources/beta/responses/index.js.map +1 -1
  182. package/resources/beta/responses/index.mjs.map +1 -1
  183. package/resources/beta/responses/responses.d.mts +378 -6
  184. package/resources/beta/responses/responses.d.mts.map +1 -1
  185. package/resources/beta/responses/responses.d.ts +378 -6
  186. package/resources/beta/responses/responses.d.ts.map +1 -1
  187. package/resources/beta/responses/responses.js.map +1 -1
  188. package/resources/beta/responses/responses.mjs.map +1 -1
  189. package/resources/chat/completions/completions.d.mts +42 -8
  190. package/resources/chat/completions/completions.d.mts.map +1 -1
  191. package/resources/chat/completions/completions.d.ts +42 -8
  192. package/resources/chat/completions/completions.d.ts.map +1 -1
  193. package/resources/chat/completions/completions.js +5 -2
  194. package/resources/chat/completions/completions.js.map +1 -1
  195. package/resources/chat/completions/completions.mjs +5 -2
  196. package/resources/chat/completions/completions.mjs.map +1 -1
  197. package/resources/completions.d.mts +1 -1
  198. package/resources/completions.d.mts.map +1 -1
  199. package/resources/completions.d.ts +1 -1
  200. package/resources/completions.d.ts.map +1 -1
  201. package/resources/decisions.d.mts +196 -0
  202. package/resources/decisions.d.mts.map +1 -0
  203. package/resources/decisions.d.ts +196 -0
  204. package/resources/decisions.d.ts.map +1 -0
  205. package/resources/decisions.js +32 -0
  206. package/resources/decisions.js.map +1 -0
  207. package/resources/decisions.mjs +28 -0
  208. package/resources/decisions.mjs.map +1 -0
  209. package/resources/fine-tuning/jobs/jobs.d.mts +7 -2
  210. package/resources/fine-tuning/jobs/jobs.d.mts.map +1 -1
  211. package/resources/fine-tuning/jobs/jobs.d.ts +7 -2
  212. package/resources/fine-tuning/jobs/jobs.d.ts.map +1 -1
  213. package/resources/fine-tuning/jobs/jobs.js.map +1 -1
  214. package/resources/fine-tuning/jobs/jobs.mjs.map +1 -1
  215. package/resources/graders/grader-models.d.mts +1 -1
  216. package/resources/graders/grader-models.d.ts +1 -1
  217. package/resources/images.d.mts +4 -3
  218. package/resources/images.d.mts.map +1 -1
  219. package/resources/images.d.ts +4 -3
  220. package/resources/images.d.ts.map +1 -1
  221. package/resources/index.d.mts +1 -0
  222. package/resources/index.d.mts.map +1 -1
  223. package/resources/index.d.ts +1 -0
  224. package/resources/index.d.ts.map +1 -1
  225. package/resources/index.js +3 -1
  226. package/resources/index.js.map +1 -1
  227. package/resources/index.mjs +1 -0
  228. package/resources/index.mjs.map +1 -1
  229. package/resources/realtime/realtime.d.mts +10 -0
  230. package/resources/realtime/realtime.d.mts.map +1 -1
  231. package/resources/realtime/realtime.d.ts +10 -0
  232. package/resources/realtime/realtime.d.ts.map +1 -1
  233. package/resources/realtime/realtime.js.map +1 -1
  234. package/resources/realtime/realtime.mjs.map +1 -1
  235. package/resources/responses/responses.d.mts +380 -6
  236. package/resources/responses/responses.d.mts.map +1 -1
  237. package/resources/responses/responses.d.ts +380 -6
  238. package/resources/responses/responses.d.ts.map +1 -1
  239. package/resources/responses/responses.js.map +1 -1
  240. package/resources/responses/responses.mjs.map +1 -1
  241. package/resources/shared.d.mts +5 -0
  242. package/resources/shared.d.mts.map +1 -1
  243. package/resources/shared.d.ts +5 -0
  244. package/resources/shared.d.ts.map +1 -1
  245. package/resources/videos.d.mts +5 -0
  246. package/resources/videos.d.mts.map +1 -1
  247. package/resources/videos.d.ts +5 -0
  248. package/resources/videos.d.ts.map +1 -1
  249. package/src/client.ts +21 -0
  250. package/src/helpers/standard-schema.ts +11 -4
  251. package/src/helpers/zod.ts +4 -0
  252. package/src/lib/ChatCompletionStream.ts +10 -3
  253. package/src/lib/ResponsesParser.ts +8 -0
  254. package/src/lib/agents/agent-session-stream.ts +20 -124
  255. package/src/lib/beta/agents/agent-session-create-stream.ts +87 -1
  256. package/src/lib/beta/agents/function-tool.ts +23 -15
  257. package/src/lib/beta/agents/tool-dispatcher.ts +226 -0
  258. package/src/lib/beta/agents/tool-error.ts +12 -0
  259. package/src/lib/beta/agents/tool-stages.ts +14 -0
  260. package/src/lib/chat-completions/streaming.ts +35 -0
  261. package/src/resources/admin/organization/usage.ts +350 -9
  262. package/src/resources/beta/agents/agents.ts +14 -5
  263. package/src/resources/beta/agents/environments/templates.ts +6 -8
  264. package/src/resources/beta/agents/sessions/index.ts +7 -1
  265. package/src/resources/beta/agents/sessions/sessions.ts +16 -4
  266. package/src/resources/beta/agents/sessions/subagents/turns/turns.ts +2 -2
  267. package/src/resources/beta/agents/sessions/turns/index.ts +4 -0
  268. package/src/resources/beta/agents/sessions/turns/items.ts +79 -0
  269. package/src/resources/beta/agents/sessions/turns/turns.ts +383 -0
  270. package/src/resources/beta/agents/sessions/turns.ts +1 -373
  271. package/src/resources/beta/beta.ts +2 -0
  272. package/src/resources/beta/index.ts +1 -0
  273. package/src/resources/beta/responses/index.ts +1 -0
  274. package/src/resources/beta/responses/responses.ts +470 -5
  275. package/src/resources/chat/completions/completions.ts +65 -18
  276. package/src/resources/completions.ts +1 -1
  277. package/src/resources/decisions.ts +290 -0
  278. package/src/resources/fine-tuning/jobs/jobs.ts +7 -2
  279. package/src/resources/graders/grader-models.ts +1 -1
  280. package/src/resources/images.ts +4 -3
  281. package/src/resources/index.ts +9 -0
  282. package/src/resources/realtime/realtime.ts +10 -0
  283. package/src/resources/responses/api.md +1 -0
  284. package/src/resources/responses/responses.ts +472 -5
  285. package/src/resources/shared.ts +6 -0
  286. package/src/resources/videos.ts +6 -0
  287. package/src/version.ts +1 -1
  288. package/version.d.mts +1 -1
  289. package/version.d.ts +1 -1
  290. package/version.js +1 -1
  291. package/version.mjs +1 -1
@@ -181,6 +181,13 @@ export declare namespace UsageAudioSpeechesResponse {
181
181
  * usage result.
182
182
  */
183
183
  api_key_id?: string | null;
184
+ /**
185
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
186
+ * activity and `unlabeled` includes all records without published source
187
+ * attribution, including historical and unknown origins. Unlabeled does not imply
188
+ * direct API usage. Without source grouping, this field is null.
189
+ */
190
+ api_source?: 'agents_api' | 'unlabeled' | null;
184
191
  /**
185
192
  * When `group_by=batch`, this field tells whether the grouped usage result is
186
193
  * batch or not.
@@ -523,6 +530,13 @@ export declare namespace UsageAudioSpeechesResponse {
523
530
  * usage result.
524
531
  */
525
532
  api_key_id?: string | null;
533
+ /**
534
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
535
+ * activity and `unlabeled` includes all records without published source
536
+ * attribution, including historical and unknown origins. Unlabeled does not imply
537
+ * direct API usage. Without source grouping, this field is null.
538
+ */
539
+ api_source?: 'agents_api' | 'unlabeled' | null;
526
540
  /**
527
541
  * When `group_by=context_level`, this field provides the search context size of
528
542
  * the grouped usage result.
@@ -558,6 +572,13 @@ export declare namespace UsageAudioSpeechesResponse {
558
572
  * costs result.
559
573
  */
560
574
  api_key_id?: string | null;
575
+ /**
576
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
577
+ * activity and `unlabeled` includes all records without published source
578
+ * attribution, including historical and unknown origins. Unlabeled does not imply
579
+ * direct API usage. Without source grouping, this field is null.
580
+ */
581
+ api_source?: 'agents_api' | 'unlabeled' | null;
561
582
  /**
562
583
  * When `group_by=line_item`, this field provides the line item of the grouped
563
584
  * costs result.
@@ -578,6 +599,11 @@ export declare namespace UsageAudioSpeechesResponse {
578
599
  * result, this field is `null`.
579
600
  */
580
601
  quantity_unit?: UsageAPI.CostQuantityUnit | null;
602
+ /**
603
+ * When `group_by=user_id`, this field provides the user ID of the grouped costs
604
+ * result.
605
+ */
606
+ user_id?: string | null;
581
607
  }
582
608
  namespace OrganizationCostsResult {
583
609
  /**
@@ -636,6 +662,13 @@ export declare namespace UsageAudioTranscriptionsResponse {
636
662
  * usage result.
637
663
  */
638
664
  api_key_id?: string | null;
665
+ /**
666
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
667
+ * activity and `unlabeled` includes all records without published source
668
+ * attribution, including historical and unknown origins. Unlabeled does not imply
669
+ * direct API usage. Without source grouping, this field is null.
670
+ */
671
+ api_source?: 'agents_api' | 'unlabeled' | null;
639
672
  /**
640
673
  * When `group_by=batch`, this field tells whether the grouped usage result is
641
674
  * batch or not.
@@ -978,6 +1011,13 @@ export declare namespace UsageAudioTranscriptionsResponse {
978
1011
  * usage result.
979
1012
  */
980
1013
  api_key_id?: string | null;
1014
+ /**
1015
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
1016
+ * activity and `unlabeled` includes all records without published source
1017
+ * attribution, including historical and unknown origins. Unlabeled does not imply
1018
+ * direct API usage. Without source grouping, this field is null.
1019
+ */
1020
+ api_source?: 'agents_api' | 'unlabeled' | null;
981
1021
  /**
982
1022
  * When `group_by=context_level`, this field provides the search context size of
983
1023
  * the grouped usage result.
@@ -1013,6 +1053,13 @@ export declare namespace UsageAudioTranscriptionsResponse {
1013
1053
  * costs result.
1014
1054
  */
1015
1055
  api_key_id?: string | null;
1056
+ /**
1057
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
1058
+ * activity and `unlabeled` includes all records without published source
1059
+ * attribution, including historical and unknown origins. Unlabeled does not imply
1060
+ * direct API usage. Without source grouping, this field is null.
1061
+ */
1062
+ api_source?: 'agents_api' | 'unlabeled' | null;
1016
1063
  /**
1017
1064
  * When `group_by=line_item`, this field provides the line item of the grouped
1018
1065
  * costs result.
@@ -1033,6 +1080,11 @@ export declare namespace UsageAudioTranscriptionsResponse {
1033
1080
  * result, this field is `null`.
1034
1081
  */
1035
1082
  quantity_unit?: UsageAPI.CostQuantityUnit | null;
1083
+ /**
1084
+ * When `group_by=user_id`, this field provides the user ID of the grouped costs
1085
+ * result.
1086
+ */
1087
+ user_id?: string | null;
1036
1088
  }
1037
1089
  namespace OrganizationCostsResult {
1038
1090
  /**
@@ -1091,6 +1143,13 @@ export declare namespace UsageCodeInterpreterSessionsResponse {
1091
1143
  * usage result.
1092
1144
  */
1093
1145
  api_key_id?: string | null;
1146
+ /**
1147
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
1148
+ * activity and `unlabeled` includes all records without published source
1149
+ * attribution, including historical and unknown origins. Unlabeled does not imply
1150
+ * direct API usage. Without source grouping, this field is null.
1151
+ */
1152
+ api_source?: 'agents_api' | 'unlabeled' | null;
1094
1153
  /**
1095
1154
  * When `group_by=batch`, this field tells whether the grouped usage result is
1096
1155
  * batch or not.
@@ -1433,6 +1492,13 @@ export declare namespace UsageCodeInterpreterSessionsResponse {
1433
1492
  * usage result.
1434
1493
  */
1435
1494
  api_key_id?: string | null;
1495
+ /**
1496
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
1497
+ * activity and `unlabeled` includes all records without published source
1498
+ * attribution, including historical and unknown origins. Unlabeled does not imply
1499
+ * direct API usage. Without source grouping, this field is null.
1500
+ */
1501
+ api_source?: 'agents_api' | 'unlabeled' | null;
1436
1502
  /**
1437
1503
  * When `group_by=context_level`, this field provides the search context size of
1438
1504
  * the grouped usage result.
@@ -1468,6 +1534,13 @@ export declare namespace UsageCodeInterpreterSessionsResponse {
1468
1534
  * costs result.
1469
1535
  */
1470
1536
  api_key_id?: string | null;
1537
+ /**
1538
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
1539
+ * activity and `unlabeled` includes all records without published source
1540
+ * attribution, including historical and unknown origins. Unlabeled does not imply
1541
+ * direct API usage. Without source grouping, this field is null.
1542
+ */
1543
+ api_source?: 'agents_api' | 'unlabeled' | null;
1471
1544
  /**
1472
1545
  * When `group_by=line_item`, this field provides the line item of the grouped
1473
1546
  * costs result.
@@ -1488,6 +1561,11 @@ export declare namespace UsageCodeInterpreterSessionsResponse {
1488
1561
  * result, this field is `null`.
1489
1562
  */
1490
1563
  quantity_unit?: UsageAPI.CostQuantityUnit | null;
1564
+ /**
1565
+ * When `group_by=user_id`, this field provides the user ID of the grouped costs
1566
+ * result.
1567
+ */
1568
+ user_id?: string | null;
1491
1569
  }
1492
1570
  namespace OrganizationCostsResult {
1493
1571
  /**
@@ -1546,6 +1624,13 @@ export declare namespace UsageCompletionsResponse {
1546
1624
  * usage result.
1547
1625
  */
1548
1626
  api_key_id?: string | null;
1627
+ /**
1628
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
1629
+ * activity and `unlabeled` includes all records without published source
1630
+ * attribution, including historical and unknown origins. Unlabeled does not imply
1631
+ * direct API usage. Without source grouping, this field is null.
1632
+ */
1633
+ api_source?: 'agents_api' | 'unlabeled' | null;
1549
1634
  /**
1550
1635
  * When `group_by=batch`, this field tells whether the grouped usage result is
1551
1636
  * batch or not.
@@ -1888,6 +1973,13 @@ export declare namespace UsageCompletionsResponse {
1888
1973
  * usage result.
1889
1974
  */
1890
1975
  api_key_id?: string | null;
1976
+ /**
1977
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
1978
+ * activity and `unlabeled` includes all records without published source
1979
+ * attribution, including historical and unknown origins. Unlabeled does not imply
1980
+ * direct API usage. Without source grouping, this field is null.
1981
+ */
1982
+ api_source?: 'agents_api' | 'unlabeled' | null;
1891
1983
  /**
1892
1984
  * When `group_by=context_level`, this field provides the search context size of
1893
1985
  * the grouped usage result.
@@ -1923,6 +2015,13 @@ export declare namespace UsageCompletionsResponse {
1923
2015
  * costs result.
1924
2016
  */
1925
2017
  api_key_id?: string | null;
2018
+ /**
2019
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
2020
+ * activity and `unlabeled` includes all records without published source
2021
+ * attribution, including historical and unknown origins. Unlabeled does not imply
2022
+ * direct API usage. Without source grouping, this field is null.
2023
+ */
2024
+ api_source?: 'agents_api' | 'unlabeled' | null;
1926
2025
  /**
1927
2026
  * When `group_by=line_item`, this field provides the line item of the grouped
1928
2027
  * costs result.
@@ -1943,6 +2042,11 @@ export declare namespace UsageCompletionsResponse {
1943
2042
  * result, this field is `null`.
1944
2043
  */
1945
2044
  quantity_unit?: UsageAPI.CostQuantityUnit | null;
2045
+ /**
2046
+ * When `group_by=user_id`, this field provides the user ID of the grouped costs
2047
+ * result.
2048
+ */
2049
+ user_id?: string | null;
1946
2050
  }
1947
2051
  namespace OrganizationCostsResult {
1948
2052
  /**
@@ -2001,6 +2105,13 @@ export declare namespace UsageCostsResponse {
2001
2105
  * usage result.
2002
2106
  */
2003
2107
  api_key_id?: string | null;
2108
+ /**
2109
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
2110
+ * activity and `unlabeled` includes all records without published source
2111
+ * attribution, including historical and unknown origins. Unlabeled does not imply
2112
+ * direct API usage. Without source grouping, this field is null.
2113
+ */
2114
+ api_source?: 'agents_api' | 'unlabeled' | null;
2004
2115
  /**
2005
2116
  * When `group_by=batch`, this field tells whether the grouped usage result is
2006
2117
  * batch or not.
@@ -2343,6 +2454,13 @@ export declare namespace UsageCostsResponse {
2343
2454
  * usage result.
2344
2455
  */
2345
2456
  api_key_id?: string | null;
2457
+ /**
2458
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
2459
+ * activity and `unlabeled` includes all records without published source
2460
+ * attribution, including historical and unknown origins. Unlabeled does not imply
2461
+ * direct API usage. Without source grouping, this field is null.
2462
+ */
2463
+ api_source?: 'agents_api' | 'unlabeled' | null;
2346
2464
  /**
2347
2465
  * When `group_by=context_level`, this field provides the search context size of
2348
2466
  * the grouped usage result.
@@ -2378,6 +2496,13 @@ export declare namespace UsageCostsResponse {
2378
2496
  * costs result.
2379
2497
  */
2380
2498
  api_key_id?: string | null;
2499
+ /**
2500
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
2501
+ * activity and `unlabeled` includes all records without published source
2502
+ * attribution, including historical and unknown origins. Unlabeled does not imply
2503
+ * direct API usage. Without source grouping, this field is null.
2504
+ */
2505
+ api_source?: 'agents_api' | 'unlabeled' | null;
2381
2506
  /**
2382
2507
  * When `group_by=line_item`, this field provides the line item of the grouped
2383
2508
  * costs result.
@@ -2398,6 +2523,11 @@ export declare namespace UsageCostsResponse {
2398
2523
  * result, this field is `null`.
2399
2524
  */
2400
2525
  quantity_unit?: UsageAPI.CostQuantityUnit | null;
2526
+ /**
2527
+ * When `group_by=user_id`, this field provides the user ID of the grouped costs
2528
+ * result.
2529
+ */
2530
+ user_id?: string | null;
2401
2531
  }
2402
2532
  namespace OrganizationCostsResult {
2403
2533
  /**
@@ -2456,6 +2586,13 @@ export declare namespace UsageEmbeddingsResponse {
2456
2586
  * usage result.
2457
2587
  */
2458
2588
  api_key_id?: string | null;
2589
+ /**
2590
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
2591
+ * activity and `unlabeled` includes all records without published source
2592
+ * attribution, including historical and unknown origins. Unlabeled does not imply
2593
+ * direct API usage. Without source grouping, this field is null.
2594
+ */
2595
+ api_source?: 'agents_api' | 'unlabeled' | null;
2459
2596
  /**
2460
2597
  * When `group_by=batch`, this field tells whether the grouped usage result is
2461
2598
  * batch or not.
@@ -2798,6 +2935,13 @@ export declare namespace UsageEmbeddingsResponse {
2798
2935
  * usage result.
2799
2936
  */
2800
2937
  api_key_id?: string | null;
2938
+ /**
2939
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
2940
+ * activity and `unlabeled` includes all records without published source
2941
+ * attribution, including historical and unknown origins. Unlabeled does not imply
2942
+ * direct API usage. Without source grouping, this field is null.
2943
+ */
2944
+ api_source?: 'agents_api' | 'unlabeled' | null;
2801
2945
  /**
2802
2946
  * When `group_by=context_level`, this field provides the search context size of
2803
2947
  * the grouped usage result.
@@ -2833,6 +2977,13 @@ export declare namespace UsageEmbeddingsResponse {
2833
2977
  * costs result.
2834
2978
  */
2835
2979
  api_key_id?: string | null;
2980
+ /**
2981
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
2982
+ * activity and `unlabeled` includes all records without published source
2983
+ * attribution, including historical and unknown origins. Unlabeled does not imply
2984
+ * direct API usage. Without source grouping, this field is null.
2985
+ */
2986
+ api_source?: 'agents_api' | 'unlabeled' | null;
2836
2987
  /**
2837
2988
  * When `group_by=line_item`, this field provides the line item of the grouped
2838
2989
  * costs result.
@@ -2853,6 +3004,11 @@ export declare namespace UsageEmbeddingsResponse {
2853
3004
  * result, this field is `null`.
2854
3005
  */
2855
3006
  quantity_unit?: UsageAPI.CostQuantityUnit | null;
3007
+ /**
3008
+ * When `group_by=user_id`, this field provides the user ID of the grouped costs
3009
+ * result.
3010
+ */
3011
+ user_id?: string | null;
2856
3012
  }
2857
3013
  namespace OrganizationCostsResult {
2858
3014
  /**
@@ -2911,6 +3067,13 @@ export declare namespace UsageFileSearchCallsResponse {
2911
3067
  * usage result.
2912
3068
  */
2913
3069
  api_key_id?: string | null;
3070
+ /**
3071
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
3072
+ * activity and `unlabeled` includes all records without published source
3073
+ * attribution, including historical and unknown origins. Unlabeled does not imply
3074
+ * direct API usage. Without source grouping, this field is null.
3075
+ */
3076
+ api_source?: 'agents_api' | 'unlabeled' | null;
2914
3077
  /**
2915
3078
  * When `group_by=batch`, this field tells whether the grouped usage result is
2916
3079
  * batch or not.
@@ -3253,6 +3416,13 @@ export declare namespace UsageFileSearchCallsResponse {
3253
3416
  * usage result.
3254
3417
  */
3255
3418
  api_key_id?: string | null;
3419
+ /**
3420
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
3421
+ * activity and `unlabeled` includes all records without published source
3422
+ * attribution, including historical and unknown origins. Unlabeled does not imply
3423
+ * direct API usage. Without source grouping, this field is null.
3424
+ */
3425
+ api_source?: 'agents_api' | 'unlabeled' | null;
3256
3426
  /**
3257
3427
  * When `group_by=context_level`, this field provides the search context size of
3258
3428
  * the grouped usage result.
@@ -3288,6 +3458,13 @@ export declare namespace UsageFileSearchCallsResponse {
3288
3458
  * costs result.
3289
3459
  */
3290
3460
  api_key_id?: string | null;
3461
+ /**
3462
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
3463
+ * activity and `unlabeled` includes all records without published source
3464
+ * attribution, including historical and unknown origins. Unlabeled does not imply
3465
+ * direct API usage. Without source grouping, this field is null.
3466
+ */
3467
+ api_source?: 'agents_api' | 'unlabeled' | null;
3291
3468
  /**
3292
3469
  * When `group_by=line_item`, this field provides the line item of the grouped
3293
3470
  * costs result.
@@ -3308,6 +3485,11 @@ export declare namespace UsageFileSearchCallsResponse {
3308
3485
  * result, this field is `null`.
3309
3486
  */
3310
3487
  quantity_unit?: UsageAPI.CostQuantityUnit | null;
3488
+ /**
3489
+ * When `group_by=user_id`, this field provides the user ID of the grouped costs
3490
+ * result.
3491
+ */
3492
+ user_id?: string | null;
3311
3493
  }
3312
3494
  namespace OrganizationCostsResult {
3313
3495
  /**
@@ -3366,6 +3548,13 @@ export declare namespace UsageImagesResponse {
3366
3548
  * usage result.
3367
3549
  */
3368
3550
  api_key_id?: string | null;
3551
+ /**
3552
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
3553
+ * activity and `unlabeled` includes all records without published source
3554
+ * attribution, including historical and unknown origins. Unlabeled does not imply
3555
+ * direct API usage. Without source grouping, this field is null.
3556
+ */
3557
+ api_source?: 'agents_api' | 'unlabeled' | null;
3369
3558
  /**
3370
3559
  * When `group_by=batch`, this field tells whether the grouped usage result is
3371
3560
  * batch or not.
@@ -3708,6 +3897,13 @@ export declare namespace UsageImagesResponse {
3708
3897
  * usage result.
3709
3898
  */
3710
3899
  api_key_id?: string | null;
3900
+ /**
3901
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
3902
+ * activity and `unlabeled` includes all records without published source
3903
+ * attribution, including historical and unknown origins. Unlabeled does not imply
3904
+ * direct API usage. Without source grouping, this field is null.
3905
+ */
3906
+ api_source?: 'agents_api' | 'unlabeled' | null;
3711
3907
  /**
3712
3908
  * When `group_by=context_level`, this field provides the search context size of
3713
3909
  * the grouped usage result.
@@ -3743,6 +3939,13 @@ export declare namespace UsageImagesResponse {
3743
3939
  * costs result.
3744
3940
  */
3745
3941
  api_key_id?: string | null;
3942
+ /**
3943
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
3944
+ * activity and `unlabeled` includes all records without published source
3945
+ * attribution, including historical and unknown origins. Unlabeled does not imply
3946
+ * direct API usage. Without source grouping, this field is null.
3947
+ */
3948
+ api_source?: 'agents_api' | 'unlabeled' | null;
3746
3949
  /**
3747
3950
  * When `group_by=line_item`, this field provides the line item of the grouped
3748
3951
  * costs result.
@@ -3763,6 +3966,11 @@ export declare namespace UsageImagesResponse {
3763
3966
  * result, this field is `null`.
3764
3967
  */
3765
3968
  quantity_unit?: UsageAPI.CostQuantityUnit | null;
3969
+ /**
3970
+ * When `group_by=user_id`, this field provides the user ID of the grouped costs
3971
+ * result.
3972
+ */
3973
+ user_id?: string | null;
3766
3974
  }
3767
3975
  namespace OrganizationCostsResult {
3768
3976
  /**
@@ -3821,6 +4029,13 @@ export declare namespace UsageModerationsResponse {
3821
4029
  * usage result.
3822
4030
  */
3823
4031
  api_key_id?: string | null;
4032
+ /**
4033
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
4034
+ * activity and `unlabeled` includes all records without published source
4035
+ * attribution, including historical and unknown origins. Unlabeled does not imply
4036
+ * direct API usage. Without source grouping, this field is null.
4037
+ */
4038
+ api_source?: 'agents_api' | 'unlabeled' | null;
3824
4039
  /**
3825
4040
  * When `group_by=batch`, this field tells whether the grouped usage result is
3826
4041
  * batch or not.
@@ -4163,6 +4378,13 @@ export declare namespace UsageModerationsResponse {
4163
4378
  * usage result.
4164
4379
  */
4165
4380
  api_key_id?: string | null;
4381
+ /**
4382
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
4383
+ * activity and `unlabeled` includes all records without published source
4384
+ * attribution, including historical and unknown origins. Unlabeled does not imply
4385
+ * direct API usage. Without source grouping, this field is null.
4386
+ */
4387
+ api_source?: 'agents_api' | 'unlabeled' | null;
4166
4388
  /**
4167
4389
  * When `group_by=context_level`, this field provides the search context size of
4168
4390
  * the grouped usage result.
@@ -4198,6 +4420,13 @@ export declare namespace UsageModerationsResponse {
4198
4420
  * costs result.
4199
4421
  */
4200
4422
  api_key_id?: string | null;
4423
+ /**
4424
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
4425
+ * activity and `unlabeled` includes all records without published source
4426
+ * attribution, including historical and unknown origins. Unlabeled does not imply
4427
+ * direct API usage. Without source grouping, this field is null.
4428
+ */
4429
+ api_source?: 'agents_api' | 'unlabeled' | null;
4201
4430
  /**
4202
4431
  * When `group_by=line_item`, this field provides the line item of the grouped
4203
4432
  * costs result.
@@ -4218,6 +4447,11 @@ export declare namespace UsageModerationsResponse {
4218
4447
  * result, this field is `null`.
4219
4448
  */
4220
4449
  quantity_unit?: UsageAPI.CostQuantityUnit | null;
4450
+ /**
4451
+ * When `group_by=user_id`, this field provides the user ID of the grouped costs
4452
+ * result.
4453
+ */
4454
+ user_id?: string | null;
4221
4455
  }
4222
4456
  namespace OrganizationCostsResult {
4223
4457
  /**
@@ -4276,6 +4510,13 @@ export declare namespace UsageVectorStoresResponse {
4276
4510
  * usage result.
4277
4511
  */
4278
4512
  api_key_id?: string | null;
4513
+ /**
4514
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
4515
+ * activity and `unlabeled` includes all records without published source
4516
+ * attribution, including historical and unknown origins. Unlabeled does not imply
4517
+ * direct API usage. Without source grouping, this field is null.
4518
+ */
4519
+ api_source?: 'agents_api' | 'unlabeled' | null;
4279
4520
  /**
4280
4521
  * When `group_by=batch`, this field tells whether the grouped usage result is
4281
4522
  * batch or not.
@@ -4618,6 +4859,13 @@ export declare namespace UsageVectorStoresResponse {
4618
4859
  * usage result.
4619
4860
  */
4620
4861
  api_key_id?: string | null;
4862
+ /**
4863
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
4864
+ * activity and `unlabeled` includes all records without published source
4865
+ * attribution, including historical and unknown origins. Unlabeled does not imply
4866
+ * direct API usage. Without source grouping, this field is null.
4867
+ */
4868
+ api_source?: 'agents_api' | 'unlabeled' | null;
4621
4869
  /**
4622
4870
  * When `group_by=context_level`, this field provides the search context size of
4623
4871
  * the grouped usage result.
@@ -4653,6 +4901,13 @@ export declare namespace UsageVectorStoresResponse {
4653
4901
  * costs result.
4654
4902
  */
4655
4903
  api_key_id?: string | null;
4904
+ /**
4905
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
4906
+ * activity and `unlabeled` includes all records without published source
4907
+ * attribution, including historical and unknown origins. Unlabeled does not imply
4908
+ * direct API usage. Without source grouping, this field is null.
4909
+ */
4910
+ api_source?: 'agents_api' | 'unlabeled' | null;
4656
4911
  /**
4657
4912
  * When `group_by=line_item`, this field provides the line item of the grouped
4658
4913
  * costs result.
@@ -4673,6 +4928,11 @@ export declare namespace UsageVectorStoresResponse {
4673
4928
  * result, this field is `null`.
4674
4929
  */
4675
4930
  quantity_unit?: UsageAPI.CostQuantityUnit | null;
4931
+ /**
4932
+ * When `group_by=user_id`, this field provides the user ID of the grouped costs
4933
+ * result.
4934
+ */
4935
+ user_id?: string | null;
4676
4936
  }
4677
4937
  namespace OrganizationCostsResult {
4678
4938
  /**
@@ -4731,6 +4991,13 @@ export declare namespace UsageWebSearchCallsResponse {
4731
4991
  * usage result.
4732
4992
  */
4733
4993
  api_key_id?: string | null;
4994
+ /**
4995
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
4996
+ * activity and `unlabeled` includes all records without published source
4997
+ * attribution, including historical and unknown origins. Unlabeled does not imply
4998
+ * direct API usage. Without source grouping, this field is null.
4999
+ */
5000
+ api_source?: 'agents_api' | 'unlabeled' | null;
4734
5001
  /**
4735
5002
  * When `group_by=batch`, this field tells whether the grouped usage result is
4736
5003
  * batch or not.
@@ -5073,6 +5340,13 @@ export declare namespace UsageWebSearchCallsResponse {
5073
5340
  * usage result.
5074
5341
  */
5075
5342
  api_key_id?: string | null;
5343
+ /**
5344
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
5345
+ * activity and `unlabeled` includes all records without published source
5346
+ * attribution, including historical and unknown origins. Unlabeled does not imply
5347
+ * direct API usage. Without source grouping, this field is null.
5348
+ */
5349
+ api_source?: 'agents_api' | 'unlabeled' | null;
5076
5350
  /**
5077
5351
  * When `group_by=context_level`, this field provides the search context size of
5078
5352
  * the grouped usage result.
@@ -5108,6 +5382,13 @@ export declare namespace UsageWebSearchCallsResponse {
5108
5382
  * costs result.
5109
5383
  */
5110
5384
  api_key_id?: string | null;
5385
+ /**
5386
+ * When grouped by `api_source`, `agents_api` identifies attributed Agents API
5387
+ * activity and `unlabeled` includes all records without published source
5388
+ * attribution, including historical and unknown origins. Unlabeled does not imply
5389
+ * direct API usage. Without source grouping, this field is null.
5390
+ */
5391
+ api_source?: 'agents_api' | 'unlabeled' | null;
5111
5392
  /**
5112
5393
  * When `group_by=line_item`, this field provides the line item of the grouped
5113
5394
  * costs result.
@@ -5128,6 +5409,11 @@ export declare namespace UsageWebSearchCallsResponse {
5128
5409
  * result, this field is `null`.
5129
5410
  */
5130
5411
  quantity_unit?: UsageAPI.CostQuantityUnit | null;
5412
+ /**
5413
+ * When `group_by=user_id`, this field provides the user ID of the grouped costs
5414
+ * result.
5415
+ */
5416
+ user_id?: string | null;
5131
5417
  }
5132
5418
  namespace OrganizationCostsResult {
5133
5419
  /**
@@ -5306,10 +5592,12 @@ export interface UsageCompletionsParams {
5306
5592
  end_time?: number;
5307
5593
  /**
5308
5594
  * Group the usage data by the specified fields. Support fields include
5309
- * `project_id`, `user_id`, `api_key_id`, `model`, `batch`, `service_tier` or any
5310
- * combination of them.
5595
+ * `project_id`, `user_id`, `api_key_id`, `model`, `batch`, `service_tier`,
5596
+ * `api_source` or any combination of them. When grouped by `api_source`, results
5597
+ * use `agents_api` for attributed Agents API activity and `unlabeled` for all
5598
+ * other activity. Without source grouping, `api_source` is null.
5311
5599
  */
5312
- group_by?: Array<'project_id' | 'user_id' | 'api_key_id' | 'model' | 'batch' | 'service_tier'>;
5600
+ group_by?: Array<'project_id' | 'user_id' | 'api_key_id' | 'model' | 'batch' | 'service_tier' | 'api_source'>;
5313
5601
  /**
5314
5602
  * Specifies the number of buckets to return.
5315
5603
  *
@@ -5355,10 +5643,15 @@ export interface UsageCostsParams {
5355
5643
  */
5356
5644
  end_time?: number;
5357
5645
  /**
5358
- * Group the costs by the specified fields. Support fields include `project_id`,
5359
- * `line_item`, `api_key_id` and any combination of them.
5646
+ * Group the costs by the specified fields. Supported fields include `project_id`,
5647
+ * `user_id`, `line_item`, `api_key_id`, and `api_source`. Support for combining
5648
+ * `user_id` with `project_id` grouping or the `project_ids` filter depends on the
5649
+ * organization and requested time range. Unsupported combinations return HTTP 400.
5650
+ * When grouped by `api_source`, results use `agents_api` for attributed Agents API
5651
+ * activity and `unlabeled` for all other activity. Without source grouping,
5652
+ * `api_source` is null.
5360
5653
  */
5361
- group_by?: Array<'project_id' | 'line_item' | 'api_key_id'>;
5654
+ group_by?: Array<'project_id' | 'user_id' | 'line_item' | 'api_key_id' | 'api_source'>;
5362
5655
  /**
5363
5656
  * A limit on the number of buckets to be returned. Limit can range between 1 and
5364
5657
  * 180, and the default is 7.
@@ -5648,10 +5941,12 @@ export interface UsageWebSearchCallsParams {
5648
5941
  end_time?: number;
5649
5942
  /**
5650
5943
  * Group the usage data by the specified fields. Support fields include
5651
- * `project_id`, `user_id`, `api_key_id`, `model`, `context_level` or any
5652
- * combination of them.
5944
+ * `project_id`, `user_id`, `api_key_id`, `model`, `context_level`, `api_source` or
5945
+ * any combination of them. When grouped by `api_source`, results use `agents_api`
5946
+ * for attributed Agents API activity and `unlabeled` for all other activity.
5947
+ * Without source grouping, `api_source` is null.
5653
5948
  */
5654
- group_by?: Array<'project_id' | 'user_id' | 'api_key_id' | 'model' | 'context_level'>;
5949
+ group_by?: Array<'project_id' | 'user_id' | 'api_key_id' | 'model' | 'context_level' | 'api_source'>;
5655
5950
  /**
5656
5951
  * Specifies the number of buckets to return.
5657
5952
  *