telnyx 7.20.0 → 7.22.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 (278) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/client.d.mts +7 -4
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +7 -4
  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/package.json +1 -1
  11. package/resources/ai/ai.d.mts +2 -2
  12. package/resources/ai/ai.d.mts.map +1 -1
  13. package/resources/ai/ai.d.ts +2 -2
  14. package/resources/ai/ai.d.ts.map +1 -1
  15. package/resources/ai/ai.js.map +1 -1
  16. package/resources/ai/ai.mjs.map +1 -1
  17. package/resources/ai/anthropic/v1.d.mts +16 -0
  18. package/resources/ai/anthropic/v1.d.mts.map +1 -1
  19. package/resources/ai/anthropic/v1.d.ts +16 -0
  20. package/resources/ai/anthropic/v1.d.ts.map +1 -1
  21. package/resources/ai/assistants/assistants.d.mts +152 -1
  22. package/resources/ai/assistants/assistants.d.mts.map +1 -1
  23. package/resources/ai/assistants/assistants.d.ts +152 -1
  24. package/resources/ai/assistants/assistants.d.ts.map +1 -1
  25. package/resources/ai/assistants/assistants.js.map +1 -1
  26. package/resources/ai/assistants/assistants.mjs.map +1 -1
  27. package/resources/ai/assistants/index.d.mts +1 -1
  28. package/resources/ai/assistants/index.d.mts.map +1 -1
  29. package/resources/ai/assistants/index.d.ts +1 -1
  30. package/resources/ai/assistants/index.d.ts.map +1 -1
  31. package/resources/ai/assistants/index.js.map +1 -1
  32. package/resources/ai/assistants/index.mjs.map +1 -1
  33. package/resources/ai/assistants/versions.d.mts +25 -0
  34. package/resources/ai/assistants/versions.d.mts.map +1 -1
  35. package/resources/ai/assistants/versions.d.ts +25 -0
  36. package/resources/ai/assistants/versions.d.ts.map +1 -1
  37. package/resources/ai/chat.d.mts +77 -22
  38. package/resources/ai/chat.d.mts.map +1 -1
  39. package/resources/ai/chat.d.ts +77 -22
  40. package/resources/ai/chat.d.ts.map +1 -1
  41. package/resources/ai/index.d.mts +1 -1
  42. package/resources/ai/index.d.mts.map +1 -1
  43. package/resources/ai/index.d.ts +1 -1
  44. package/resources/ai/index.d.ts.map +1 -1
  45. package/resources/ai/index.js.map +1 -1
  46. package/resources/ai/index.mjs.map +1 -1
  47. package/resources/ai/openai/chat.d.mts +77 -22
  48. package/resources/ai/openai/chat.d.mts.map +1 -1
  49. package/resources/ai/openai/chat.d.ts +77 -22
  50. package/resources/ai/openai/chat.d.ts.map +1 -1
  51. package/resources/ai/openai/openai.d.mts +16 -0
  52. package/resources/ai/openai/openai.d.mts.map +1 -1
  53. package/resources/ai/openai/openai.d.ts +16 -0
  54. package/resources/ai/openai/openai.d.ts.map +1 -1
  55. package/resources/ai/openai/openai.js.map +1 -1
  56. package/resources/ai/openai/openai.mjs.map +1 -1
  57. package/resources/compute/compute.d.mts +10 -0
  58. package/resources/compute/compute.d.mts.map +1 -0
  59. package/resources/compute/compute.d.ts +10 -0
  60. package/resources/compute/compute.d.ts.map +1 -0
  61. package/resources/compute/compute.js +17 -0
  62. package/resources/compute/compute.js.map +1 -0
  63. package/resources/compute/compute.mjs +12 -0
  64. package/resources/compute/compute.mjs.map +1 -0
  65. package/resources/compute/funcs.d.mts +179 -0
  66. package/resources/compute/funcs.d.mts.map +1 -0
  67. package/resources/compute/funcs.d.ts +179 -0
  68. package/resources/compute/funcs.d.ts.map +1 -0
  69. package/resources/compute/funcs.js +41 -0
  70. package/resources/compute/funcs.js.map +1 -0
  71. package/resources/compute/funcs.mjs +37 -0
  72. package/resources/compute/funcs.mjs.map +1 -0
  73. package/resources/compute/index.d.mts +3 -0
  74. package/resources/compute/index.d.mts.map +1 -0
  75. package/resources/compute/index.d.ts +3 -0
  76. package/resources/compute/index.d.ts.map +1 -0
  77. package/resources/compute/index.js +9 -0
  78. package/resources/compute/index.js.map +1 -0
  79. package/resources/compute/index.mjs +4 -0
  80. package/resources/compute/index.mjs.map +1 -0
  81. package/resources/compute.d.mts +2 -0
  82. package/resources/compute.d.mts.map +1 -0
  83. package/resources/compute.d.ts +2 -0
  84. package/resources/compute.d.ts.map +1 -0
  85. package/resources/compute.js +6 -0
  86. package/resources/compute.js.map +1 -0
  87. package/resources/compute.mjs +3 -0
  88. package/resources/compute.mjs.map +1 -0
  89. package/resources/credential-connections/credential-connections.d.mts +4 -1
  90. package/resources/credential-connections/credential-connections.d.mts.map +1 -1
  91. package/resources/credential-connections/credential-connections.d.ts +4 -1
  92. package/resources/credential-connections/credential-connections.d.ts.map +1 -1
  93. package/resources/credential-connections/credential-connections.js.map +1 -1
  94. package/resources/credential-connections/credential-connections.mjs.map +1 -1
  95. package/resources/email-inboxes/drafts.d.mts +7 -0
  96. package/resources/email-inboxes/drafts.d.mts.map +1 -1
  97. package/resources/email-inboxes/drafts.d.ts +7 -0
  98. package/resources/email-inboxes/drafts.d.ts.map +1 -1
  99. package/resources/email-messages/email-messages.d.mts +7 -3
  100. package/resources/email-messages/email-messages.d.mts.map +1 -1
  101. package/resources/email-messages/email-messages.d.ts +7 -3
  102. package/resources/email-messages/email-messages.d.ts.map +1 -1
  103. package/resources/email-messages/email-messages.js +3 -1
  104. package/resources/email-messages/email-messages.js.map +1 -1
  105. package/resources/email-messages/email-messages.mjs +3 -1
  106. package/resources/email-messages/email-messages.mjs.map +1 -1
  107. package/resources/fqdn-connections/fqdn-authentication.d.mts +4 -1
  108. package/resources/fqdn-connections/fqdn-authentication.d.mts.map +1 -1
  109. package/resources/fqdn-connections/fqdn-authentication.d.ts +4 -1
  110. package/resources/fqdn-connections/fqdn-authentication.d.ts.map +1 -1
  111. package/resources/fqdn-connections/fqdn-connections.d.mts +4 -1
  112. package/resources/fqdn-connections/fqdn-connections.d.mts.map +1 -1
  113. package/resources/fqdn-connections/fqdn-connections.d.ts +4 -1
  114. package/resources/fqdn-connections/fqdn-connections.d.ts.map +1 -1
  115. package/resources/fqdn-connections/fqdn-connections.js.map +1 -1
  116. package/resources/fqdn-connections/fqdn-connections.mjs.map +1 -1
  117. package/resources/index.d.mts +3 -2
  118. package/resources/index.d.mts.map +1 -1
  119. package/resources/index.d.ts +3 -2
  120. package/resources/index.d.ts.map +1 -1
  121. package/resources/index.js +6 -4
  122. package/resources/index.js.map +1 -1
  123. package/resources/index.mjs +1 -0
  124. package/resources/index.mjs.map +1 -1
  125. package/resources/messages/messages.d.mts +79 -6
  126. package/resources/messages/messages.d.mts.map +1 -1
  127. package/resources/messages/messages.d.ts +79 -6
  128. package/resources/messages/messages.d.ts.map +1 -1
  129. package/resources/messages/messages.js.map +1 -1
  130. package/resources/messages/messages.mjs.map +1 -1
  131. package/resources/messaging-profiles/actions.d.mts +1 -1
  132. package/resources/messaging-profiles/actions.d.mts.map +1 -1
  133. package/resources/messaging-profiles/actions.d.ts +1 -1
  134. package/resources/messaging-profiles/actions.d.ts.map +1 -1
  135. package/resources/messaging-profiles/index.d.mts +1 -1
  136. package/resources/messaging-profiles/index.d.mts.map +1 -1
  137. package/resources/messaging-profiles/index.d.ts +1 -1
  138. package/resources/messaging-profiles/index.d.ts.map +1 -1
  139. package/resources/messaging-profiles/index.js.map +1 -1
  140. package/resources/messaging-profiles/index.mjs.map +1 -1
  141. package/resources/messaging-profiles/messaging-profiles.d.mts +185 -8
  142. package/resources/messaging-profiles/messaging-profiles.d.mts.map +1 -1
  143. package/resources/messaging-profiles/messaging-profiles.d.ts +185 -8
  144. package/resources/messaging-profiles/messaging-profiles.d.ts.map +1 -1
  145. package/resources/messaging-profiles/messaging-profiles.js +1 -1
  146. package/resources/messaging-profiles/messaging-profiles.js.map +1 -1
  147. package/resources/messaging-profiles/messaging-profiles.mjs +1 -1
  148. package/resources/messaging-profiles/messaging-profiles.mjs.map +1 -1
  149. package/resources/uac-connections/uac-connections.d.mts +9 -2
  150. package/resources/uac-connections/uac-connections.d.mts.map +1 -1
  151. package/resources/uac-connections/uac-connections.d.ts +9 -2
  152. package/resources/uac-connections/uac-connections.d.ts.map +1 -1
  153. package/resources/uac-connections/uac-connections.js.map +1 -1
  154. package/resources/uac-connections/uac-connections.mjs.map +1 -1
  155. package/resources/webhooks.d.mts +129 -3
  156. package/resources/webhooks.d.mts.map +1 -1
  157. package/resources/webhooks.d.ts +129 -3
  158. package/resources/webhooks.d.ts.map +1 -1
  159. package/resources/whatsapp/business-accounts/phone-numbers.d.mts +33 -0
  160. package/resources/whatsapp/business-accounts/phone-numbers.d.mts.map +1 -1
  161. package/resources/whatsapp/business-accounts/phone-numbers.d.ts +33 -0
  162. package/resources/whatsapp/business-accounts/phone-numbers.d.ts.map +1 -1
  163. package/resources/whatsapp/index.d.mts +1 -1
  164. package/resources/whatsapp/index.d.mts.map +1 -1
  165. package/resources/whatsapp/index.d.ts +1 -1
  166. package/resources/whatsapp/index.d.ts.map +1 -1
  167. package/resources/whatsapp/index.js.map +1 -1
  168. package/resources/whatsapp/index.mjs.map +1 -1
  169. package/resources/whatsapp/phone-numbers/index.d.mts +1 -1
  170. package/resources/whatsapp/phone-numbers/index.d.mts.map +1 -1
  171. package/resources/whatsapp/phone-numbers/index.d.ts +1 -1
  172. package/resources/whatsapp/phone-numbers/index.d.ts.map +1 -1
  173. package/resources/whatsapp/phone-numbers/index.js.map +1 -1
  174. package/resources/whatsapp/phone-numbers/index.mjs.map +1 -1
  175. package/resources/whatsapp/phone-numbers/phone-numbers.d.mts +147 -1
  176. package/resources/whatsapp/phone-numbers/phone-numbers.d.mts.map +1 -1
  177. package/resources/whatsapp/phone-numbers/phone-numbers.d.ts +147 -1
  178. package/resources/whatsapp/phone-numbers/phone-numbers.d.ts.map +1 -1
  179. package/resources/whatsapp/phone-numbers/phone-numbers.js +16 -0
  180. package/resources/whatsapp/phone-numbers/phone-numbers.js.map +1 -1
  181. package/resources/whatsapp/phone-numbers/phone-numbers.mjs +16 -0
  182. package/resources/whatsapp/phone-numbers/phone-numbers.mjs.map +1 -1
  183. package/resources/whatsapp/whatsapp.d.mts +2 -2
  184. package/resources/whatsapp/whatsapp.d.mts.map +1 -1
  185. package/resources/whatsapp/whatsapp.d.ts +2 -2
  186. package/resources/whatsapp/whatsapp.d.ts.map +1 -1
  187. package/resources/whatsapp/whatsapp.js.map +1 -1
  188. package/resources/whatsapp/whatsapp.mjs.map +1 -1
  189. package/resources/x402/credit-account/credit-account.d.mts +226 -0
  190. package/resources/x402/credit-account/credit-account.d.mts.map +1 -0
  191. package/resources/x402/credit-account/credit-account.d.ts +226 -0
  192. package/resources/x402/credit-account/credit-account.d.ts.map +1 -0
  193. package/resources/x402/credit-account/credit-account.js +66 -0
  194. package/resources/x402/credit-account/credit-account.js.map +1 -0
  195. package/resources/x402/credit-account/credit-account.mjs +61 -0
  196. package/resources/x402/credit-account/credit-account.mjs.map +1 -0
  197. package/resources/x402/credit-account/index.d.mts +3 -0
  198. package/resources/x402/credit-account/index.d.mts.map +1 -0
  199. package/resources/x402/credit-account/index.d.ts +3 -0
  200. package/resources/x402/credit-account/index.d.ts.map +1 -0
  201. package/resources/x402/credit-account/index.js +9 -0
  202. package/resources/x402/credit-account/index.js.map +1 -0
  203. package/resources/x402/credit-account/index.mjs +4 -0
  204. package/resources/x402/credit-account/index.mjs.map +1 -0
  205. package/resources/x402/credit-account/payments.d.mts +90 -0
  206. package/resources/x402/credit-account/payments.d.mts.map +1 -0
  207. package/resources/x402/credit-account/payments.d.ts +90 -0
  208. package/resources/x402/credit-account/payments.d.ts.map +1 -0
  209. package/resources/x402/credit-account/payments.js +47 -0
  210. package/resources/x402/credit-account/payments.js.map +1 -0
  211. package/resources/x402/credit-account/payments.mjs +43 -0
  212. package/resources/x402/credit-account/payments.mjs.map +1 -0
  213. package/resources/x402/credit-account.d.mts +1 -221
  214. package/resources/x402/credit-account.d.mts.map +1 -1
  215. package/resources/x402/credit-account.d.ts +1 -221
  216. package/resources/x402/credit-account.d.ts.map +1 -1
  217. package/resources/x402/credit-account.js +2 -54
  218. package/resources/x402/credit-account.js.map +1 -1
  219. package/resources/x402/credit-account.mjs +1 -52
  220. package/resources/x402/credit-account.mjs.map +1 -1
  221. package/resources/x402/index.d.mts +1 -1
  222. package/resources/x402/index.d.mts.map +1 -1
  223. package/resources/x402/index.d.ts +1 -1
  224. package/resources/x402/index.d.ts.map +1 -1
  225. package/resources/x402/index.js +2 -2
  226. package/resources/x402/index.js.map +1 -1
  227. package/resources/x402/index.mjs +1 -1
  228. package/resources/x402/index.mjs.map +1 -1
  229. package/resources/x402/x402.d.mts +2 -2
  230. package/resources/x402/x402.d.mts.map +1 -1
  231. package/resources/x402/x402.d.ts +2 -2
  232. package/resources/x402/x402.d.ts.map +1 -1
  233. package/resources/x402/x402.js +2 -2
  234. package/resources/x402/x402.js.map +1 -1
  235. package/resources/x402/x402.mjs +2 -2
  236. package/resources/x402/x402.mjs.map +1 -1
  237. package/src/client.ts +15 -2
  238. package/src/resources/ai/ai.ts +2 -0
  239. package/src/resources/ai/anthropic/v1.ts +18 -0
  240. package/src/resources/ai/assistants/assistants.ts +173 -0
  241. package/src/resources/ai/assistants/index.ts +1 -0
  242. package/src/resources/ai/assistants/versions.ts +27 -0
  243. package/src/resources/ai/chat.ts +87 -23
  244. package/src/resources/ai/index.ts +1 -0
  245. package/src/resources/ai/openai/chat.ts +87 -23
  246. package/src/resources/ai/openai/openai.ts +18 -0
  247. package/src/resources/compute/compute.ts +37 -0
  248. package/src/resources/compute/funcs.ts +298 -0
  249. package/src/resources/compute/index.ts +15 -0
  250. package/src/resources/compute.ts +3 -0
  251. package/src/resources/credential-connections/credential-connections.ts +4 -1
  252. package/src/resources/email-inboxes/drafts.ts +8 -0
  253. package/src/resources/email-messages/email-messages.ts +7 -2
  254. package/src/resources/fqdn-connections/fqdn-authentication.ts +4 -1
  255. package/src/resources/fqdn-connections/fqdn-connections.ts +4 -1
  256. package/src/resources/index.ts +6 -1
  257. package/src/resources/messages/messages.ts +89 -6
  258. package/src/resources/messaging-profiles/actions.ts +1 -1
  259. package/src/resources/messaging-profiles/index.ts +3 -1
  260. package/src/resources/messaging-profiles/messaging-profiles.ts +222 -9
  261. package/src/resources/uac-connections/uac-connections.ts +9 -2
  262. package/src/resources/webhooks.ts +177 -2
  263. package/src/resources/whatsapp/business-accounts/phone-numbers.ts +52 -0
  264. package/src/resources/whatsapp/index.ts +1 -0
  265. package/src/resources/whatsapp/phone-numbers/index.ts +1 -0
  266. package/src/resources/whatsapp/phone-numbers/phone-numbers.ts +222 -0
  267. package/src/resources/whatsapp/whatsapp.ts +2 -0
  268. package/src/resources/x402/credit-account/credit-account.ts +312 -0
  269. package/src/resources/x402/credit-account/index.ts +16 -0
  270. package/src/resources/x402/credit-account/payments.ts +126 -0
  271. package/src/resources/x402/credit-account.ts +1 -290
  272. package/src/resources/x402/index.ts +1 -1
  273. package/src/resources/x402/x402.ts +2 -2
  274. package/src/version.ts +1 -1
  275. package/version.d.mts +1 -1
  276. package/version.d.ts +1 -1
  277. package/version.js +1 -1
  278. package/version.mjs +1 -1
