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
@@ -598,6 +598,104 @@ export interface AudioVisualizerConfig {
598
598
  * messages.
599
599
  */
600
600
  export type EnabledFeatures = 'telephony' | 'messaging';
601
+ export interface ExternalLlm {
602
+ /**
603
+ * Base URL for the external LLM endpoint.
604
+ */
605
+ base_url: string;
606
+ /**
607
+ * Model identifier to use with the external LLM endpoint.
608
+ */
609
+ model: string;
610
+ /**
611
+ * Authentication method used when connecting to the external LLM endpoint.
612
+ */
613
+ authentication_method?: 'token' | 'certificate';
614
+ /**
615
+ * Integration secret identifier for the client certificate used with certificate
616
+ * authentication.
617
+ */
618
+ certificate_ref?: string;
619
+ /**
620
+ * When `true`, Telnyx forwards the assistant's dynamic variables to the external
621
+ * LLM endpoint as a top-level `extra_metadata` object on the chat completion
622
+ * request body. Defaults to `false`. Example payload sent to the external
623
+ * endpoint:
624
+ * `{"extra_metadata": {"customer_name": "Jane", "account_id": "acct_789", "telnyx_agent_target": "+13125550100", "telnyx_end_user_target": "+13125550123"}}`.
625
+ * Distinct from OpenAI's native `metadata` field, which has its own size and type
626
+ * limits.
627
+ */
628
+ forward_metadata?: boolean;
629
+ /**
630
+ * Integration secret identifier for the external LLM API key.
631
+ */
632
+ llm_api_key_ref?: string;
633
+ /**
634
+ * URL used to retrieve an access token when certificate authentication is enabled.
635
+ */
636
+ token_retrieval_url?: string;
637
+ }
638
+ export interface ExternalLlmReq {
639
+ /**
640
+ * Base URL for the external LLM endpoint.
641
+ */
642
+ base_url: string;
643
+ /**
644
+ * Model identifier to use with the external LLM endpoint.
645
+ */
646
+ model: string;
647
+ /**
648
+ * Authentication method used when connecting to the external LLM endpoint.
649
+ */
650
+ authentication_method?: 'token' | 'certificate';
651
+ /**
652
+ * Integration secret identifier for the client certificate used with certificate
653
+ * authentication.
654
+ */
655
+ certificate_ref?: string;
656
+ /**
657
+ * When `true`, Telnyx forwards the assistant's dynamic variables to the external
658
+ * LLM endpoint as a top-level `extra_metadata` object on the chat completion
659
+ * request body. Defaults to `false`. Example payload sent to the external
660
+ * endpoint:
661
+ * `{"extra_metadata": {"customer_name": "Jane", "account_id": "acct_789", "telnyx_agent_target": "+13125550100", "telnyx_end_user_target": "+13125550123"}}`.
662
+ * Distinct from OpenAI's native `metadata` field, which has its own size and type
663
+ * limits.
664
+ */
665
+ forward_metadata?: boolean;
666
+ /**
667
+ * Integration secret identifier for the external LLM API key.
668
+ */
669
+ llm_api_key_ref?: string;
670
+ /**
671
+ * URL used to retrieve an access token when certificate authentication is enabled.
672
+ */
673
+ token_retrieval_url?: string;
674
+ }
675
+ export interface FallbackConfig {
676
+ external_llm?: ExternalLlm;
677
+ /**
678
+ * Integration secret identifier for the fallback model API key.
679
+ */
680
+ llm_api_key_ref?: string;
681
+ /**
682
+ * Fallback Telnyx-hosted model to use when the primary LLM provider is
683
+ * unavailable.
684
+ */
685
+ model?: string;
686
+ }
687
+ export interface FallbackConfigReq {
688
+ external_llm?: ExternalLlmReq;
689
+ /**
690
+ * Integration secret identifier for the fallback model API key.
691
+ */
692
+ llm_api_key_ref?: string;
693
+ /**
694
+ * Fallback Telnyx-hosted model to use when the primary LLM provider is
695
+ * unavailable.
696
+ */
697
+ model?: string;
698
+ }
601
699
  export interface HangupTool {
602
700
  hangup: HangupToolParams;
603
701
  type: 'hangup';
@@ -661,8 +759,8 @@ export interface InferenceEmbedding {
661
759
  */
662
760
  dynamic_variables_webhook_url?: string;
663
761
  enabled_features?: Array<EnabledFeatures>;
664
- external_llm?: InferenceEmbedding.ExternalLlm;
665
- fallback_config?: InferenceEmbedding.FallbackConfig;
762
+ external_llm?: ExternalLlm;
763
+ fallback_config?: FallbackConfig;
666
764
  /**
667
765
  * Text that the assistant will use to start the conversation. This may be
668
766
  * templated with
@@ -714,7 +812,7 @@ export interface InferenceEmbedding {
714
812
  * Telephony-control tools (e.g. hangup, transfer) are unavailable
715
813
  * post-conversation. Beta feature.
716
814
  */
717
- post_conversation_settings?: InferenceEmbedding.PostConversationSettings;
815
+ post_conversation_settings?: PostConversationSettings;
718
816
  privacy_settings?: PrivacySettings;
719
817
  /**
720
818
  * IDs of missions related to this assistant.
@@ -753,94 +851,6 @@ export interface InferenceEmbedding {
753
851
  widget_settings?: WidgetSettings;
754
852
  }
755
853
  export declare namespace InferenceEmbedding {
756
- interface ExternalLlm {
757
- /**
758
- * Base URL for the external LLM endpoint.
759
- */
760
- base_url: string;
761
- /**
762
- * Model identifier to use with the external LLM endpoint.
763
- */
764
- model: string;
765
- /**
766
- * Authentication method used when connecting to the external LLM endpoint.
767
- */
768
- authentication_method?: 'token' | 'certificate';
769
- /**
770
- * Integration secret identifier for the client certificate used with certificate
771
- * authentication.
772
- */
773
- certificate_ref?: string;
774
- /**
775
- * When `true`, Telnyx forwards the assistant's dynamic variables to the external
776
- * LLM endpoint as a top-level `extra_metadata` object on the chat completion
777
- * request body. Defaults to `false`. Example payload sent to the external
778
- * endpoint:
779
- * `{"extra_metadata": {"customer_name": "Jane", "account_id": "acct_789", "telnyx_agent_target": "+13125550100", "telnyx_end_user_target": "+13125550123"}}`.
780
- * Distinct from OpenAI's native `metadata` field, which has its own size and type
781
- * limits.
782
- */
783
- forward_metadata?: boolean;
784
- /**
785
- * Integration secret identifier for the external LLM API key.
786
- */
787
- llm_api_key_ref?: string;
788
- /**
789
- * URL used to retrieve an access token when certificate authentication is enabled.
790
- */
791
- token_retrieval_url?: string;
792
- }
793
- interface FallbackConfig {
794
- external_llm?: FallbackConfig.ExternalLlm;
795
- /**
796
- * Integration secret identifier for the fallback model API key.
797
- */
798
- llm_api_key_ref?: string;
799
- /**
800
- * Fallback Telnyx-hosted model to use when the primary LLM provider is
801
- * unavailable.
802
- */
803
- model?: string;
804
- }
805
- namespace FallbackConfig {
806
- interface ExternalLlm {
807
- /**
808
- * Base URL for the external LLM endpoint.
809
- */
810
- base_url: string;
811
- /**
812
- * Model identifier to use with the external LLM endpoint.
813
- */
814
- model: string;
815
- /**
816
- * Authentication method used when connecting to the external LLM endpoint.
817
- */
818
- authentication_method?: 'token' | 'certificate';
819
- /**
820
- * Integration secret identifier for the client certificate used with certificate
821
- * authentication.
822
- */
823
- certificate_ref?: string;
824
- /**
825
- * When `true`, Telnyx forwards the assistant's dynamic variables to the external
826
- * LLM endpoint as a top-level `extra_metadata` object on the chat completion
827
- * request body. Defaults to `false`. Example payload sent to the external
828
- * endpoint:
829
- * `{"extra_metadata": {"customer_name": "Jane", "account_id": "acct_789", "telnyx_agent_target": "+13125550100", "telnyx_end_user_target": "+13125550123"}}`.
830
- * Distinct from OpenAI's native `metadata` field, which has its own size and type
831
- * limits.
832
- */
833
- forward_metadata?: boolean;
834
- /**
835
- * Integration secret identifier for the external LLM API key.
836
- */
837
- llm_api_key_ref?: string;
838
- /**
839
- * URL used to retrieve an access token when certificate authentication is enabled.
840
- */
841
- token_retrieval_url?: string;
842
- }
843
- }
844
854
  /**
845
855
  * Reference to a connected integration attached to an assistant. Discover
846
856
  * available integrations with `/ai/integrations` and connected integrations with
@@ -942,22 +952,6 @@ export declare namespace InferenceEmbedding {
942
952
  */
943
953
  allowed_tools?: Array<string>;
944
954
  }
945
- /**
946
- * Configuration for post-conversation processing. When enabled, the assistant
947
- * receives one additional LLM turn after the conversation ends, allowing it to
948
- * execute tool calls such as logging to a CRM or sending a summary. The assistant
949
- * can execute multiple parallel or sequential tools during this phase.
950
- * Telephony-control tools (e.g. hangup, transfer) are unavailable
951
- * post-conversation. Beta feature.
952
- */
953
- interface PostConversationSettings {
954
- /**
955
- * Whether post-conversation processing is enabled. When true, the assistant will
956
- * be invoked after the conversation ends to perform any final tool calls. Defaults
957
- * to false.
958
- */
959
- enabled?: boolean;
960
- }
961
955
  }
