telnyx 6.46.0 → 6.48.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 (50) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/package.json +1 -1
  3. package/resources/ai/ai.d.mts +2 -2
  4. package/resources/ai/ai.d.mts.map +1 -1
  5. package/resources/ai/ai.d.ts +2 -2
  6. package/resources/ai/ai.d.ts.map +1 -1
  7. package/resources/ai/ai.js.map +1 -1
  8. package/resources/ai/ai.mjs.map +1 -1
  9. package/resources/ai/assistants/assistants.d.mts +162 -322
  10. package/resources/ai/assistants/assistants.d.mts.map +1 -1
  11. package/resources/ai/assistants/assistants.d.ts +162 -322
  12. package/resources/ai/assistants/assistants.d.ts.map +1 -1
  13. package/resources/ai/assistants/assistants.js.map +1 -1
  14. package/resources/ai/assistants/assistants.mjs.map +1 -1
  15. package/resources/ai/assistants/index.d.mts +1 -1
  16. package/resources/ai/assistants/index.d.mts.map +1 -1
  17. package/resources/ai/assistants/index.d.ts +1 -1
  18. package/resources/ai/assistants/index.d.ts.map +1 -1
  19. package/resources/ai/assistants/index.js.map +1 -1
  20. package/resources/ai/assistants/index.mjs.map +1 -1
  21. package/resources/ai/assistants/versions.d.mts +6 -214
  22. package/resources/ai/assistants/versions.d.mts.map +1 -1
  23. package/resources/ai/assistants/versions.d.ts +6 -214
  24. package/resources/ai/assistants/versions.d.ts.map +1 -1
  25. package/resources/ai/index.d.mts +1 -1
  26. package/resources/ai/index.d.mts.map +1 -1
  27. package/resources/ai/index.d.ts +1 -1
  28. package/resources/ai/index.d.ts.map +1 -1
  29. package/resources/ai/index.js.map +1 -1
  30. package/resources/ai/index.mjs.map +1 -1
  31. package/resources/calls/actions.d.mts +52 -4
  32. package/resources/calls/actions.d.mts.map +1 -1
  33. package/resources/calls/actions.d.ts +52 -4
  34. package/resources/calls/actions.d.ts.map +1 -1
  35. package/resources/conferences/actions.d.mts +13 -1
  36. package/resources/conferences/actions.d.mts.map +1 -1
  37. package/resources/conferences/actions.d.ts +13 -1
  38. package/resources/conferences/actions.d.ts.map +1 -1
  39. package/src/resources/ai/ai.ts +12 -0
  40. package/src/resources/ai/assistants/assistants.ts +197 -375
  41. package/src/resources/ai/assistants/index.ts +6 -0
  42. package/src/resources/ai/assistants/versions.ts +6 -250
  43. package/src/resources/ai/index.ts +6 -0
  44. package/src/resources/calls/actions.ts +64 -4
  45. package/src/resources/conferences/actions.ts +16 -1
  46. package/src/version.ts +1 -1
  47. package/version.d.mts +1 -1
  48. package/version.d.ts +1 -1
  49. package/version.js +1 -1
  50. package/version.mjs +1 -1