@@ -47,21 +47,6 @@ export interface ChatCompletionRequest {
47
47
  * Higher values will penalize the model from repeating the same output tokens.
48
48
  */
49
49
  frequency_penalty?: number;
50
- /**
51
- * If specified, the output will be exactly one of the choices.
52
- */
53
- guided_choice?: Array<string>;
54
- /**
55
- * Must be a valid JSON schema. If specified, the output will follow the JSON
56
- * schema.
57
- */
58
- guided_json?: {
59
- [key: string]: unknown;
60
- };
61
- /**
62
- * If specified, the output will follow the regex pattern.
63
- */
64
- guided_regex?: string;
65
50
  /**
66
51
  * This is used with `use_beam_search` to prefer shorter or longer completions.
67
52
  */
@@ -82,6 +67,14 @@ export interface ChatCompletionRequest {
82
67
  * in [0, 1].
83
68
  */
84
69
  min_p?: number;
70
+ /**
71
+ * How strictly `region` is applied. `preferred` (the default when `region` is set)
72
+ * tries that region first and falls back to another when the model cannot be
73
+ * served there, so a request that would have succeeded still succeeds. `strict`
74
+ * pins the request: it is served from that region or it fails with a 422, never
75
+ * redirected to another region. Requires `region`.
76
+ */
77
+ mode?: 'preferred' | 'strict';
85
78
  /**
86
79
  * The language model to chat with.
87
80
  */
@@ -103,10 +96,20 @@ export interface ChatCompletionRequest {
103
96
  */
104
97
  reasoning_effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
105
98
  /**
106
- * Use this is you want to guarantee a JSON output without defining a schema. For
107
- * control over the schema, use `guided_json`.
99
+ * Optional data-residency region the request should be served from, using the same
100
+ * vocabulary as your account's Data Locality setting. Behavior depends on `mode`.
101
+ * Supported for Telnyx-hosted models only: a request routed to an external
102
+ * provider never passes through Telnyx model routing, so a region cannot be
103
+ * enforced for it. Omit for today's latency-based routing.
108
104
  */
109
- response_format?: ChatCompletionRequest.ResponseFormat;
105
+ region?: 'USA' | 'EU' | 'AUS' | 'UAE';
106
+ /**
107
+ * Controls the format of the model output. `json_object` guarantees valid JSON
108
+ * output without defining a schema; `json_schema` constrains the output to the
109
+ * JSON schema you supply via the `json_schema` property and is the supported way
110
+ * to get guaranteed structured output on Telnyx-hosted models.
111
+ */
112
+ response_format?: ChatCompletionRequest.ResponseFormatText | ChatCompletionRequest.ResponseFormatJsonObject | ChatCompletionRequest.ResponseFormatJsonSchemaParam;
110
113
  /**
111
114
  * If specified, the system will make a best effort to sample deterministically,
112
115
  * such that repeated requests with the same `seed` and parameters should return
@@ -174,11 +177,63 @@ export declare namespace ChatCompletionRequest {
174
177
  }
175
178
  }
176
179
  /**
177
- * Use this is you want to guarantee a JSON output without defining a schema. For
178
- * control over the schema, use `guided_json`.
180
+ * Plain text output.
181
+ */
182
+ interface ResponseFormatText {
183
+ type: 'text';
184
+ }
185
+ /**
186
+ * JSON mode: the model output is valid JSON, without a schema.
187
+ */
188
+ interface ResponseFormatJsonObject {
189
+ type: 'json_object';
190
+ }
191
+ /**
192
+ * Structured output: the model output is constrained to the JSON schema supplied
193
+ * in `json_schema`.
179
194
  */
180
- interface ResponseFormat {
181
- type: 'text' | 'json_object';
195
+ interface ResponseFormatJsonSchemaParam {
196
+ /**
197
+ * The JSON schema configuration, required when `type` is `json_schema`. Matches
198
+ * the
199
+ * [OpenAI structured outputs](https://platform.openai.com/docs/guides/structured-outputs)
200
+ * `json_schema` response format.
201
+ */
202
+ json_schema: ResponseFormatJsonSchemaParam.JsonSchema;
203
+ type: 'json_schema';
204
+ }
205
+ namespace ResponseFormatJsonSchemaParam {
206
+ /**
207
+ * The JSON schema configuration, required when `type` is `json_schema`. Matches
208
+ * the
209
+ * [OpenAI structured outputs](https://platform.openai.com/docs/guides/structured-outputs)
210
+ * `json_schema` response format.
211
+ */
212
+ interface JsonSchema {
213
+ /**
214
+ * The name of the response format. Used for clarity only.
215
+ */
216
+ name: string;
217
+ /**
218
+ * A description of what the response format is for, typically used to guide the
219
+ * model.
220
+ */
221
+ description?: string;
222
+ /**
223
+ * The JSON schema the model output must conform to. A valid
224
+ * [JSON Schema](https://json-schema.org) object, e.g. a Pydantic
225
+ * `model_json_schema()` export.
226
+ */
227
+ schema?: {
228
+ [key: string]: unknown;
229
+ };
230
+ /**
231
+ * Enables strict schema adherence when supported by the model. If the generated
232
+ * output does not match the provided schema, the request fails instead of
233
+ * returning non-conformant output.
234
+ */
235
+ strict?: boolean;
236
+ }
182
237
  }
183
238
  interface Function {
184
239
  function: Function.Function;
@@ -1 +1 @@
1
- {"version":3,"file":"chat.d.mts","sourceRoot":"","sources":["../../src/resources/ai/chat.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,OAAO,mBAAe;AAElC,qBAAa,IAAK,SAAQ,WAAW;CAAG;AAExC,MAAM,WAAW,SAAS;IACxB;;;;OAIG;IACH,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE1B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC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AE,KAAK,qBAAqB,IAAI,qBAAqB,EAAE,CAAC;CAC7F"}
@@ -47,21 +47,6 @@ export interface ChatCompletionRequest {
47
47
  * Higher values will penalize the model from repeating the same output tokens.
48
48
  */
49
49
  frequency_penalty?: number;
50
- /**
51
- * If specified, the output will be exactly one of the choices.
52
- */
53
- guided_choice?: Array<string>;
54
- /**
55
- * Must be a valid JSON schema. If specified, the output will follow the JSON
56
- * schema.
57
- */
58
- guided_json?: {
59
- [key: string]: unknown;
60
- };
61
- /**
62
- * If specified, the output will follow the regex pattern.
63
- */
64
- guided_regex?: string;
65
50
  /**
66
51
  * This is used with `use_beam_search` to prefer shorter or longer completions.
67
52
  */
@@ -82,6 +67,14 @@ export interface ChatCompletionRequest {
82
67
  * in [0, 1].
83
68
  */
84
69
  min_p?: number;
70
+ /**
71
+ * How strictly `region` is applied. `preferred` (the default when `region` is set)
72
+ * tries that region first and falls back to another when the model cannot be
73
+ * served there, so a request that would have succeeded still succeeds. `strict`
74
+ * pins the request: it is served from that region or it fails with a 422, never
75
+ * redirected to another region. Requires `region`.
76
+ */
77
+ mode?: 'preferred' | 'strict';
85
78
  /**
86
79
  * The language model to chat with.
87
80
  */
@@ -103,10 +96,20 @@ export interface ChatCompletionRequest {
103
96
  */
104
97
  reasoning_effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
105
98
  /**
106
- * Use this is you want to guarantee a JSON output without defining a schema. For
107
- * control over the schema, use `guided_json`.
99
+ * Optional data-residency region the request should be served from, using the same
100
+ * vocabulary as your account's Data Locality setting. Behavior depends on `mode`.
101
+ * Supported for Telnyx-hosted models only: a request routed to an external
102
+ * provider never passes through Telnyx model routing, so a region cannot be
103
+ * enforced for it. Omit for today's latency-based routing.
108
104
  */
109
- response_format?: ChatCompletionRequest.ResponseFormat;
105
+ region?: 'USA' | 'EU' | 'AUS' | 'UAE';
106
+ /**
107
+ * Controls the format of the model output. `json_object` guarantees valid JSON
108
+ * output without defining a schema; `json_schema` constrains the output to the
109
+ * JSON schema you supply via the `json_schema` property and is the supported way
110
+ * to get guaranteed structured output on Telnyx-hosted models.
111
+ */
112
+ response_format?: ChatCompletionRequest.ResponseFormatText | ChatCompletionRequest.ResponseFormatJsonObject | ChatCompletionRequest.ResponseFormatJsonSchemaParam;
110
113
  /**
111
114
  * If specified, the system will make a best effort to sample deterministically,
112
115
  * such that repeated requests with the same `seed` and parameters should return
@@ -174,11 +177,63 @@ export declare namespace ChatCompletionRequest {
174
177
  }
175
178
  }
176
179
  /**
177
- * Use this is you want to guarantee a JSON output without defining a schema. For
178
- * control over the schema, use `guided_json`.
180
+ * Plain text output.
181
+ */
182
+ interface ResponseFormatText {
183
+ type: 'text';
184
+ }
185
+ /**
186
+ * JSON mode: the model output is valid JSON, without a schema.
187
+ */
188
+ interface ResponseFormatJsonObject {
189
+ type: 'json_object';
190
+ }
191
+ /**
192
+ * Structured output: the model output is constrained to the JSON schema supplied
193
+ * in `json_schema`.
179
194
  */
180
- interface ResponseFormat {
181
- type: 'text' | 'json_object';
195
+ interface ResponseFormatJsonSchemaParam {
196
+ /**
197
+ * The JSON schema configuration, required when `type` is `json_schema`. Matches
198
+ * the
199
+ * [OpenAI structured outputs](https://platform.openai.com/docs/guides/structured-outputs)
200
+ * `json_schema` response format.
201
+ */
202
+ json_schema: ResponseFormatJsonSchemaParam.JsonSchema;
203
+ type: 'json_schema';
204
+ }
205
+ namespace ResponseFormatJsonSchemaParam {
206
+ /**
207
+ * The JSON schema configuration, required when `type` is `json_schema`. Matches
208
+ * the
209
+ * [OpenAI structured outputs](https://platform.openai.com/docs/guides/structured-outputs)
210
+ * `json_schema` response format.
211
+ */
212
+ interface JsonSchema {
213
+ /**
214
+ * The name of the response format. Used for clarity only.
215
+ */
216
+ name: string;
217
+ /**
218
+ * A description of what the response format is for, typically used to guide the
219
+ * model.
220
+ */
221
+ description?: string;
222
+ /**
223
+ * The JSON schema the model output must conform to. A valid
224
+ * [JSON Schema](https://json-schema.org) object, e.g. a Pydantic
225
+ * `model_json_schema()` export.
226
+ */
227
+ schema?: {
228
+ [key: string]: unknown;
229
+ };
230
+ /**
231
+ * Enables strict schema adherence when supported by the model. If the generated
232
+ * output does not match the provided schema, the request fails instead of
233
+ * returning non-conformant output.
234
+ */
235
+ strict?: boolean;
236
+ }
182
237
  }
183
238
  interface Function {
184
239
  function: Function.Function;
@@ -1 +1 @@
1
- {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../src/resources/ai/chat.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,OAAO,kBAAe;AAElC,qBAAa,IAAK,SAAQ,WAAW;CAAG;AAExC,MAAM,WAAW,SAAS;IACxB;;;;OAIG;IACH,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE1B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAE/C;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE9B;;;OAGG;IACH,WAAW,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAEzC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,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,CAAC;YAErB;;;;eAIG;YACH,MAAM,CAAC,EAAE;gBAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;aAAE,CAAC;YAEpC;;;;eAIG;YACH,MAAM,CAAC,EAAE,OAAO,CAAC;SAClB;KACF;IAED,UAAiB,QAAQ;QACvB,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC;QAE5B,IAAI,EAAE,UAAU,CAAC;KAClB;IAED,UAAiB,QAAQ,CAAC;QACxB,UAAiB,QAAQ;YACvB,IAAI,EAAE,MAAM,CAAC;YAEb,WAAW,CAAC,EAAE,MAAM,CAAC;YAErB,UAAU,CAAC,EAAE;gBAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;aAAE,CAAC;SACzC;KACF;IAED,UAAiB,SAAS;QACxB,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC;QAE7B,IAAI,EAAE,WAAW,CAAC;KACnB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EAAE,KAAK,SAAS,IAAI,SAAS,EAAE,KAAK,qBAAqB,IAAI,qBAAqB,EAAE,CAAC;CAC7F"}
@@ -1,6 +1,6 @@
1
1
  export { AI, type ModelMetadata, type ModelsResponse, type AIRetrieveConversationHistoriesResponse, type AISummarizeResponse, type AISummarizeParams, type AIRetrieveConversationHistoriesParams, type AIRetrieveConversationHistoriesResponsesDefaultFlatPagination, } from "./ai.mjs";
2
2
  export { Anthropic } from "./anthropic/index.mjs";
3
- export { Assistants, type ArithmeticExpression, type Assistant, type AssistantIntegration, type AssistantMcpServer, type AssistantTool, type AssistantsList, type AudioVisualizerConfig, type AuthenticationMethod, type BooleanOpExpression, type ComparisonExpression, type ConversationFlow, type ConversationFlowReq, type EnabledFeatures, type Expression, type ExternalLlm, type ExternalLlmReq, type FallbackConfig, type FallbackConfigReq, type FlowEdge, type FlowNode, type FlowNodeReq, type HangupTool, type HangupToolParams, type ImportMetadata, type InferenceEmbedding, type InferenceEmbeddingInterruptionSettings, type InferenceEmbeddingWebhookToolParams, type InsightSettings, type MessagingSettings, type NodePosition, type Observability, type ObservabilityReq, type ObservabilityStatus, type PostConversationSettings, type PostConversationSettingsReq, type PrivacySettings, type PromptSyncStatus, type RetrievalTool, type SpeakNode, type SpeakNodeReq, type StartSpeakingPlan, type TelephonySettings, type ToolNode, type ToolNodeReq, type TranscriptionEndpointingPlan, type TranscriptionSettings, type TranscriptionSettingsConfig, type TransferTool, type VoiceSettings, type WebhookTool, type WidgetSettings, type AssistantDeleteResponse, type AssistantChatResponse, type AssistantGetTexmlResponse, type AssistantSendSMSResponse, type AssistantCreateParams, type AssistantImportsParams, type AssistantRetrieveParams, type AssistantUpdateParams, type AssistantChatParams, type AssistantCloneParams, type AssistantSendSMSParams, } from "./assistants/index.mjs";
3
+ export { Assistants, type ArithmeticExpression, type Assistant, type AssistantA2AAgent, type AssistantIntegration, type AssistantMcpServer, type AssistantTool, type AssistantsList, type AudioVisualizerConfig, type AuthenticationMethod, type BooleanOpExpression, type ComparisonExpression, type ConversationFlow, type ConversationFlowReq, type EnabledFeatures, type Expression, type ExternalLlm, type ExternalLlmReq, type FallbackConfig, type FallbackConfigReq, type FlowEdge, type FlowNode, type FlowNodeReq, type HangupTool, type HangupToolParams, type ImportMetadata, type InferenceEmbedding, type InferenceEmbeddingInterruptionSettings, type InferenceEmbeddingWebhookToolParams, type InsightSettings, type MessagingSettings, type NodePosition, type Observability, type ObservabilityReq, type ObservabilityStatus, type PostConversationSettings, type PostConversationSettingsReq, type PrivacySettings, type PromptSyncStatus, type RetrievalTool, type SpeakNode, type SpeakNodeReq, type StartSpeakingPlan, type TelephonySettings, type ToolNode, type ToolNodeReq, type TranscriptionEndpointingPlan, type TranscriptionSettings, type TranscriptionSettingsConfig, type TransferTool, type VoiceSettings, type WebhookTool, type WidgetSettings, type AssistantDeleteResponse, type AssistantChatResponse, type AssistantGetTexmlResponse, type AssistantSendSMSResponse, type AssistantCreateParams, type AssistantImportsParams, type AssistantRetrieveParams, type AssistantUpdateParams, type AssistantChatParams, type AssistantCloneParams, type AssistantSendSMSParams, } from "./assistants/index.mjs";
4
4
  export { Audio, type AudioTranscribeResponse, type AudioTranscribeParams } from "./audio.mjs";
5
5
  export { Chat, type BucketIDs, type ChatCompletionRequest } from "./chat.mjs";
6
6
  export { Clusters, type RecursiveCluster, type ClusterRetrieveResponse, type ClusterListResponse, type ClusterComputeResponse, type ClusterListParams, type ClusterComputeParams, type ClusterRetrieveParams, type ClusterFetchGraphParams, type ClusterListResponsesDefaultFlatPagination, } from "./clusters.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/ai/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,EAAE,EACF,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,uCAAuC,EAC5C,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,qCAAqC,EAC1C,KAAK,6DAA6D,GACnE,iBAAa;AACd,OAAO,EAAE,SAAS,EAAE,8BAA0B;AAC9C,OAAO,EACL,UAAU,EACV,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACd,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,sCAAsC,EAC3C,KAAK,mCAAmC,EACxC,KAAK,eAAe,EACpB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K,wCAAwC,GAC9C,oBAAgB"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/ai/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,EAAE,EACF,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,uCAAuC,EAC5C,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,qCAAqC,EAC1C,KAAK,6DAA6D,GACnE,iBAAa;AACd,OAAO,EAAE,SAAS,EAAE,8BAA0B;AAC9C,OAAO,EACL,UAAU,EACV,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,sCAAsC,EAC3C,KAAK,mCAAmC,EACxC,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EAChC,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,4BAA4B,EACjC,K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EAC1B,KAAK,iCAAiC,EACtC,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,+BAA+B,EACpC,KAAK,kBAAkB,GACxB,+BAA2B;AAC5B,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,YAAY,EAAE,KAAK,WAAW,EAAE,KAAK,uBAAuB,EAAE,iCAA6B;AACpG,OAAO,EAAE,SAAS,EAAE,8BAA0B;AAC9C,OAAO,EACL,UAAU,EACV,KAAK,SAAS,EACd,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,4CAA4C,GAClD,0BAAsB;AACvB,OAAO,EACL,QAAQ,EACR,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,2BAA2B,EAChC,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,gCAAgC,GACtC,6BAAyB;AAC1B,OAAO,EAAE,MAAM,EAAE,KAAK,4BAA4B,EAAE,KAAK,0BAA0B,EAAE,2BAAuB;AAC5G,OAAO,EACL,KAAK,EACL,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,gCAAgC,EACrC,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,wCAAwC,GAC9C,oBAAgB"}
@@ -1,6 +1,6 @@
1
1
  export { AI, type ModelMetadata, type ModelsResponse, type AIRetrieveConversationHistoriesResponse, type AISummarizeResponse, type AISummarizeParams, type AIRetrieveConversationHistoriesParams, type AIRetrieveConversationHistoriesResponsesDefaultFlatPagination, } from "./ai.js";
2
2
  export { Anthropic } from "./anthropic/index.js";
3
- export { Assistants, type ArithmeticExpression, type Assistant, type AssistantIntegration, type AssistantMcpServer, type AssistantTool, type AssistantsList, type AudioVisualizerConfig, type AuthenticationMethod, type BooleanOpExpression, type ComparisonExpression, type ConversationFlow, type ConversationFlowReq, type EnabledFeatures, type Expression, type ExternalLlm, type ExternalLlmReq, type FallbackConfig, type FallbackConfigReq, type FlowEdge, type FlowNode, type FlowNodeReq, type HangupTool, type HangupToolParams, type ImportMetadata, type InferenceEmbedding, type InferenceEmbeddingInterruptionSettings, type InferenceEmbeddingWebhookToolParams, type InsightSettings, type MessagingSettings, type NodePosition, type Observability, type ObservabilityReq, type ObservabilityStatus, type PostConversationSettings, type PostConversationSettingsReq, type PrivacySettings, type PromptSyncStatus, type RetrievalTool, type SpeakNode, type SpeakNodeReq, type StartSpeakingPlan, type TelephonySettings, type ToolNode, type ToolNodeReq, type TranscriptionEndpointingPlan, type TranscriptionSettings, type TranscriptionSettingsConfig, type TransferTool, type VoiceSettings, type WebhookTool, type WidgetSettings, type AssistantDeleteResponse, type AssistantChatResponse, type AssistantGetTexmlResponse, type AssistantSendSMSResponse, type AssistantCreateParams, type AssistantImportsParams, type AssistantRetrieveParams, type AssistantUpdateParams, type AssistantChatParams, type AssistantCloneParams, type AssistantSendSMSParams, } from "./assistants/index.js";
3
+ export { Assistants, type ArithmeticExpression, type Assistant, type AssistantA2AAgent, type AssistantIntegration, type AssistantMcpServer, type AssistantTool, type AssistantsList, type AudioVisualizerConfig, type AuthenticationMethod, type BooleanOpExpression, type ComparisonExpression, type ConversationFlow, type ConversationFlowReq, type EnabledFeatures, type Expression, type ExternalLlm, type ExternalLlmReq, type FallbackConfig, type FallbackConfigReq, type FlowEdge, type FlowNode, type FlowNodeReq, type HangupTool, type HangupToolParams, type ImportMetadata, type InferenceEmbedding, type InferenceEmbeddingInterruptionSettings, type InferenceEmbeddingWebhookToolParams, type InsightSettings, type MessagingSettings, type NodePosition, type Observability, type ObservabilityReq, type ObservabilityStatus, type PostConversationSettings, type PostConversationSettingsReq, type PrivacySettings, type PromptSyncStatus, type RetrievalTool, type SpeakNode, type SpeakNodeReq, type StartSpeakingPlan, type TelephonySettings, type ToolNode, type ToolNodeReq, type TranscriptionEndpointingPlan, type TranscriptionSettings, type TranscriptionSettingsConfig, type TransferTool, type VoiceSettings, type WebhookTool, type WidgetSettings, type AssistantDeleteResponse, type AssistantChatResponse, type AssistantGetTexmlResponse, type AssistantSendSMSResponse, type AssistantCreateParams, type AssistantImportsParams, type AssistantRetrieveParams, type AssistantUpdateParams, type AssistantChatParams, type AssistantCloneParams, type AssistantSendSMSParams, } from "./assistants/index.js";
4
4
  export { Audio, type AudioTranscribeResponse, type AudioTranscribeParams } from "./audio.js";
5
5
  export { Chat, type BucketIDs, type ChatCompletionRequest } from "./chat.js";
6
6
  export { Clusters, type RecursiveCluster, type ClusterRetrieveResponse, type ClusterListResponse, type ClusterComputeResponse, type ClusterListParams, type ClusterComputeParams, type ClusterRetrieveParams, type ClusterFetchGraphParams, type ClusterListResponsesDefaultFlatPagination, } from "./clusters.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/ai/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,EAAE,EACF,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,uCAAuC,EAC5C,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,qCAAqC,EAC1C,KAAK,6DAA6D,GACnE,gBAAa;AACd,OAAO,EAAE,SAAS,EAAE,6BAA0B;AAC9C,OAAO,EACL,UAAU,EACV,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACd,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB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A0B,EAAE,0BAAuB;AAC5G,OAAO,EACL,KAAK,EACL,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,gCAAgC,EACrC,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,wCAAwC,GAC9C,mBAAgB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/ai/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,EAAE,EACF,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,uCAAuC,EAC5C,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,qCAAqC,EAC1C,KAAK,6DAA6D,GACnE,gBAAa;AACd,OAAO,EAAE,SAAS,EAAE,6BAA0B;AAC9C,OAAO,EACL,UAAU,EACV,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,sCAAsC,EAC3C,KAAK,mCAAmC,EACxC,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EAChC,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OuB;AANrB,yGAAA,UAAU,OAAA;AAOZ,6CAY0B;AAXxB,iGAAA,QAAQ,OAAA;AAYV,4CAA4G;AAAnG,gGAAA,MAAM,OAAA;AACf,oCAUiB;AATf,8FAAA,KAAK,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/ai/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EACL,EAAE,GAQH,iBAAa;AACd,OAAO,EAAE,SAAS,EAAE,8BAA0B;AAC9C,OAAO,EACL,UAAU,GA+DX,+BAA2B;AAC5B,OAAO,EAAE,KAAK,EAA4D,oBAAgB;AAC1F,OAAO,EAAE,IAAI,EAA8C,mBAAe;AAC1E,OAAO,EACL,QAAQ,GAUT,uBAAmB;AACpB,OAAO,EACL,WAAW,GAOZ,gCAA4B;AAC7B,OAAO,EACL,aAAa,GAUd,kCAA8B;AAC/B,OAAO,EACL,UAAU,GAUX,+BAA2B;AAC5B,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,YAAY,EAAkD,iCAA6B;AACpG,OAAO,EAAE,SAAS,EAAE,8BAA0B;AAC9C,OAAO,EACL,UAAU,GAMX,0BAAsB;AACvB,OAAO,EACL,QAAQ,GAWT,6BAAyB;AAC1B,OAAO,EAAE,MAAM,EAAsE,2BAAuB;AAC5G,OAAO,EACL,KAAK,GASN,oBAAgB"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/ai/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EACL,EAAE,GAQH,iBAAa;AACd,OAAO,EAAE,SAAS,EAAE,8BAA0B;AAC9C,OAAO,EACL,UAAU,GAgEX,+BAA2B;AAC5B,OAAO,EAAE,KAAK,EAA4D,oBAAgB;AAC1F,OAAO,EAAE,IAAI,EAA8C,mBAAe;AAC1E,OAAO,EACL,QAAQ,GAUT,uBAAmB;AACpB,OAAO,EACL,WAAW,GAOZ,gCAA4B;AAC7B,OAAO,EACL,aAAa,GAUd,kCAA8B;AAC/B,OAAO,EACL,UAAU,GAUX,+BAA2B;AAC5B,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,YAAY,EAAkD,iCAA6B;AACpG,OAAO,EAAE,SAAS,EAAE,8BAA0B;AAC9C,OAAO,EACL,UAAU,GAMX,0BAAsB;AACvB,OAAO,EACL,QAAQ,GAWT,6BAAyB;AAC1B,OAAO,EAAE,MAAM,EAAsE,2BAAuB;AAC5G,OAAO,EACL,KAAK,GASN,oBAAgB"}
@@ -61,21 +61,6 @@ export interface ChatCreateCompletionParams {
61
61
  * Higher values will penalize the model from repeating the same output tokens.
62
62
  */
63
63
  frequency_penalty?: number;
64
- /**
65
- * If specified, the output will be exactly one of the choices.
66
- */
67
- guided_choice?: Array<string>;
68
- /**
69
- * Must be a valid JSON schema. If specified, the output will follow the JSON
70
- * schema.
71
- */
72
- guided_json?: {
73
- [key: string]: unknown;
74
- };
75
- /**
76
- * If specified, the output will follow the regex pattern.
77
- */
78
- guided_regex?: string;
79
64
  /**
80
65
  * This is used with `use_beam_search` to prefer shorter or longer completions.
81
66
  */
@@ -96,6 +81,14 @@ export interface ChatCreateCompletionParams {
96
81
  * in [0, 1].
97
82
  */
98
83
  min_p?: number;
84
+ /**
85
+ * How strictly `region` is applied. `preferred` (the default when `region` is set)
86
+ * tries that region first and falls back to another when the model cannot be
87
+ * served there, so a request that would have succeeded still succeeds. `strict`
88
+ * pins the request: it is served from that region or it fails with a 422, never
89
+ * redirected to another region. Requires `region`.
90
+ */
91
+ mode?: 'preferred' | 'strict';
99
92
  /**
100
93
  * The language model to chat with.
101
94
  */
@@ -117,10 +110,20 @@ export interface ChatCreateCompletionParams {
117
110
  */
118
111
  reasoning_effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
119
112
  /**
120
- * Use this is you want to guarantee a JSON output without defining a schema. For
121
- * control over the schema, use `guided_json`.
113
+ * Optional data-residency region the request should be served from, using the same
114
+ * vocabulary as your account's Data Locality setting. Behavior depends on `mode`.
115
+ * Supported for Telnyx-hosted models only: a request routed to an external
116
+ * provider never passes through Telnyx model routing, so a region cannot be
117
+ * enforced for it. Omit for today's latency-based routing.
122
118
  */
123
- response_format?: ChatCreateCompletionParams.ResponseFormat;
119
+ region?: 'USA' | 'EU' | 'AUS' | 'UAE';
120
+ /**
121
+ * Controls the format of the model output. `json_object` guarantees valid JSON
122
+ * output without defining a schema; `json_schema` constrains the output to the
123
+ * JSON schema you supply via the `json_schema` property and is the supported way
124
+ * to get guaranteed structured output on Telnyx-hosted models.
125
+ */
126
+ response_format?: ChatCreateCompletionParams.ResponseFormatText | ChatCreateCompletionParams.ResponseFormatJsonObject | ChatCreateCompletionParams.ResponseFormatJsonSchemaParam;
124
127
  /**
125
128
  * If specified, the system will make a best effort to sample deterministically,
126
129
  * such that repeated requests with the same `seed` and parameters should return
@@ -188,11 +191,63 @@ export declare namespace ChatCreateCompletionParams {
188
191
  }
189
192
  }
190
193
  /**
191
- * Use this is you want to guarantee a JSON output without defining a schema. For
192
- * control over the schema, use `guided_json`.
194
+ * Plain text output.
195
+ */
196
+ interface ResponseFormatText {
197
+ type: 'text';
198
+ }
199
+ /**
200
+ * JSON mode: the model output is valid JSON, without a schema.
201
+ */
202
+ interface ResponseFormatJsonObject {
203
+ type: 'json_object';
204
+ }
205
+ /**
206
+ * Structured output: the model output is constrained to the JSON schema supplied
207
+ * in `json_schema`.
193
208
  */
194
- interface ResponseFormat {
195
- type: 'text' | 'json_object';
209
+ interface ResponseFormatJsonSchemaParam {
210
+ /**
211
+ * The JSON schema configuration, required when `type` is `json_schema`. Matches
212
+ * the
213
+ * [OpenAI structured outputs](https://platform.openai.com/docs/guides/structured-outputs)
214
+ * `json_schema` response format.
215
+ */
216
+ json_schema: ResponseFormatJsonSchemaParam.JsonSchema;
217
+ type: 'json_schema';
218
+ }
219
+ namespace ResponseFormatJsonSchemaParam {
220
+ /**
221
+ * The JSON schema configuration, required when `type` is `json_schema`. Matches
222
+ * the
223
+ * [OpenAI structured outputs](https://platform.openai.com/docs/guides/structured-outputs)
224
+ * `json_schema` response format.
225
+ */
226
+ interface JsonSchema {
227
+ /**
228
+ * The name of the response format. Used for clarity only.
229
+ */
230
+ name: string;
231
+ /**
232
+ * A description of what the response format is for, typically used to guide the
233
+ * model.
234
+ */
235
+ description?: string;
236
+ /**
237
+ * The JSON schema the model output must conform to. A valid
238
+ * [JSON Schema](https://json-schema.org) object, e.g. a Pydantic
239
+ * `model_json_schema()` export.
240
+ */
241
+ schema?: {
242
+ [key: string]: unknown;
243
+ };
244
+ /**
245
+ * Enables strict schema adherence when supported by the model. If the generated
246
+ * output does not match the provided schema, the request fails instead of
247
+ * returning non-conformant output.
248
+ */
249
+ strict?: boolean;
250
+ }
196
251
  }
197
252
  interface Function {
198
253
  function: Function.Function;
@@ -1 +1 @@
1
- {"version":3,"file":"chat.d.mts","sourceRoot":"","sources":["../../../src/resources/ai/openai/chat.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,KAAK,OAAO,oBAAgB;AACnC,OAAO,EAAE,UAAU,EAAE,sCAAkC;AACvD,OAAO,EAAE,cAAc,EAAE,8CAA0C;AAEnE,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,gBAAgB,CACd,IAAI,EAAE,0BAA0B,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;CAG5C;AAED,MAAM,MAAM,4BAA4B,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAC;AAEtE,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,0BAA0B,CAAC,OAAO,CAAC,CAAC;IAEpD;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAG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E,WAAW,CAAC;KACnB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
@@ -61,21 +61,6 @@ export interface ChatCreateCompletionParams {
61
61
  * Higher values will penalize the model from repeating the same output tokens.
62
62
  */
63
63
  frequency_penalty?: number;
64
- /**
65
- * If specified, the output will be exactly one of the choices.
66
- */
67
- guided_choice?: Array<string>;
68
- /**
69
- * Must be a valid JSON schema. If specified, the output will follow the JSON
70
- * schema.
71
- */
72
- guided_json?: {
73
- [key: string]: unknown;
74
- };
75
- /**
76
- * If specified, the output will follow the regex pattern.
77
- */
78
- guided_regex?: string;
79
64
  /**
80
65
  * This is used with `use_beam_search` to prefer shorter or longer completions.
81
66
  */
@@ -96,6 +81,14 @@ export interface ChatCreateCompletionParams {
96
81
  * in [0, 1].
97
82
  */
98
83
  min_p?: number;
84
+ /**
85
+ * How strictly `region` is applied. `preferred` (the default when `region` is set)
86
+ * tries that region first and falls back to another when the model cannot be
87
+ * served there, so a request that would have succeeded still succeeds. `strict`
88
+ * pins the request: it is served from that region or it fails with a 422, never
89
+ * redirected to another region. Requires `region`.
90
+ */
91
+ mode?: 'preferred' | 'strict';
99
92
  /**
100
93
  * The language model to chat with.
101
94
  */
@@ -117,10 +110,20 @@ export interface ChatCreateCompletionParams {
117
110
  */
118
111
  reasoning_effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
119
112
  /**
120
- * Use this is you want to guarantee a JSON output without defining a schema. For
121
- * control over the schema, use `guided_json`.
113
+ * Optional data-residency region the request should be served from, using the same
114
+ * vocabulary as your account's Data Locality setting. Behavior depends on `mode`.
115
+ * Supported for Telnyx-hosted models only: a request routed to an external
116
+ * provider never passes through Telnyx model routing, so a region cannot be
117
+ * enforced for it. Omit for today's latency-based routing.
122
118
  */
123
- response_format?: ChatCreateCompletionParams.ResponseFormat;
119
+ region?: 'USA' | 'EU' | 'AUS' | 'UAE';
120
+ /**
121
+ * Controls the format of the model output. `json_object` guarantees valid JSON
122
+ * output without defining a schema; `json_schema` constrains the output to the
123
+ * JSON schema you supply via the `json_schema` property and is the supported way
124
+ * to get guaranteed structured output on Telnyx-hosted models.
125
+ */
126
+ response_format?: ChatCreateCompletionParams.ResponseFormatText | ChatCreateCompletionParams.ResponseFormatJsonObject | ChatCreateCompletionParams.ResponseFormatJsonSchemaParam;
124
127
  /**
125
128
  * If specified, the system will make a best effort to sample deterministically,
126
129
  * such that repeated requests with the same `seed` and parameters should return
@@ -188,11 +191,63 @@ export declare namespace ChatCreateCompletionParams {
188
191
  }
189
192
  }
190
193
  /**
191
- * Use this is you want to guarantee a JSON output without defining a schema. For
192
- * control over the schema, use `guided_json`.
194
+ * Plain text output.
195
+ */
196
+ interface ResponseFormatText {
197
+ type: 'text';
198
+ }
199
+ /**
200
+ * JSON mode: the model output is valid JSON, without a schema.
201
+ */
202
+ interface ResponseFormatJsonObject {
203
+ type: 'json_object';
204
+ }
205
+ /**
206
+ * Structured output: the model output is constrained to the JSON schema supplied
207
+ * in `json_schema`.
193
208
  */
194
- interface ResponseFormat {
195
- type: 'text' | 'json_object';
209
+ interface ResponseFormatJsonSchemaParam {
210
+ /**
211
+ * The JSON schema configuration, required when `type` is `json_schema`. Matches
212
+ * the
213
+ * [OpenAI structured outputs](https://platform.openai.com/docs/guides/structured-outputs)
214
+ * `json_schema` response format.
215
+ */
216
+ json_schema: ResponseFormatJsonSchemaParam.JsonSchema;
217
+ type: 'json_schema';
218
+ }
219
+ namespace ResponseFormatJsonSchemaParam {
220
+ /**
221
+ * The JSON schema configuration, required when `type` is `json_schema`. Matches
222
+ * the
223
+ * [OpenAI structured outputs](https://platform.openai.com/docs/guides/structured-outputs)
224
+ * `json_schema` response format.
225
+ */
226
+ interface JsonSchema {
227
+ /**
228
+ * The name of the response format. Used for clarity only.
229
+ */
230
+ name: string;
231
+ /**
232
+ * A description of what the response format is for, typically used to guide the
233
+ * model.
234
+ */
235
+ description?: string;
236
+ /**
237
+ * The JSON schema the model output must conform to. A valid
238
+ * [JSON Schema](https://json-schema.org) object, e.g. a Pydantic
239
+ * `model_json_schema()` export.
240
+ */
241
+ schema?: {
242
+ [key: string]: unknown;
243
+ };
244
+ /**
245
+ * Enables strict schema adherence when supported by the model. If the generated
246
+ * output does not match the provided schema, the request fails instead of
247
+ * returning non-conformant output.
248
+ */
249
+ strict?: boolean;
250
+ }
196
251
  }
197
252
  interface Function {
198
253
  function: Function.Function;