962
956
  export interface InferenceEmbeddingWebhookToolParams {
963
957
  type: 'webhook';
@@ -1139,16 +1133,70 @@ export interface MessagingSettings {
1139
1133
  }
1140
1134
  export interface Observability {
1141
1135
  host?: string;
1136
+ prompt_label?: string;
1137
+ prompt_name?: string;
1138
+ /**
1139
+ * Whether to auto-publish the assistant's instructions as a Langfuse prompt.
1140
+ *
1141
+ * When ENABLED + prompt_name set, every assistant create/update pushes
1142
+ * `instructions` to Langfuse via create_prompt and stores the returned version in
1143
+ * prompt_version.
1144
+ */
1145
+ prompt_sync?: 'enabled' | 'disabled';
1146
+ prompt_version?: number;
1142
1147
  public_key_ref?: string;
1143
1148
  secret_key_ref?: string;
1144
1149
  status?: 'enabled' | 'disabled';
1145
1150
  }
1146
1151
  export interface ObservabilityReq {
1147
1152
  host?: string;
1153
+ prompt_label?: string;
1154
+ prompt_name?: string;
1155
+ /**
1156
+ * Whether to auto-publish the assistant's instructions as a Langfuse prompt.
1157
+ *
1158
+ * When ENABLED + prompt_name set, every assistant create/update pushes
1159
+ * `instructions` to Langfuse via create_prompt and stores the returned version in
1160
+ * prompt_version.
1161
+ */
1162
+ prompt_sync?: 'enabled' | 'disabled';
1163
+ prompt_version?: number;
1148
1164
  public_key_ref?: string;
1149
1165
  secret_key_ref?: string;
1150
1166
  status?: 'enabled' | 'disabled';
1151
1167
  }
1168
+ /**
1169
+ * Configuration for post-conversation processing. When enabled, the assistant
1170
+ * receives one additional LLM turn after the conversation ends, allowing it to
1171
+ * execute tool calls such as logging to a CRM or sending a summary. The assistant
1172
+ * can execute multiple parallel or sequential tools during this phase.
1173
+ * Telephony-control tools (e.g. hangup, transfer) are unavailable
1174
+ * post-conversation. Beta feature.
1175
+ */
1176
+ export interface PostConversationSettings {
1177
+ /**
1178
+ * Whether post-conversation processing is enabled. When true, the assistant will
1179
+ * be invoked after the conversation ends to perform any final tool calls. Defaults
1180
+ * to false.
1181
+ */
1182
+ enabled?: boolean;
1183
+ }
1184
+ /**
1185
+ * Configuration for post-conversation processing. When enabled, the assistant
1186
+ * receives one additional LLM turn after the conversation ends, allowing it to
1187
+ * execute tool calls such as logging to a CRM or sending a summary. The assistant
1188
+ * can execute multiple parallel or sequential tools during this phase.
1189
+ * Telephony-control tools (e.g. hangup, transfer) are unavailable
1190
+ * post-conversation. Beta feature.
1191
+ */
1192
+ export interface PostConversationSettingsReq {
1193
+ /**
1194
+ * Whether post-conversation processing is enabled. When true, the assistant will
1195
+ * be invoked after the conversation ends to perform any final tool calls. Defaults
1196
+ * to false.
1197
+ */
1198
+ enabled?: boolean;
1199
+ }
1152
1200
  export interface PrivacySettings {
1153
1201
  /**
1154
1202
  * If true, conversation history and insights will be stored. If false, they will
@@ -1750,8 +1798,8 @@ export interface AssistantCreateParams {
1750
1798
  */
1751
1799
  dynamic_variables_webhook_url?: string;
1752
1800
  enabled_features?: Array<EnabledFeatures>;
1753
- external_llm?: AssistantCreateParams.ExternalLlm;
1754
- fallback_config?: AssistantCreateParams.FallbackConfig;
1801
+ external_llm?: ExternalLlmReq;
1802
+ fallback_config?: FallbackConfigReq;
1755
1803
  /**
1756
1804
  * Text that the assistant will use to start the conversation. This may be
1757
1805
  * templated with
@@ -1810,7 +1858,7 @@ export interface AssistantCreateParams {
1810
1858
  * Telephony-control tools (e.g. hangup, transfer) are unavailable
1811
1859
  * post-conversation. Beta feature.
1812
1860
  */
1813
- post_conversation_settings?: AssistantCreateParams.PostConversationSettings;
1861
+ post_conversation_settings?: PostConversationSettingsReq;
1814
1862
  privacy_settings?: PrivacySettings;
1815
1863
  /**
1816
1864
  * Tags associated with the assistant. Tags can also be managed with the assistant
@@ -1837,94 +1885,6 @@ export interface AssistantCreateParams {
1837
1885
  widget_settings?: WidgetSettings;
1838
1886
  }
1839
1887
  export declare namespace AssistantCreateParams {
1840
- interface ExternalLlm {
1841
- /**
1842
- * Base URL for the external LLM endpoint.
1843
- */
1844
- base_url: string;
1845
- /**
1846
- * Model identifier to use with the external LLM endpoint.
1847
- */
1848
- model: string;
1849
- /**
1850
- * Authentication method used when connecting to the external LLM endpoint.
1851
- */
1852
- authentication_method?: 'token' | 'certificate';
1853
- /**
1854
- * Integration secret identifier for the client certificate used with certificate
1855
- * authentication.
1856
- */
1857
- certificate_ref?: string;
1858
- /**
1859
- * When `true`, Telnyx forwards the assistant's dynamic variables to the external
1860
- * LLM endpoint as a top-level `extra_metadata` object on the chat completion
1861
- * request body. Defaults to `false`. Example payload sent to the external
1862
- * endpoint:
1863
- * `{"extra_metadata": {"customer_name": "Jane", "account_id": "acct_789", "telnyx_agent_target": "+13125550100", "telnyx_end_user_target": "+13125550123"}}`.
1864
- * Distinct from OpenAI's native `metadata` field, which has its own size and type
1865
- * limits.
1866
- */
1867
- forward_metadata?: boolean;
1868
- /**
1869
- * Integration secret identifier for the external LLM API key.
1870
- */
1871
- llm_api_key_ref?: string;
1872
- /**
1873
- * URL used to retrieve an access token when certificate authentication is enabled.
1874
- */
1875
- token_retrieval_url?: string;
1876
- }
1877
- interface FallbackConfig {
1878
- external_llm?: FallbackConfig.ExternalLlm;
1879
- /**
1880
- * Integration secret identifier for the fallback model API key.
1881
- */
1882
- llm_api_key_ref?: string;
1883
- /**
1884
- * Fallback Telnyx-hosted model to use when the primary LLM provider is
1885
- * unavailable.
1886
- */
1887
- model?: string;
1888
- }
1889
- namespace FallbackConfig {
1890
- interface ExternalLlm {
1891
- /**
1892
- * Base URL for the external LLM endpoint.
1893
- */
1894
- base_url: string;
1895
- /**
1896
- * Model identifier to use with the external LLM endpoint.
1897
- */
1898
- model: string;
1899
- /**
1900
- * Authentication method used when connecting to the external LLM endpoint.
1901
- */
1902
- authentication_method?: 'token' | 'certificate';
1903
- /**
1904
- * Integration secret identifier for the client certificate used with certificate
1905
- * authentication.
1906
- */
1907
- certificate_ref?: string;
1908
- /**
1909
- * When `true`, Telnyx forwards the assistant's dynamic variables to the external
1910
- * LLM endpoint as a top-level `extra_metadata` object on the chat completion
1911
- * request body. Defaults to `false`. Example payload sent to the external
1912
- * endpoint:
1913
- * `{"extra_metadata": {"customer_name": "Jane", "account_id": "acct_789", "telnyx_agent_target": "+13125550100", "telnyx_end_user_target": "+13125550123"}}`.
1914
- * Distinct from OpenAI's native `metadata` field, which has its own size and type
1915
- * limits.
1916
- */
1917
- forward_metadata?: boolean;
1918
- /**
1919
- * Integration secret identifier for the external LLM API key.
1920
- */
1921
- llm_api_key_ref?: string;
1922
- /**
1923
- * URL used to retrieve an access token when certificate authentication is enabled.
1924
- */
1925
- token_retrieval_url?: string;
1926
- }
1927
- }
1928
1888
  /**
1929
1889
  * Reference to a connected integration attached to an assistant. Discover
1930
1890
  * available integrations with `/ai/integrations` and connected integrations with
@@ -2026,22 +1986,6 @@ export declare namespace AssistantCreateParams {
2026
1986
  */
2027
1987
  allowed_tools?: Array<string>;
2028
1988
  }