@@ -794,6 +794,124 @@ export interface AudioVisualizerConfig {
794
794
  */
795
795
  export type EnabledFeatures = 'telephony' | 'messaging';
796
796
 
797
+ export interface ExternalLlm {
798
+ /**
799
+ * Base URL for the external LLM endpoint.
800
+ */
801
+ base_url: string;
802
+
803
+ /**
804
+ * Model identifier to use with the external LLM endpoint.
805
+ */
806
+ model: string;
807
+
808
+ /**
809
+ * Authentication method used when connecting to the external LLM endpoint.
810
+ */
811
+ authentication_method?: 'token' | 'certificate';
812
+
813
+ /**
814
+ * Integration secret identifier for the client certificate used with certificate
815
+ * authentication.
816
+ */
817
+ certificate_ref?: string;
818
+
819
+ /**
820
+ * When `true`, Telnyx forwards the assistant's dynamic variables to the external
821
+ * LLM endpoint as a top-level `extra_metadata` object on the chat completion
822
+ * request body. Defaults to `false`. Example payload sent to the external
823
+ * endpoint:
824
+ * `{"extra_metadata": {"customer_name": "Jane", "account_id": "acct_789", "telnyx_agent_target": "+13125550100", "telnyx_end_user_target": "+13125550123"}}`.
825
+ * Distinct from OpenAI's native `metadata` field, which has its own size and type
826
+ * limits.
827
+ */
828
+ forward_metadata?: boolean;
829
+
830
+ /**
831
+ * Integration secret identifier for the external LLM API key.
832
+ */
833
+ llm_api_key_ref?: string;
834
+
835
+ /**
836
+ * URL used to retrieve an access token when certificate authentication is enabled.
837
+ */
838
+ token_retrieval_url?: string;
839
+ }
840
+
841
+ export interface ExternalLlmReq {
842
+ /**
843
+ * Base URL for the external LLM endpoint.
844
+ */
845
+ base_url: string;
846
+
847
+ /**
848
+ * Model identifier to use with the external LLM endpoint.
849
+ */
850
+ model: string;
851
+
852
+ /**
853
+ * Authentication method used when connecting to the external LLM endpoint.
854
+ */
855
+ authentication_method?: 'token' | 'certificate';
856
+
857
+ /**
858
+ * Integration secret identifier for the client certificate used with certificate
859
+ * authentication.
860
+ */
861
+ certificate_ref?: string;
862
+
863
+ /**
864
+ * When `true`, Telnyx forwards the assistant's dynamic variables to the external
865
+ * LLM endpoint as a top-level `extra_metadata` object on the chat completion
866
+ * request body. Defaults to `false`. Example payload sent to the external
867
+ * endpoint:
868
+ * `{"extra_metadata": {"customer_name": "Jane", "account_id": "acct_789", "telnyx_agent_target": "+13125550100", "telnyx_end_user_target": "+13125550123"}}`.
869
+ * Distinct from OpenAI's native `metadata` field, which has its own size and type
870
+ * limits.
871
+ */
872
+ forward_metadata?: boolean;
873
+
874
+ /**
875
+ * Integration secret identifier for the external LLM API key.
876
+ */
877
+ llm_api_key_ref?: string;
878
+
879
+ /**
880
+ * URL used to retrieve an access token when certificate authentication is enabled.
881
+ */
882
+ token_retrieval_url?: string;
883
+ }
884
+
885
+ export interface FallbackConfig {
886
+ external_llm?: ExternalLlm;
887
+
888
+ /**
889
+ * Integration secret identifier for the fallback model API key.
890
+ */
891
+ llm_api_key_ref?: string;
892
+
893
+ /**
894
+ * Fallback Telnyx-hosted model to use when the primary LLM provider is
895
+ * unavailable.
896
+ */
897
+ model?: string;
898
+ }
899
+
900
+ export interface FallbackConfigReq {
901
+ external_llm?: ExternalLlmReq;
902
+
903
+ /**
904
+ * Integration secret identifier for the fallback model API key.
905
+ */
906
+ llm_api_key_ref?: string;
907
+
908
+ /**
909
+ * Fallback Telnyx-hosted model to use when the primary LLM provider is
910
+ * unavailable.
911
+ */
912
+ model?: string;
913
+ }
914
+
797
915
  export interface HangupTool {
798
916
  hangup: HangupToolParams;
799
917
 
@@ -870,9 +988,9 @@ export interface InferenceEmbedding {
870
988
 
871
989
  enabled_features?: Array<EnabledFeatures>;
872
990
 
873
- external_llm?: InferenceEmbedding.ExternalLlm;
991
+ external_llm?: ExternalLlm;
874
992
 
875
- fallback_config?: InferenceEmbedding.FallbackConfig;
993
+ fallback_config?: FallbackConfig;
876
994
 
877
995
  /**
878
996
  * Text that the assistant will use to start the conversation. This may be
@@ -934,7 +1052,7 @@ export interface InferenceEmbedding {
934
1052
  * Telephony-control tools (e.g. hangup, transfer) are unavailable
935
1053
  * post-conversation. Beta feature.
936
1054
  */
937
- post_conversation_settings?: InferenceEmbedding.PostConversationSettings;
1055
+ post_conversation_settings?: PostConversationSettings;
938
1056
 
939
1057
  privacy_settings?: PrivacySettings;
940
1058
 
@@ -985,111 +1103,6 @@ export interface InferenceEmbedding {
985
1103
  }
986
1104
 
987
1105
  export namespace InferenceEmbedding {
988
- export interface ExternalLlm {
989
- /**
990
- * Base URL for the external LLM endpoint.
991
- */
992
- base_url: string;
993
-
994
- /**
995
- * Model identifier to use with the external LLM endpoint.
996
- */
997
- model: string;
998
-
999
- /**
1000
- * Authentication method used when connecting to the external LLM endpoint.
1001
- */
1002
- authentication_method?: 'token' | 'certificate';
1003
-
1004
- /**
1005
- * Integration secret identifier for the client certificate used with certificate
1006
- * authentication.
1007
- */
1008
- certificate_ref?: string;
1009
-
1010
- /**
1011
- * When `true`, Telnyx forwards the assistant's dynamic variables to the external
1012
- * LLM endpoint as a top-level `extra_metadata` object on the chat completion
1013
- * request body. Defaults to `false`. Example payload sent to the external
1014
- * endpoint:
1015
- * `{"extra_metadata": {"customer_name": "Jane", "account_id": "acct_789", "telnyx_agent_target": "+13125550100", "telnyx_end_user_target": "+13125550123"}}`.
1016
- * Distinct from OpenAI's native `metadata` field, which has its own size and type
1017
- * limits.
1018
- */
1019
- forward_metadata?: boolean;
1020
-
1021
- /**
1022
- * Integration secret identifier for the external LLM API key.
1023
- */
1024
- llm_api_key_ref?: string;
1025
-
1026
- /**
1027
- * URL used to retrieve an access token when certificate authentication is enabled.
1028
- */
1029
- token_retrieval_url?: string;
1030
- }
1031
-
1032
- export interface FallbackConfig {
1033
- external_llm?: FallbackConfig.ExternalLlm;
1034
-
1035
- /**
1036
- * Integration secret identifier for the fallback model API key.
1037
- */
1038
- llm_api_key_ref?: string;
1039
-
1040
- /**
1041
- * Fallback Telnyx-hosted model to use when the primary LLM provider is
1042
- * unavailable.
1043
- */
1044
- model?: string;
1045
- }
1046
-
1047
- export namespace FallbackConfig {
1048
- export interface ExternalLlm {
1049
- /**
1050
- * Base URL for the external LLM endpoint.
1051
- */
1052
- base_url: string;
1053
-
1054
- /**
1055
- * Model identifier to use with the external LLM endpoint.
1056
- */
1057
- model: string;
1058
-
1059
- /**
1060
- * Authentication method used when connecting to the external LLM endpoint.
1061
- */
1062
- authentication_method?: 'token' | 'certificate';
1063
-
1064
- /**
1065
- * Integration secret identifier for the client certificate used with certificate
1066
- * authentication.
1067
- */
1068
- certificate_ref?: string;
1069
-
1070
- /**
1071
- * When `true`, Telnyx forwards the assistant's dynamic variables to the external
1072
- * LLM endpoint as a top-level `extra_metadata` object on the chat completion
1073
- * request body. Defaults to `false`. Example payload sent to the external
1074
- * endpoint:
1075
- * `{"extra_metadata": {"customer_name": "Jane", "account_id": "acct_789", "telnyx_agent_target": "+13125550100", "telnyx_end_user_target": "+13125550123"}}`.
1076
- * Distinct from OpenAI's native `metadata` field, which has its own size and type
1077
- * limits.
1078
- */
1079
- forward_metadata?: boolean;
1080
-
1081
- /**
1082
- * Integration secret identifier for the external LLM API key.
1083
- */
1084
- llm_api_key_ref?: string;
1085
-
1086
- /**
1087
- * URL used to retrieve an access token when certificate authentication is enabled.
1088
- */
1089
- token_retrieval_url?: string;
1090
- }
1091
- }
1092
-
1093
1106
  /**
1094
1107
  * Reference to a connected integration attached to an assistant. Discover
1095
1108
  * available integrations with `/ai/integrations` and connected integrations with
@@ -1201,23 +1214,6 @@ export namespace InferenceEmbedding {
1201
1214
  */
1202
1215
  allowed_tools?: Array<string>;
1203
1216
  }
1204
-
1205
- /**
1206
- * Configuration for post-conversation processing. When enabled, the assistant
1207
- * receives one additional LLM turn after the conversation ends, allowing it to
1208
- * execute tool calls such as logging to a CRM or sending a summary. The assistant
1209
- * can execute multiple parallel or sequential tools during this phase.
1210
- * Telephony-control tools (e.g. hangup, transfer) are unavailable
1211
- * post-conversation. Beta feature.
1212
- */
1213
- export interface PostConversationSettings {
1214
- /**
1215
- * Whether post-conversation processing is enabled. When true, the assistant will
1216
- * be invoked after the conversation ends to perform any final tool calls. Defaults
1217
- * to false.
1218
- */
1219
- enabled?: boolean;
1220
- }
1221
1217
  }
1222
1218
 
1223
1219
  export interface InferenceEmbeddingWebhookToolParams {
@@ -1425,6 +1421,21 @@ export interface MessagingSettings {
1425
1421
  export interface Observability {
1426
1422
  host?: string;
1427
1423
 
1424
+ prompt_label?: string;
1425
+
1426
+ prompt_name?: string;
1427
+
1428
+ /**
1429
+ * Whether to auto-publish the assistant's instructions as a Langfuse prompt.
1430
+ *
1431
+ * When ENABLED + prompt_name set, every assistant create/update pushes
1432
+ * `instructions` to Langfuse via create_prompt and stores the returned version in
1433
+ * prompt_version.
1434
+ */
1435
+ prompt_sync?: 'enabled' | 'disabled';
1436
+
1437
+ prompt_version?: number;
1438
+
1428
1439
  public_key_ref?: string;
1429
1440
 
1430
1441
  secret_key_ref?: string;
@@ -1435,6 +1446,21 @@ export interface Observability {
1435
1446
  export interface ObservabilityReq {
1436
1447
  host?: string;
1437
1448
 
1449
+ prompt_label?: string;
1450
+
1451
+ prompt_name?: string;
1452
+
1453
+ /**
1454
+ * Whether to auto-publish the assistant's instructions as a Langfuse prompt.
1455
+ *
1456
+ * When ENABLED + prompt_name set, every assistant create/update pushes
1457
+ * `instructions` to Langfuse via create_prompt and stores the returned version in
1458
+ * prompt_version.
1459
+ */
1460
+ prompt_sync?: 'enabled' | 'disabled';
1461
+
1462
+ prompt_version?: number;
1463
+
1438
1464
  public_key_ref?: string;
1439
1465
 
1440
1466
  secret_key_ref?: string;
@@ -1442,6 +1468,40 @@ export interface ObservabilityReq {
1442
1468
  status?: 'enabled' | 'disabled';
1443
1469
  }
1444
1470
 
1471
+ /**
1472
+ * Configuration for post-conversation processing. When enabled, the assistant
1473
+ * receives one additional LLM turn after the conversation ends, allowing it to
1474
+ * execute tool calls such as logging to a CRM or sending a summary. The assistant
1475
+ * can execute multiple parallel or sequential tools during this phase.
1476
+ * Telephony-control tools (e.g. hangup, transfer) are unavailable
1477
+ * post-conversation. Beta feature.
1478
+ */
1479
+ export interface PostConversationSettings {
1480
+ /**
1481
+ * Whether post-conversation processing is enabled. When true, the assistant will
1482
+ * be invoked after the conversation ends to perform any final tool calls. Defaults
1483
+ * to false.
1484
+ */
1485
+ enabled?: boolean;
1486
+ }
1487
+
1488
+ /**
1489
+ * Configuration for post-conversation processing. When enabled, the assistant
1490
+ * receives one additional LLM turn after the conversation ends, allowing it to
1491
+ * execute tool calls such as logging to a CRM or sending a summary. The assistant
1492
+ * can execute multiple parallel or sequential tools during this phase.
1493
+ * Telephony-control tools (e.g. hangup, transfer) are unavailable
1494
+ * post-conversation. Beta feature.
1495
+ */
1496
+ export interface PostConversationSettingsReq {
1497
+ /**
1498
+ * Whether post-conversation processing is enabled. When true, the assistant will
1499
+ * be invoked after the conversation ends to perform any final tool calls. Defaults
1500
+ * to false.
1501
+ */
1502
+ enabled?: boolean;
1503
+ }
1504
+
1445
1505
  export interface PrivacySettings {
1446
1506
  /**
1447
1507
  * If true, conversation history and insights will be stored. If false, they will
@@ -2190,9 +2250,9 @@ export interface AssistantCreateParams {
2190
2250
 
2191
2251
  enabled_features?: Array<EnabledFeatures>;
2192
2252
 
2193
- external_llm?: AssistantCreateParams.ExternalLlm;
2253
+ external_llm?: ExternalLlmReq;
2194
2254
 
2195
- fallback_config?: AssistantCreateParams.FallbackConfig;
2255
+ fallback_config?: FallbackConfigReq;
2196
2256
 
2197
2257
  /**
2198
2258
  * Text that the assistant will use to start the conversation. This may be
@@ -2261,7 +2321,7 @@ export interface AssistantCreateParams {
2261
2321
  * Telephony-control tools (e.g. hangup, transfer) are unavailable
2262
2322
  * post-conversation. Beta feature.
2263
2323
  */
2264
- post_conversation_settings?: AssistantCreateParams.PostConversationSettings;
2324
+ post_conversation_settings?: PostConversationSettingsReq;
2265
2325
 
2266
2326
  privacy_settings?: PrivacySettings;
2267
2327
 
@@ -2297,111 +2357,6 @@ export interface AssistantCreateParams {
2297
2357
  }
2298
2358
 
2299
2359
  export namespace AssistantCreateParams {
2300
- export interface ExternalLlm {
2301
- /**
2302
- * Base URL for the external LLM endpoint.
2303
- */
2304
- base_url: string;
2305
-
2306
- /**
2307
- * Model identifier to use with the external LLM endpoint.
2308
- */
2309
- model: string;
2310
-
2311
- /**
2312
- * Authentication method used when connecting to the external LLM endpoint.
2313
- */
2314
- authentication_method?: 'token' | 'certificate';
2315
-
2316
- /**
2317
- * Integration secret identifier for the client certificate used with certificate
2318
- * authentication.
2319
- */
2320
- certificate_ref?: string;
2321
-
2322
- /**
2323
- * When `true`, Telnyx forwards the assistant's dynamic variables to the external
2324
- * LLM endpoint as a top-level `extra_metadata` object on the chat completion
2325
- * request body. Defaults to `false`. Example payload sent to the external
2326
- * endpoint:
2327
- * `{"extra_metadata": {"customer_name": "Jane", "account_id": "acct_789", "telnyx_agent_target": "+13125550100", "telnyx_end_user_target": "+13125550123"}}`.
2328
- * Distinct from OpenAI's native `metadata` field, which has its own size and type
2329
- * limits.
2330
- */
2331
- forward_metadata?: boolean;
2332
-
2333
- /**
2334
- * Integration secret identifier for the external LLM API key.
2335
- */
2336
- llm_api_key_ref?: string;
2337
-
2338
- /**
2339
- * URL used to retrieve an access token when certificate authentication is enabled.
2340
- */
2341
- token_retrieval_url?: string;
2342
- }
2343
-
2344
- export interface FallbackConfig {
2345
- external_llm?: FallbackConfig.ExternalLlm;
2346
-
2347
- /**
2348
- * Integration secret identifier for the fallback model API key.
2349
- */
2350
- llm_api_key_ref?: string;
2351
-
2352
- /**
2353
- * Fallback Telnyx-hosted model to use when the primary LLM provider is
2354
- * unavailable.
2355
- */
2356
- model?: string;
2357
- }
2358
-
2359
- export namespace FallbackConfig {
2360
- export interface ExternalLlm {
2361
- /**
2362
- * Base URL for the external LLM endpoint.
2363
- */
2364
- base_url: string;
2365
-
2366
- /**
2367
- * Model identifier to use with the external LLM endpoint.
2368
- */
2369
- model: string;
2370
-
2371
- /**
2372
- * Authentication method used when connecting to the external LLM endpoint.
2373
- */
2374
- authentication_method?: 'token' | 'certificate';
2375
-
2376
- /**
2377
- * Integration secret identifier for the client certificate used with certificate
2378
- * authentication.
2379
- */
2380
- certificate_ref?: string;
2381
-
2382
- /**
2383
- * When `true`, Telnyx forwards the assistant's dynamic variables to the external
2384
- * LLM endpoint as a top-level `extra_metadata` object on the chat completion
2385
- * request body. Defaults to `false`. Example payload sent to the external
2386
- * endpoint:
2387
- * `{"extra_metadata": {"customer_name": "Jane", "account_id": "acct_789", "telnyx_agent_target": "+13125550100", "telnyx_end_user_target": "+13125550123"}}`.
2388
- * Distinct from OpenAI's native `metadata` field, which has its own size and type
2389
- * limits.
2390
- */
2391
- forward_metadata?: boolean;
2392
-
2393
- /**
2394
- * Integration secret identifier for the external LLM API key.
2395
- */
2396
- llm_api_key_ref?: string;
2397
-
2398
- /**
2399
- * URL used to retrieve an access token when certificate authentication is enabled.
2400
- */
2401
- token_retrieval_url?: string;
2402
- }
2403
- }
2404
-
2405
2360
  /**
2406
2361
  * Reference to a connected integration attached to an assistant. Discover
2407
2362
  * available integrations with `/ai/integrations` and connected integrations with
@@ -2513,23 +2468,6 @@ export namespace AssistantCreateParams {
2513
2468
  */
2514
2469
  allowed_tools?: Array<string>;
2515
2470
  }
2516
-
2517
- /**
2518
- * Configuration for post-conversation processing. When enabled, the assistant
2519
- * receives one additional LLM turn after the conversation ends, allowing it to
2520
- * execute tool calls such as logging to a CRM or sending a summary. The assistant
2521
- * can execute multiple parallel or sequential tools during this phase.
2522
- * Telephony-control tools (e.g. hangup, transfer) are unavailable
2523
- * post-conversation. Beta feature.
2524
- */
2525
- export interface PostConversationSettings {
2526
- /**
2527
- * Whether post-conversation processing is enabled. When true, the assistant will
2528
- * be invoked after the conversation ends to perform any final tool calls. Defaults
2529
- * to false.
2530
- */
2531
- enabled?: boolean;
2532
- }
2533
2471
  }
2534
2472
 
2535
2473
  export interface AssistantRetrieveParams {
@@ -2572,9 +2510,9 @@ export interface AssistantUpdateParams {
2572
2510
 
2573
2511
  enabled_features?: Array<EnabledFeatures>;
2574
2512
 
2575
- external_llm?: AssistantUpdateParams.ExternalLlm;
2513
+ external_llm?: ExternalLlmReq;
2576
2514
 
2577
- fallback_config?: AssistantUpdateParams.FallbackConfig;
2515
+ fallback_config?: FallbackConfigReq;
2578
2516
 
2579
2517
  /**
2580
2518
  * Text that the assistant will use to start the conversation. This may be
@@ -2651,7 +2589,7 @@ export interface AssistantUpdateParams {
2651
2589
  * Telephony-control tools (e.g. hangup, transfer) are unavailable
2652
2590
  * post-conversation. Beta feature.
2653
2591
  */
2654
- post_conversation_settings?: AssistantUpdateParams.PostConversationSettings;
2592
+ post_conversation_settings?: PostConversationSettingsReq;
2655
2593
 
2656
2594
  privacy_settings?: PrivacySettings;
2657
2595
 
@@ -2698,111 +2636,6 @@ export interface AssistantUpdateParams {
2698
2636
  }
2699
2637
 
2700
2638
  export namespace AssistantUpdateParams {
2701
- export interface ExternalLlm {
2702
- /**
2703
- * Base URL for the external LLM endpoint.
2704
- */
2705
- base_url: string;
2706
-
2707
- /**
2708
- * Model identifier to use with the external LLM endpoint.
2709
- */
2710
- model: string;
2711
-
2712
- /**
2713
- * Authentication method used when connecting to the external LLM endpoint.
2714
- */
2715
- authentication_method?: 'token' | 'certificate';
2716
-
2717
- /**
2718
- * Integration secret identifier for the client certificate used with certificate
2719
- * authentication.
2720
- */
2721
- certificate_ref?: string;
2722
-
2723
- /**
2724
- * When `true`, Telnyx forwards the assistant's dynamic variables to the external
2725
- * LLM endpoint as a top-level `extra_metadata` object on the chat completion
2726
- * request body. Defaults to `false`. Example payload sent to the external
2727
- * endpoint:
2728
- * `{"extra_metadata": {"customer_name": "Jane", "account_id": "acct_789", "telnyx_agent_target": "+13125550100", "telnyx_end_user_target": "+13125550123"}}`.
2729
- * Distinct from OpenAI's native `metadata` field, which has its own size and type
2730
- * limits.
2731
- */
2732
- forward_metadata?: boolean;
2733
-
2734
- /**
2735
- * Integration secret identifier for the external LLM API key.
2736
- */
2737
- llm_api_key_ref?: string;
2738
-
2739
- /**
2740
- * URL used to retrieve an access token when certificate authentication is enabled.
2741
- */
2742
- token_retrieval_url?: string;
2743
- }
2744
-
2745
- export interface FallbackConfig {
2746
- external_llm?: FallbackConfig.ExternalLlm;
2747
-
2748
- /**
2749
- * Integration secret identifier for the fallback model API key.
2750
- */
2751
- llm_api_key_ref?: string;
2752
-
2753
- /**
2754
- * Fallback Telnyx-hosted model to use when the primary LLM provider is
2755
- * unavailable.
2756
- */
2757
- model?: string;
2758
- }
2759
-
2760
- export namespace FallbackConfig {
2761
- export interface ExternalLlm {
2762
- /**
2763
- * Base URL for the external LLM endpoint.
2764
- */
2765
- base_url: string;
2766
-
2767
- /**
2768
- * Model identifier to use with the external LLM endpoint.
2769
- */
2770
- model: string;
2771
-
2772
- /**
2773
- * Authentication method used when connecting to the external LLM endpoint.
2774
- */
2775
- authentication_method?: 'token' | 'certificate';
2776
-
2777
- /**
2778
- * Integration secret identifier for the client certificate used with certificate
2779
- * authentication.
2780
- */
2781
- certificate_ref?: string;
2782
-
2783
- /**
2784
- * When `true`, Telnyx forwards the assistant's dynamic variables to the external
2785
- * LLM endpoint as a top-level `extra_metadata` object on the chat completion
2786
- * request body. Defaults to `false`. Example payload sent to the external
2787
- * endpoint:
2788
- * `{"extra_metadata": {"customer_name": "Jane", "account_id": "acct_789", "telnyx_agent_target": "+13125550100", "telnyx_end_user_target": "+13125550123"}}`.
2789
- * Distinct from OpenAI's native `metadata` field, which has its own size and type
2790
- * limits.
2791
- */
2792
- forward_metadata?: boolean;
2793
-
2794
- /**
2795
- * Integration secret identifier for the external LLM API key.
2796
- */
2797
- llm_api_key_ref?: string;
2798
-
2799
- /**
2800
- * URL used to retrieve an access token when certificate authentication is enabled.
2801
- */
2802
- token_retrieval_url?: string;
2803
- }
2804
- }
2805
-
2806
2639
  /**
2807
2640
  * Reference to a connected integration attached to an assistant. Discover
2808
2641
  * available integrations with `/ai/integrations` and connected integrations with
@@ -2914,23 +2747,6 @@ export namespace AssistantUpdateParams {
2914
2747
  */
2915
2748
  allowed_tools?: Array<string>;
2916
2749
  }
2917
-
2918
- /**
2919
- * Configuration for post-conversation processing. When enabled, the assistant
2920
- * receives one additional LLM turn after the conversation ends, allowing it to
2921
- * execute tool calls such as logging to a CRM or sending a summary. The assistant
2922
- * can execute multiple parallel or sequential tools during this phase.
2923
- * Telephony-control tools (e.g. hangup, transfer) are unavailable
2924
- * post-conversation. Beta feature.
2925
- */
2926
- export interface PostConversationSettings {
2927
- /**
2928
- * Whether post-conversation processing is enabled. When true, the assistant will
2929
- * be invoked after the conversation ends to perform any final tool calls. Defaults
2930
- * to false.
2931
- */
2932
- enabled?: boolean;
2933
- }
2934
2750
  }
2935
2751
 
2936
2752
  export interface AssistantChatParams {
@@ -2996,6 +2812,10 @@ export declare namespace Assistants {
2996
2812
  type AssistantsList as AssistantsList,
2997
2813
  type AudioVisualizerConfig as AudioVisualizerConfig,
2998
2814
  type EnabledFeatures as EnabledFeatures,
2815
+ type ExternalLlm as ExternalLlm,
2816
+ type ExternalLlmReq as ExternalLlmReq,
2817
+ type FallbackConfig as FallbackConfig,
2818
+ type FallbackConfigReq as FallbackConfigReq,
2999
2819
  type HangupTool as HangupTool,
3000
2820
  type HangupToolParams as HangupToolParams,
3001
2821
  type ImportMetadata as ImportMetadata,
@@ -3005,6 +2825,8 @@ export declare namespace Assistants {
3005
2825
  type MessagingSettings as MessagingSettings,
3006
2826
  type Observability as Observability,
3007
2827
  type ObservabilityReq as ObservabilityReq,
2828
+ type PostConversationSettings as PostConversationSettings,
2829
+ type PostConversationSettingsReq as PostConversationSettingsReq,
3008
2830
  type PrivacySettings as PrivacySettings,
3009
2831
  type RetrievalTool as RetrievalTool,
3010
2832
  type TelephonySettings as TelephonySettings,
@@ -7,6 +7,10 @@ export {
7
7
  type AssistantsList,
8
8
  type AudioVisualizerConfig,
9
9
  type EnabledFeatures,
10
+ type ExternalLlm,
11
+ type ExternalLlmReq,
12
+ type FallbackConfig,
13
+ type FallbackConfigReq,
10
14
  type HangupTool,
11
15
  type HangupToolParams,
12
16
  type ImportMetadata,
@@ -16,6 +20,8 @@ export {
16
20
  type MessagingSettings,
17
21
  type Observability,
18
22
  type ObservabilityReq,
23
+ type PostConversationSettings,
24
+ type PostConversationSettingsReq,
19
25
  type PrivacySettings,
20
26
  type RetrievalTool,
21
27
  type TelephonySettings,