telnyx 6.65.0 → 6.66.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 (177) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/client.d.mts +11 -10
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +11 -10
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/ai/ai.d.mts +114 -116
  10. package/resources/ai/ai.d.mts.map +1 -1
  11. package/resources/ai/ai.d.ts +114 -116
  12. package/resources/ai/ai.d.ts.map +1 -1
  13. package/resources/ai/ai.js.map +1 -1
  14. package/resources/ai/ai.mjs.map +1 -1
  15. package/resources/ai/assistants/assistants.d.mts +139 -334
  16. package/resources/ai/assistants/assistants.d.mts.map +1 -1
  17. package/resources/ai/assistants/assistants.d.ts +139 -334
  18. package/resources/ai/assistants/assistants.d.ts.map +1 -1
  19. package/resources/ai/assistants/assistants.js.map +1 -1
  20. package/resources/ai/assistants/assistants.mjs.map +1 -1
  21. package/resources/ai/assistants/canary-deploys.d.mts +70 -241
  22. package/resources/ai/assistants/canary-deploys.d.mts.map +1 -1
  23. package/resources/ai/assistants/canary-deploys.d.ts +70 -241
  24. package/resources/ai/assistants/canary-deploys.d.ts.map +1 -1
  25. package/resources/ai/assistants/index.d.mts +2 -2
  26. package/resources/ai/assistants/index.d.mts.map +1 -1
  27. package/resources/ai/assistants/index.d.ts +2 -2
  28. package/resources/ai/assistants/index.d.ts.map +1 -1
  29. package/resources/ai/assistants/index.js.map +1 -1
  30. package/resources/ai/assistants/index.mjs.map +1 -1
  31. package/resources/ai/assistants/versions.d.mts +6 -220
  32. package/resources/ai/assistants/versions.d.mts.map +1 -1
  33. package/resources/ai/assistants/versions.d.ts +6 -220
  34. package/resources/ai/assistants/versions.d.ts.map +1 -1
  35. package/resources/ai/index.d.mts +2 -2
  36. package/resources/ai/index.d.mts.map +1 -1
  37. package/resources/ai/index.d.ts +2 -2
  38. package/resources/ai/index.d.ts.map +1 -1
  39. package/resources/ai/index.js.map +1 -1
  40. package/resources/ai/index.mjs.map +1 -1
  41. package/resources/ai/openai/openai.d.mts +2 -113
  42. package/resources/ai/openai/openai.d.mts.map +1 -1
  43. package/resources/ai/openai/openai.d.ts +2 -113
  44. package/resources/ai/openai/openai.d.ts.map +1 -1
  45. package/resources/ai/openai/openai.js.map +1 -1
  46. package/resources/ai/openai/openai.mjs.map +1 -1
  47. package/resources/calls/actions.d.mts +177 -120
  48. package/resources/calls/actions.d.mts.map +1 -1
  49. package/resources/calls/actions.d.ts +177 -120
  50. package/resources/calls/actions.d.ts.map +1 -1
  51. package/resources/calls/actions.js +3 -5
  52. package/resources/calls/actions.js.map +1 -1
  53. package/resources/calls/actions.mjs +3 -5
  54. package/resources/calls/actions.mjs.map +1 -1
  55. package/resources/calls/calls.d.mts +2 -2
  56. package/resources/calls/calls.d.mts.map +1 -1
  57. package/resources/calls/calls.d.ts +2 -2
  58. package/resources/calls/calls.d.ts.map +1 -1
  59. package/resources/calls/calls.js.map +1 -1
  60. package/resources/calls/calls.mjs.map +1 -1
  61. package/resources/calls/index.d.mts +1 -1
  62. package/resources/calls/index.d.mts.map +1 -1
  63. package/resources/calls/index.d.ts +1 -1
  64. package/resources/calls/index.d.ts.map +1 -1
  65. package/resources/calls/index.js.map +1 -1
  66. package/resources/calls/index.mjs.map +1 -1
  67. package/resources/conferences/actions.d.mts +1 -11
  68. package/resources/conferences/actions.d.mts.map +1 -1
  69. package/resources/conferences/actions.d.ts +1 -11
  70. package/resources/conferences/actions.d.ts.map +1 -1
  71. package/resources/faxes/faxes.d.mts +24 -8
  72. package/resources/faxes/faxes.d.mts.map +1 -1
  73. package/resources/faxes/faxes.d.ts +24 -8
  74. package/resources/faxes/faxes.d.ts.map +1 -1
  75. package/resources/faxes/faxes.js +12 -0
  76. package/resources/faxes/faxes.js.map +1 -1
  77. package/resources/faxes/faxes.mjs +12 -0
  78. package/resources/faxes/faxes.mjs.map +1 -1
  79. package/resources/index.d.mts +5 -5
  80. package/resources/index.d.mts.map +1 -1
  81. package/resources/index.d.ts +5 -5
  82. package/resources/index.d.ts.map +1 -1
  83. package/resources/index.js.map +1 -1
  84. package/resources/index.mjs.map +1 -1
  85. package/resources/networks/networks.d.mts +25 -2
  86. package/resources/networks/networks.d.mts.map +1 -1
  87. package/resources/networks/networks.d.ts +25 -2
  88. package/resources/networks/networks.d.ts.map +1 -1
  89. package/resources/networks/networks.js.map +1 -1
  90. package/resources/networks/networks.mjs.map +1 -1
  91. package/resources/public-internet-gateways.d.mts +40 -50
  92. package/resources/public-internet-gateways.d.mts.map +1 -1
  93. package/resources/public-internet-gateways.d.ts +40 -50
  94. package/resources/public-internet-gateways.d.ts.map +1 -1
  95. package/resources/public-internet-gateways.js +1 -1
  96. package/resources/public-internet-gateways.js.map +1 -1
  97. package/resources/public-internet-gateways.mjs +1 -1
  98. package/resources/public-internet-gateways.mjs.map +1 -1
  99. package/resources/shared.d.mts +10 -0
  100. package/resources/shared.d.mts.map +1 -1
  101. package/resources/shared.d.ts +10 -0
  102. package/resources/shared.d.ts.map +1 -1
  103. package/resources/texml/accounts/calls/calls.d.mts +27 -6
  104. package/resources/texml/accounts/calls/calls.d.mts.map +1 -1
  105. package/resources/texml/accounts/calls/calls.d.ts +27 -6
  106. package/resources/texml/accounts/calls/calls.d.ts.map +1 -1
  107. package/resources/texml/accounts/calls/calls.js.map +1 -1
  108. package/resources/texml/accounts/calls/calls.mjs.map +1 -1
  109. package/resources/texml/texml.d.mts +9 -2
  110. package/resources/texml/texml.d.mts.map +1 -1
  111. package/resources/texml/texml.d.ts +9 -2
  112. package/resources/texml/texml.d.ts.map +1 -1
  113. package/resources/texml/texml.js.map +1 -1
  114. package/resources/texml/texml.mjs.map +1 -1
  115. package/resources/uac-connections/index.d.mts +1 -1
  116. package/resources/uac-connections/index.d.mts.map +1 -1
  117. package/resources/uac-connections/index.d.ts +1 -1
  118. package/resources/uac-connections/index.d.ts.map +1 -1
  119. package/resources/uac-connections/index.js.map +1 -1
  120. package/resources/uac-connections/index.mjs.map +1 -1
  121. package/resources/uac-connections/uac-connections.d.mts +211 -1861
  122. package/resources/uac-connections/uac-connections.d.mts.map +1 -1
  123. package/resources/uac-connections/uac-connections.d.ts +211 -1861
  124. package/resources/uac-connections/uac-connections.d.ts.map +1 -1
  125. package/resources/uac-connections/uac-connections.js +1 -1
  126. package/resources/uac-connections/uac-connections.js.map +1 -1
  127. package/resources/uac-connections/uac-connections.mjs +1 -1
  128. package/resources/uac-connections/uac-connections.mjs.map +1 -1
  129. package/resources/virtual-cross-connects.d.mts +48 -504
  130. package/resources/virtual-cross-connects.d.mts.map +1 -1
  131. package/resources/virtual-cross-connects.d.ts +48 -504
  132. package/resources/virtual-cross-connects.d.ts.map +1 -1
  133. package/resources/virtual-cross-connects.js +1 -1
  134. package/resources/virtual-cross-connects.js.map +1 -1
  135. package/resources/virtual-cross-connects.mjs +1 -1
  136. package/resources/virtual-cross-connects.mjs.map +1 -1
  137. package/resources/webhooks.d.mts +20 -10
  138. package/resources/webhooks.d.mts.map +1 -1
  139. package/resources/webhooks.d.ts +20 -10
  140. package/resources/webhooks.d.ts.map +1 -1
  141. package/resources/wireguard-interfaces.d.mts +43 -127
  142. package/resources/wireguard-interfaces.d.mts.map +1 -1
  143. package/resources/wireguard-interfaces.d.ts +43 -127
  144. package/resources/wireguard-interfaces.d.ts.map +1 -1
  145. package/resources/wireguard-interfaces.js +5 -2
  146. package/resources/wireguard-interfaces.js.map +1 -1
  147. package/resources/wireguard-interfaces.mjs +5 -2
  148. package/resources/wireguard-interfaces.mjs.map +1 -1
  149. package/src/client.ts +27 -16
  150. package/src/resources/ai/ai.ts +139 -130
  151. package/src/resources/ai/assistants/assistants.ts +164 -363
  152. package/src/resources/ai/assistants/canary-deploys.ts +75 -266
  153. package/src/resources/ai/assistants/index.ts +10 -0
  154. package/src/resources/ai/assistants/versions.ts +6 -244
  155. package/src/resources/ai/index.ts +6 -0
  156. package/src/resources/ai/openai/openai.ts +2 -131
  157. package/src/resources/calls/actions.ts +284 -184
  158. package/src/resources/calls/calls.ts +4 -0
  159. package/src/resources/calls/index.ts +2 -0
  160. package/src/resources/conferences/actions.ts +1 -13
  161. package/src/resources/faxes/faxes.ts +24 -8
  162. package/src/resources/index.ts +13 -8
  163. package/src/resources/networks/networks.ts +31 -4
  164. package/src/resources/public-internet-gateways.ts +46 -55
  165. package/src/resources/shared.ts +12 -0
  166. package/src/resources/texml/accounts/calls/calls.ts +30 -6
  167. package/src/resources/texml/texml.ts +10 -2
  168. package/src/resources/uac-connections/index.ts +6 -2
  169. package/src/resources/uac-connections/uac-connections.ts +397 -2396
  170. package/src/resources/virtual-cross-connects.ts +54 -595
  171. package/src/resources/webhooks.ts +21 -10
  172. package/src/resources/wireguard-interfaces.ts +53 -158
  173. package/src/version.ts +1 -1
  174. package/version.d.mts +1 -1
  175. package/version.d.ts +1 -1
  176. package/version.js +1 -1
  177. package/version.mjs +1 -1