2029
- /**
2030
- * Configuration for post-conversation processing. When enabled, the assistant
2031
- * receives one additional LLM turn after the conversation ends, allowing it to
2032
- * execute tool calls such as logging to a CRM or sending a summary. The assistant
2033
- * can execute multiple parallel or sequential tools during this phase.
2034
- * Telephony-control tools (e.g. hangup, transfer) are unavailable
2035
- * post-conversation. Beta feature.
2036
- */
2037
- interface PostConversationSettings {
2038
- /**
2039
- * Whether post-conversation processing is enabled. When true, the assistant will
2040
- * be invoked after the conversation ends to perform any final tool calls. Defaults
2041
- * to false.
2042
- */
2043
- enabled?: boolean;
2044
- }
2045
1989
  }
2046
1990
  export interface AssistantRetrieveParams {
2047
1991
  call_control_id?: string;
@@ -2076,8 +2020,8 @@ export interface AssistantUpdateParams {
2076
2020
  */
2077
2021
  dynamic_variables_webhook_url?: string;
2078
2022
  enabled_features?: Array<EnabledFeatures>;
2079
- external_llm?: AssistantUpdateParams.ExternalLlm;
2080
- fallback_config?: AssistantUpdateParams.FallbackConfig;
2023
+ external_llm?: ExternalLlmReq;
2024
+ fallback_config?: FallbackConfigReq;
2081
2025
  /**
2082
2026
  * Text that the assistant will use to start the conversation. This may be
2083
2027
  * templated with
@@ -2142,7 +2086,7 @@ export interface AssistantUpdateParams {
2142
2086
  * Telephony-control tools (e.g. hangup, transfer) are unavailable
2143
2087
  * post-conversation. Beta feature.
2144
2088
  */
2145
- post_conversation_settings?: AssistantUpdateParams.PostConversationSettings;
2089
+ post_conversation_settings?: PostConversationSettingsReq;
2146
2090
  privacy_settings?: PrivacySettings;
2147
2091
  /**
2148
2092
  * Indicates whether the assistant should be promoted to the main version. Defaults
@@ -2178,94 +2122,6 @@ export interface AssistantUpdateParams {
2178
2122
  widget_settings?: WidgetSettings;
2179
2123
  }
2180
2124
  export declare namespace AssistantUpdateParams {
2181
- interface ExternalLlm {
2182
- /**
2183
- * Base URL for the external LLM endpoint.
2184
- */
2185
- base_url: string;
2186
- /**
2187
- * Model identifier to use with the external LLM endpoint.
2188
- */
2189
- model: string;
2190
- /**
2191
- * Authentication method used when connecting to the external LLM endpoint.
2192
- */
2193
- authentication_method?: 'token' | 'certificate';
2194
- /**
2195
- * Integration secret identifier for the client certificate used with certificate
2196
- * authentication.
2197
- */
2198
- certificate_ref?: string;
2199
- /**
2200
- * When `true`, Telnyx forwards the assistant's dynamic variables to the external
2201
- * LLM endpoint as a top-level `extra_metadata` object on the chat completion
2202
- * request body. Defaults to `false`. Example payload sent to the external
2203
- * endpoint:
2204
- * `{"extra_metadata": {"customer_name": "Jane", "account_id": "acct_789", "telnyx_agent_target": "+13125550100", "telnyx_end_user_target": "+13125550123"}}`.
2205
- * Distinct from OpenAI's native `metadata` field, which has its own size and type
2206
- * limits.
2207
- */
2208
- forward_metadata?: boolean;
2209
- /**
2210
- * Integration secret identifier for the external LLM API key.
2211
- */
2212
- llm_api_key_ref?: string;
2213
- /**
2214
- * URL used to retrieve an access token when certificate authentication is enabled.
2215
- */
2216
- token_retrieval_url?: string;
2217
- }
2218
- interface FallbackConfig {
2219
- external_llm?: FallbackConfig.ExternalLlm;
2220
- /**
2221
- * Integration secret identifier for the fallback model API key.
2222
- */
2223
- llm_api_key_ref?: string;
2224
- /**
2225
- * Fallback Telnyx-hosted model to use when the primary LLM provider is
2226
- * unavailable.
2227
- */
2228
- model?: string;
2229
- }
2230
- namespace FallbackConfig {
2231
- interface ExternalLlm {
2232
- /**
2233
- * Base URL for the external LLM endpoint.
2234
- */
2235
- base_url: string;
2236
- /**
2237
- * Model identifier to use with the external LLM endpoint.
2238
- */
2239
- model: string;
2240
- /**
2241
- * Authentication method used when connecting to the external LLM endpoint.
2242
- */
2243
- authentication_method?: 'token' | 'certificate';
2244
- /**
2245
- * Integration secret identifier for the client certificate used with certificate
2246
- * authentication.
2247
- */
2248
- certificate_ref?: string;
2249
- /**
2250
- * When `true`, Telnyx forwards the assistant's dynamic variables to the external
2251
- * LLM endpoint as a top-level `extra_metadata` object on the chat completion
2252
- * request body. Defaults to `false`. Example payload sent to the external
2253
- * endpoint:
2254
- * `{"extra_metadata": {"customer_name": "Jane", "account_id": "acct_789", "telnyx_agent_target": "+13125550100", "telnyx_end_user_target": "+13125550123"}}`.
2255
- * Distinct from OpenAI's native `metadata` field, which has its own size and type
2256
- * limits.
2257
- */
2258
- forward_metadata?: boolean;
2259
- /**
2260
- * Integration secret identifier for the external LLM API key.
2261
- */
2262
- llm_api_key_ref?: string;
2263
- /**
2264
- * URL used to retrieve an access token when certificate authentication is enabled.
2265
- */
2266
- token_retrieval_url?: string;
2267
- }
2268
- }
2269
2125
  /**
2270
2126
  * Reference to a connected integration attached to an assistant. Discover
2271
2127
  * available integrations with `/ai/integrations` and connected integrations with
@@ -2367,22 +2223,6 @@ export declare namespace AssistantUpdateParams {
2367
2223
  */
2368
2224
  allowed_tools?: Array<string>;
2369
2225
  }
2370
- /**
2371
- * Configuration for post-conversation processing. When enabled, the assistant
2372
- * receives one additional LLM turn after the conversation ends, allowing it to
2373
- * execute tool calls such as logging to a CRM or sending a summary. The assistant
2374
- * can execute multiple parallel or sequential tools during this phase.
2375
- * Telephony-control tools (e.g. hangup, transfer) are unavailable
2376
- * post-conversation. Beta feature.
2377
- */
2378
- interface PostConversationSettings {
2379
- /**
2380
- * Whether post-conversation processing is enabled. When true, the assistant will
2381
- * be invoked after the conversation ends to perform any final tool calls. Defaults
2382
- * to false.
2383
- */
2384
- enabled?: boolean;
2385
- }
2386
2226
  }
2387
2227
  export interface AssistantChatParams {
2388
2228
  /**
@@ -2425,7 +2265,7 @@ export interface AssistantSendSMSParams {
2425
2265
  text?: string;
2426
2266
  }
2427
2267
  export declare namespace Assistants {
2428
- export { type Assistant as Assistant, type AssistantTool as AssistantTool, type AssistantsList as AssistantsList, type AudioVisualizerConfig as AudioVisualizerConfig, type EnabledFeatures as EnabledFeatures, type HangupTool as HangupTool, type HangupToolParams as HangupToolParams, type ImportMetadata as ImportMetadata, type InferenceEmbedding as InferenceEmbedding, type InferenceEmbeddingWebhookToolParams as InferenceEmbeddingWebhookToolParams, type InsightSettings as InsightSettings, type MessagingSettings as MessagingSettings, type Observability as Observability, type ObservabilityReq as ObservabilityReq, type PrivacySettings as PrivacySettings, type RetrievalTool as RetrievalTool, type TelephonySettings as TelephonySettings, type TranscriptionSettings as TranscriptionSettings, type TranscriptionSettingsConfig as TranscriptionSettingsConfig, type TransferTool as TransferTool, type VoiceSettings as VoiceSettings, type WebhookTool as WebhookTool, type WidgetSettings as WidgetSettings, type AssistantDeleteResponse as AssistantDeleteResponse, type AssistantChatResponse as AssistantChatResponse, type AssistantGetTexmlResponse as AssistantGetTexmlResponse, type AssistantSendSMSResponse as AssistantSendSMSResponse, type AssistantCreateParams as AssistantCreateParams, type AssistantRetrieveParams as AssistantRetrieveParams, type AssistantUpdateParams as AssistantUpdateParams, type AssistantChatParams as AssistantChatParams, type AssistantImportsParams as AssistantImportsParams, type AssistantSendSMSParams as AssistantSendSMSParams, };
2268
+ export { type Assistant as Assistant, type AssistantTool as AssistantTool, type AssistantsList as AssistantsList, type AudioVisualizerConfig as AudioVisualizerConfig, type EnabledFeatures as EnabledFeatures, type ExternalLlm as ExternalLlm, type ExternalLlmReq as ExternalLlmReq, type FallbackConfig as FallbackConfig, type FallbackConfigReq as FallbackConfigReq, type HangupTool as HangupTool, type HangupToolParams as HangupToolParams, type ImportMetadata as ImportMetadata, type InferenceEmbedding as InferenceEmbedding, type InferenceEmbeddingWebhookToolParams as InferenceEmbeddingWebhookToolParams, type InsightSettings as InsightSettings, type MessagingSettings as MessagingSettings, type Observability as Observability, type ObservabilityReq as ObservabilityReq, type PostConversationSettings as PostConversationSettings, type PostConversationSettingsReq as PostConversationSettingsReq, type PrivacySettings as PrivacySettings, type RetrievalTool as RetrievalTool, type TelephonySettings as TelephonySettings, type TranscriptionSettings as TranscriptionSettings, type TranscriptionSettingsConfig as TranscriptionSettingsConfig, type TransferTool as TransferTool, type VoiceSettings as VoiceSettings, type WebhookTool as WebhookTool, type WidgetSettings as WidgetSettings, type AssistantDeleteResponse as AssistantDeleteResponse, type AssistantChatResponse as AssistantChatResponse, type AssistantGetTexmlResponse as AssistantGetTexmlResponse, type AssistantSendSMSResponse as AssistantSendSMSResponse, type AssistantCreateParams as AssistantCreateParams, type AssistantRetrieveParams as AssistantRetrieveParams, type AssistantUpdateParams as AssistantUpdateParams, type AssistantChatParams as AssistantChatParams, type AssistantImportsParams as AssistantImportsParams, type AssistantSendSMSParams as AssistantSendSMSParams, };
2429
2269
  export { Tests as Tests, type AssistantTest as AssistantTest, type TelnyxConversationChannel as TelnyxConversationChannel, type AssistantTestsDefaultFlatPagination as AssistantTestsDefaultFlatPagination, type TestCreateParams as TestCreateParams, type TestUpdateParams as TestUpdateParams, type TestListParams as TestListParams, };
2430
2270
  export { CanaryDeploys as CanaryDeploys, type CanaryDeploy as CanaryDeploy, type CanaryDeployResponse as CanaryDeployResponse, type VersionConfig as VersionConfig, type CanaryDeployCreateParams as CanaryDeployCreateParams, type CanaryDeployUpdateParams as CanaryDeployUpdateParams, };
2431
2271
  export { ScheduledEvents as ScheduledEvents, type ConversationChannelType as ConversationChannelType, type EventStatus as EventStatus, type ScheduledEventResponse as ScheduledEventResponse, type ScheduledPhoneCallEventResponse as ScheduledPhoneCallEventResponse, type ScheduledSMSEventResponse as ScheduledSMSEventResponse, type ScheduledEventListResponse as ScheduledEventListResponse, type ScheduledEventListResponsesDefaultFlatPagination as ScheduledEventListResponsesDefaultFlatPagination, type ScheduledEventCreateParams as ScheduledEventCreateParams, type ScheduledEventRetrieveParams as ScheduledEventRetrieveParams, type ScheduledEventListParams as ScheduledEventListParams, type ScheduledEventDeleteParams as ScheduledEventDeleteParams, };