@@ -174,7 +174,7 @@ export interface UpdateAssistant {
174
174
  * `/ai/integrations/connections`. Each item references a catalog integration by
175
175
  * `integration_id`.
176
176
  */
177
- integrations?: Array<UpdateAssistant.Integration>;
177
+ integrations?: Array<AssistantsAPI.AssistantIntegration>;
178
178
 
179
179
  /**
180
180
  * Settings for interruptions and how the assistant decides the user has finished
@@ -184,7 +184,7 @@ export interface UpdateAssistant {
184
184
  * `transcription.settings` (`eot_threshold`, `eot_timeout_ms`,
185
185
  * `eager_eot_threshold`).
186
186
  */
187
- interruption_settings?: UpdateAssistant.InterruptionSettings;
187
+ interruption_settings?: AssistantsAPI.InferenceEmbeddingInterruptionSettings;
188
188
 
189
189
  /**
190
190
  * This is only needed when using third-party inference providers selected by
@@ -200,7 +200,7 @@ export interface UpdateAssistant {
200
200
  * MCP servers attached to the assistant. Create MCP servers with
201
201
  * `/ai/mcp_servers`, then reference them by `id` here.
202
202
  */
203
- mcp_servers?: Array<UpdateAssistant.McpServer>;
203
+ mcp_servers?: Array<AssistantsAPI.AssistantMcpServer>;
204
204
 
205
205
  messaging_settings?: AssistantsAPI.MessagingSettings;
206
206
 
@@ -265,125 +265,6 @@ export interface UpdateAssistant {
265
265
  widget_settings?: AssistantsAPI.WidgetSettings;
266
266
  }
267
267
 
268
- export namespace UpdateAssistant {
269
- /**
270
- * Reference to a connected integration attached to an assistant. Discover
271
- * available integrations with `/ai/integrations` and connected integrations with
272
- * `/ai/integrations/connections`.
273
- */
274
- export interface Integration {
275
- /**
276
- * Catalog integration ID to attach. This is the `id` from the integrations catalog
277
- * at `/ai/integrations` (the same value also appears as `integration_id` on
278
- * entries returned by `/ai/integrations/connections`). It is **not** the
279
- * connection-level `id` from `/ai/integrations/connections`.
280
- */
281
- integration_id: string;
282
-
283
- /**
284
- * Optional per-assistant allowlist of integration tool names. When omitted or
285
- * empty, all tools allowed by the connected integration are available to the
286
- * assistant.
287
- */
288
- allowed_list?: Array<string>;
289
- }
290
-
291
- /**
292
- * Settings for interruptions and how the assistant decides the user has finished
293
- * speaking. These timings are most relevant when using non turn-taking
294
- * transcription models. For turn-taking models like `deepgram/flux`, end-of-turn
295
- * behavior is controlled by the transcription end-of-turn settings under
296
- * `transcription.settings` (`eot_threshold`, `eot_timeout_ms`,
297
- * `eager_eot_threshold`).
298
- */
299
- export interface InterruptionSettings {
300
- /**
301
- * When true, disables user interruptions while the assistant greeting is playing.
302
- */
303
- disable_greeting_interruption?: boolean;
304
-
305
- /**
306
- * Whether users can interrupt the assistant while it is speaking.
307
- */
308
- enable?: boolean;
309
-
310
- /**
311
- * Controls when the assistant starts speaking after the user stops. These
312
- * thresholds primarily apply to non turn-taking transcription models. For
313
- * turn-taking models like `deepgram/flux`, end-of-turn detection is driven by the
314
- * transcription end-of-turn settings under `transcription.settings` instead.
315
- */
316
- start_speaking_plan?: InterruptionSettings.StartSpeakingPlan;
317
- }
318
-
319
- export namespace InterruptionSettings {
320
- /**
321
- * Controls when the assistant starts speaking after the user stops. These
322
- * thresholds primarily apply to non turn-taking transcription models. For
323
- * turn-taking models like `deepgram/flux`, end-of-turn detection is driven by the
324
- * transcription end-of-turn settings under `transcription.settings` instead.
325
- */
326
- export interface StartSpeakingPlan {
327
- /**
328
- * Endpointing thresholds used to decide when the user has finished speaking.
329
- * Applies to non turn-taking transcription models. For `deepgram/flux`, use
330
- * `transcription.settings.eot_threshold` / `eot_timeout_ms` /
331
- * `eager_eot_threshold`.
332
- */
333
- transcription_endpointing_plan?: StartSpeakingPlan.TranscriptionEndpointingPlan;
334
-
335
- /**
336
- * Minimum seconds to wait before the assistant starts speaking.
337
- */
338
- wait_seconds?: number;
339
- }
340
-
341
- export namespace StartSpeakingPlan {
342
- /**
343
- * Endpointing thresholds used to decide when the user has finished speaking.
344
- * Applies to non turn-taking transcription models. For `deepgram/flux`, use
345
- * `transcription.settings.eot_threshold` / `eot_timeout_ms` /
346
- * `eager_eot_threshold`.
347
- */
348
- export interface TranscriptionEndpointingPlan {
349
- /**
350
- * Seconds to wait after the transcript ends without punctuation.
351
- */
352
- on_no_punctuation_seconds?: number;
353
-
354
- /**
355
- * Seconds to wait after the transcript ends with a number.
356
- */
357
- on_number_seconds?: number;
358
-
359
- /**
360
- * Seconds to wait after the transcript ends with punctuation.
361
- */
362
- on_punctuation_seconds?: number;
363
- }
364
- }
365
- }
366
-
367
- /**
368
- * Reference to an MCP server attached to an assistant. Create and manage MCP
369
- * servers with the `/ai/mcp_servers` endpoints, then attach them to assistants by
370
- * ID.
371
- */
372
- export interface McpServer {
373
- /**
374
- * ID of the MCP server to attach. This must be the `id` of an MCP server returned
375
- * by the `/ai/mcp_servers` endpoints.
376
- */
377
- id: string;
378
-
379
- /**
380
- * Optional per-assistant allowlist of MCP tool names. When omitted, the assistant
381
- * uses the MCP server's configured `allowed_tools`.
382
- */
383
- allowed_tools?: Array<string>;
384
- }
385
- }
386
-
387
268
  export interface VersionRetrieveParams {
388
269
  /**
389
270
  * Path param
@@ -474,7 +355,7 @@ export interface VersionUpdateParams {
474
355
  * integrations are at `/ai/integrations/connections`. Each item references a
475
356
  * catalog integration by `integration_id`.
476
357
  */
477
- integrations?: Array<VersionUpdateParams.Integration>;
358
+ integrations?: Array<AssistantsAPI.AssistantIntegration>;
478
359
 
479
360
  /**
480
361
  * Body param: Settings for interruptions and how the assistant decides the user
@@ -484,7 +365,7 @@ export interface VersionUpdateParams {
484
365
  * under `transcription.settings` (`eot_threshold`, `eot_timeout_ms`,
485
366
  * `eager_eot_threshold`).
486
367
  */
487
- interruption_settings?: VersionUpdateParams.InterruptionSettings;
368
+ interruption_settings?: AssistantsAPI.InferenceEmbeddingInterruptionSettings;
488
369
 
489
370
  /**
490
371
  * Body param: This is only needed when using third-party inference providers
@@ -500,7 +381,7 @@ export interface VersionUpdateParams {
500
381
  * Body param: MCP servers attached to the assistant. Create MCP servers with
501
382
  * `/ai/mcp_servers`, then reference them by `id` here.
502
383
  */
503
- mcp_servers?: Array<VersionUpdateParams.McpServer>;
384
+ mcp_servers?: Array<AssistantsAPI.AssistantMcpServer>;
504
385
 
505
386
  /**
506
387
  * Body param
@@ -587,125 +468,6 @@ export interface VersionUpdateParams {
587
468
  widget_settings?: AssistantsAPI.WidgetSettings;
588
469
  }
589
470
 
590
- export namespace VersionUpdateParams {
591
- /**
592
- * Reference to a connected integration attached to an assistant. Discover
593
- * available integrations with `/ai/integrations` and connected integrations with
594
- * `/ai/integrations/connections`.
595
- */
596
- export interface Integration {
597
- /**
598
- * Catalog integration ID to attach. This is the `id` from the integrations catalog
599
- * at `/ai/integrations` (the same value also appears as `integration_id` on
600
- * entries returned by `/ai/integrations/connections`). It is **not** the
601
- * connection-level `id` from `/ai/integrations/connections`.
602
- */
603
- integration_id: string;
604
-
605
- /**
606
- * Optional per-assistant allowlist of integration tool names. When omitted or
607
- * empty, all tools allowed by the connected integration are available to the
608
- * assistant.
609
- */
610
- allowed_list?: Array<string>;
611
- }
612
-
613
- /**
614
- * Settings for interruptions and how the assistant decides the user has finished
615
- * speaking. These timings are most relevant when using non turn-taking
616
- * transcription models. For turn-taking models like `deepgram/flux`, end-of-turn
617
- * behavior is controlled by the transcription end-of-turn settings under
618
- * `transcription.settings` (`eot_threshold`, `eot_timeout_ms`,
619
- * `eager_eot_threshold`).
620
- */
621
- export interface InterruptionSettings {
622
- /**
623
- * When true, disables user interruptions while the assistant greeting is playing.
624
- */
625
- disable_greeting_interruption?: boolean;
626
-
627
- /**
628
- * Whether users can interrupt the assistant while it is speaking.
629
- */
630
- enable?: boolean;
631
-
632
- /**
633
- * Controls when the assistant starts speaking after the user stops. These
634
- * thresholds primarily apply to non turn-taking transcription models. For
635
- * turn-taking models like `deepgram/flux`, end-of-turn detection is driven by the
636
- * transcription end-of-turn settings under `transcription.settings` instead.
637
- */
638
- start_speaking_plan?: InterruptionSettings.StartSpeakingPlan;
639
- }
640
-
641
- export namespace InterruptionSettings {
642
- /**
643
- * Controls when the assistant starts speaking after the user stops. These
644
- * thresholds primarily apply to non turn-taking transcription models. For
645
- * turn-taking models like `deepgram/flux`, end-of-turn detection is driven by the
646
- * transcription end-of-turn settings under `transcription.settings` instead.
647
- */
648
- export interface StartSpeakingPlan {
649
- /**
650
- * Endpointing thresholds used to decide when the user has finished speaking.
651
- * Applies to non turn-taking transcription models. For `deepgram/flux`, use
652
- * `transcription.settings.eot_threshold` / `eot_timeout_ms` /
653
- * `eager_eot_threshold`.
654
- */
655
- transcription_endpointing_plan?: StartSpeakingPlan.TranscriptionEndpointingPlan;
656
-
657
- /**
658
- * Minimum seconds to wait before the assistant starts speaking.
659
- */
660
- wait_seconds?: number;
661
- }
662
-
663
- export namespace StartSpeakingPlan {
664
- /**
665
- * Endpointing thresholds used to decide when the user has finished speaking.
666
- * Applies to non turn-taking transcription models. For `deepgram/flux`, use
667
- * `transcription.settings.eot_threshold` / `eot_timeout_ms` /
668
- * `eager_eot_threshold`.
669
- */
670
- export interface TranscriptionEndpointingPlan {
671
- /**
672
- * Seconds to wait after the transcript ends without punctuation.
673
- */
674
- on_no_punctuation_seconds?: number;
675
-
676
- /**
677
- * Seconds to wait after the transcript ends with a number.
678
- */
679
- on_number_seconds?: number;
680
-
681
- /**
682
- * Seconds to wait after the transcript ends with punctuation.
683
- */
684
- on_punctuation_seconds?: number;
685
- }
686
- }
687
- }
688
-
689
- /**
690
- * Reference to an MCP server attached to an assistant. Create and manage MCP
691
- * servers with the `/ai/mcp_servers` endpoints, then attach them to assistants by
692
- * ID.
693
- */
694
- export interface McpServer {
695
- /**
696
- * ID of the MCP server to attach. This must be the `id` of an MCP server returned
697
- * by the `/ai/mcp_servers` endpoints.
698
- */
699
- id: string;
700
-
701
- /**
702
- * Optional per-assistant allowlist of MCP tool names. When omitted, the assistant
703
- * uses the MCP server's configured `allowed_tools`.
704
- */
705
- allowed_tools?: Array<string>;
706
- }
707
- }
708
-
709
471
  export interface VersionDeleteParams {
710
472
  assistant_id: string;
711
473
  }
@@ -2,6 +2,7 @@
2
2
 
3
3
  export {
4
4
  AI,
5
+ type ModelMetadata,
5
6
  type AICreateResponseResponse,
6
7
  type AIRetrieveModelsResponse,
7
8
  type AISummarizeResponse,
@@ -11,6 +12,8 @@ export {
11
12
  export {
12
13
  Assistants,
13
14
  type Assistant,
15
+ type AssistantIntegration,
16
+ type AssistantMcpServer,
14
17
  type AssistantTool,
15
18
  type AssistantsList,
16
19
  type AudioVisualizerConfig,
@@ -23,6 +26,7 @@ export {
23
26
  type HangupToolParams,
24
27
  type ImportMetadata,
25
28
  type InferenceEmbedding,
29
+ type InferenceEmbeddingInterruptionSettings,
26
30
  type InferenceEmbeddingWebhookToolParams,
27
31
  type InsightSettings,
28
32
  type MessagingSettings,
@@ -32,7 +36,9 @@ export {
32
36
  type PostConversationSettingsReq,
33
37
  type PrivacySettings,
34
38
  type RetrievalTool,
39
+ type StartSpeakingPlan,
35
40
  type TelephonySettings,
41
+ type TranscriptionEndpointingPlan,
36
42
  type TranscriptionSettings,
37
43
  type TranscriptionSettingsConfig,
38
44
  type TransferTool,
@@ -1,6 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../../core/resource';
4
+ import * as AIAPI from '../ai';
4
5
  import * as ChatAPI from './chat';
5
6
  import { Chat, ChatCreateCompletionParams, ChatCreateCompletionResponse } from './chat';
6
7
  import * as EmbeddingsAPI from './embeddings';
@@ -101,141 +102,11 @@ export class OpenAI extends APIResource {
101
102
  export type OpenAICreateResponseResponse = { [key: string]: unknown };
102
103
 
103
104
  export interface OpenAIListModelsResponse {
104
- data: Array<OpenAIListModelsResponse.Data>;
105
+ data: Array<AIAPI.ModelMetadata>;
105
106
 
106
107
  object?: string;
107
108
  }
108
109
 
109
- export namespace OpenAIListModelsResponse {
110
- /**
111
- * Metadata for a model available on Telnyx Inference. Returned by
112
- * `GET /v2/ai/openai/models` (and the deprecated `GET /v2/ai/models`). Open-source
113
- * models live under their Hugging Face organization (e.g. `moonshotai/Kimi-K2.6`,
114
- * `zai-org/GLM-5.1-FP8`, `MiniMaxAI/MiniMax-M2.7`); fine-tuned models are owned by
115
- * the Telnyx organization that trained them.
116
- */
117
- export interface Data {
118
- /**
119
- * Model identifier. For open-source models, follows the
120
- * `{organization}/{model_name}` convention from Hugging Face (e.g.
121
- * `moonshotai/Kimi-K2.6`).
122
- */
123
- id: string;
124
-
125
- /**
126
- * Maximum total tokens (prompt + completion) supported by the model in a single
127
- * request.
128
- */
129
- context_length: number;
130
-
131
- /**
132
- * Timestamp at which the model was registered on Telnyx Inference (ISO 8601).
133
- */
134
- created: string;
135
-
136
- /**
137
- * ISO language codes the model supports (e.g. `en`, `es`).
138
- */
139
- languages: Array<string>;
140
-
141
- /**
142
- * License the model is distributed under, e.g. `Apache 2.0`, `MIT`,
143
- * `Llama 3 Community License`.
144
- */
145
- license: string;
146
-
147
- /**
148
- * Organization that originally published the model, matching the prefix of `id`
149
- * for open-source models.
150
- */
151
- organization: string;
152
-
153
- /**
154
- * Owner of the model. `Telnyx` for Telnyx-hosted open-source models, the upstream
155
- * provider name for proxied models, or the Telnyx organization id for fine-tuned
156
- * models.
157
- */
158
- owned_by: string;
159
-
160
- /**
161
- * Total parameter count of the model.
162
- */
163
- parameters: number;
164
-
165
- /**
166
- * Billing tier the model belongs to. Used together with `pricing` to determine
167
- * cost per 1M tokens.
168
- */
169
- tier: 'small' | 'medium' | 'large' | 'unlisted';
170
-
171
- /**
172
- * Base model the fine-tuned model was trained from. Only set for fine-tuned
173
- * models.
174
- */
175
- base_model?: string | null;
176
-
177
- /**
178
- * Short, human-readable summary of what the model is best suited for.
179
- */
180
- description?: string | null;
181
-
182
- /**
183
- * Whether the model can be used as a base for a fine-tuning job via
184
- * `POST /v2/ai/fine_tuning/jobs`.
185
- */
186
- is_fine_tunable?: boolean;
187
-
188
- /**
189
- * Whether the model accepts image inputs in chat completions (multimodal vision
190
- * support).
191
- */
192
- is_vision_supported?: boolean;
193
-
194
- /**
195
- * Maximum number of completion (output) tokens the model will generate per
196
- * request. `null` if unconstrained beyond `context_length`.
197
- */
198
- max_completion_tokens?: number | null;
199
-
200
- /**
201
- * Object type. Always `model`.
202
- */
203
- object?: string;
204
-
205
- /**
206
- * Human-readable parameter count, e.g. `1.0T`, `753.9B`, `8B`.
207
- */
208
- parameters_str?: string | null;
209
-
210
- /**
211
- * Mapping of token kind to price, as strings to preserve precision. Typical keys
212
- * are `prompt`, `cached_prompt`, and `completion`. When pricing is available the
213
- * block also includes `currency` (ISO 4217 code matching the account's configured
214
- * billing currency) and `unit` (the denomination the prices are quoted in,
215
- * currently always `1M_tokens` for token-priced models).
216
- */
217
- pricing?: { [key: string]: string };
218
-
219
- /**
220
- * Whether Telnyx currently recommends this model as the LLM powering a Telnyx AI
221
- * Assistant.
222
- */
223
- recommended_for_assistants?: boolean;
224
-
225
- /**
226
- * Public region names where the model is currently deployed (e.g. `us-central-1`,
227
- * `eu-central-1`).
228
- */
229
- regions?: Array<string>;
230
-
231
- /**
232
- * Primary task the model is intended for, e.g. `text-generation`,
233
- * `audio-text-to-text`, `feature-extraction` (embeddings).
234
- */
235
- task?: string;
236
- }
237
- }
238
-
239
110
  export interface OpenAICreateResponseParams {
240
111
  /**
241
112
  * Optional Telnyx Conversation ID from `POST /ai/conversations`. When provided,