telnyx 5.105.0 → 5.107.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 00c56398477600183f977eeff58815a2cc7aaa8c9698ff8f56b59b27590bdd35
4
- data.tar.gz: c2d9c2b3c47e12c4360a49835a7dcc46e68113a83b83d19ee2ae6ee27fc1b86e
3
+ metadata.gz: f3c87a35b668a36283032f0c210a8fba8309fef68279b1da8cacae27ffc24ac5
4
+ data.tar.gz: 83f8f6ed052588f6176a1048927c849b32d7bcc2d873b2d1c3fd2f56c79eb11e
5
5
  SHA512:
6
- metadata.gz: fce247576924b863af47b999bc829f893d9fd60dfc2678b6589eb6ae54f61ba447c1575516d324e8cdc2ff348bbb38be6e101ec74caa5f4d170f3b678d7d4a7d
7
- data.tar.gz: 5a26d164a5e24c72e4d6d83e18ad6a0339ee98d3e5c09379021a24203130c4e5267cdf308030271005e02e3f6465e6213a3d13bdcbb39b80e2bf660ba6d3702d
6
+ metadata.gz: 44551deecd8bd6ab9f8f01e31fac561955de7b73777e9ca38dff8733f3082eba03deb9a63c52e677f4cd5b9b0a57d5bdf21365a2c32710fcc4ae814a29b6e083
7
+ data.tar.gz: 4f4618cce72daeeb0a04c73b6c0bfe4e0d776fc922f0b270c6425624622e9c29c4e86bda12e59453e91a403d9cd653ebffd3b3df96bd6f84d10bf61308d5b449
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.107.0 (2026-05-11)
4
+
5
+ Full Changelog: [v5.106.0...v5.107.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.106.0...v5.107.0)
6
+
7
+ ### Features
8
+
9
+ * Responses endpoint ([a65d524](https://github.com/team-telnyx/telnyx-ruby/commit/a65d524c30c758a87dadc4009ec1e999e439590f))
10
+
11
+ ## 5.106.0 (2026-05-08)
12
+
13
+ Full Changelog: [v5.105.0...v5.106.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.105.0...v5.106.0)
14
+
15
+ ### Features
16
+
17
+ * AI-2294: document /ai/openai/models response and refresh LLM examples ([fe820e3](https://github.com/team-telnyx/telnyx-ruby/commit/fe820e34daed754d06fb23d9667442e154fe51c9))
18
+
3
19
  ## 5.105.0 (2026-05-08)
4
20
 
5
21
  Full Changelog: [v5.104.0...v5.105.0](https://github.com/team-telnyx/telnyx-ruby/compare/v5.104.0...v5.105.0)
data/README.md CHANGED
@@ -24,7 +24,7 @@ To use this gem, install via Bundler by adding the following to your application
24
24
  <!-- x-release-please-start-version -->
25
25
 
26
26
  ```ruby
27
- gem "telnyx", "~> 5.105.0"
27
+ gem "telnyx", "~> 5.107.0"
28
28
  ```
29
29
 
30
30
  <!-- x-release-please-end -->
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ module AI
6
+ # @see Telnyx::Resources::AI::OpenAI#create_response
7
+ class OpenAICreateResponseParams < Telnyx::Internal::Type::BaseModel
8
+ extend Telnyx::Internal::Type::RequestParameters::Converter
9
+ include Telnyx::Internal::Type::RequestParameters
10
+
11
+ # @!attribute body
12
+ #
13
+ # @return [Hash{Symbol=>Object}]
14
+ required :body, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
15
+
16
+ # @!method initialize(body:, request_options: {})
17
+ # @param body [Hash{Symbol=>Object}]
18
+ # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ module AI
6
+ # @type [Telnyx::Internal::Type::Converter]
7
+ OpenAICreateResponseResponse = Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ # @see Telnyx::Resources::AI#create_response
6
+ class AICreateResponseParams < Telnyx::Internal::Type::BaseModel
7
+ extend Telnyx::Internal::Type::RequestParameters::Converter
8
+ include Telnyx::Internal::Type::RequestParameters
9
+
10
+ # @!attribute body
11
+ #
12
+ # @return [Hash{Symbol=>Object}]
13
+ required :body, Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
14
+
15
+ # @!method initialize(body:, request_options: {})
16
+ # @param body [Hash{Symbol=>Object}]
17
+ # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}]
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Telnyx
4
+ module Models
5
+ # @type [Telnyx::Internal::Type::Converter]
6
+ AICreateResponseResponse = Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown]
7
+ end
8
+ end
@@ -4,30 +4,207 @@ module Telnyx
4
4
  module Models
5
5
  class ModelMetadata < Telnyx::Internal::Type::BaseModel
6
6
  # @!attribute id
7
+ # Model identifier. For open-source models, follows the
8
+ # `{organization}/{model_name}` convention from Hugging Face (e.g.
9
+ # `moonshotai/Kimi-K2.6`).
7
10
  #
8
11
  # @return [String]
9
12
  required :id, String
10
13
 
11
- # @!attribute created
14
+ # @!attribute context_length
15
+ # Maximum total tokens (prompt + completion) supported by the model in a single
16
+ # request.
12
17
  #
13
18
  # @return [Integer]
14
- required :created, Integer
19
+ required :context_length, Integer
20
+
21
+ # @!attribute created
22
+ # Timestamp at which the model was registered on Telnyx Inference (ISO 8601).
23
+ #
24
+ # @return [Time]
25
+ required :created, Time
26
+
27
+ # @!attribute languages
28
+ # ISO language codes the model supports (e.g. `en`, `es`).
29
+ #
30
+ # @return [Array<String>]
31
+ required :languages, Telnyx::Internal::Type::ArrayOf[String]
32
+
33
+ # @!attribute license
34
+ # License the model is distributed under, e.g. `Apache 2.0`, `MIT`,
35
+ # `Llama 3 Community License`.
36
+ #
37
+ # @return [String]
38
+ required :license, String
39
+
40
+ # @!attribute organization
41
+ # Organization that originally published the model, matching the prefix of `id`
42
+ # for open-source models.
43
+ #
44
+ # @return [String]
45
+ required :organization, String
15
46
 
16
47
  # @!attribute owned_by
48
+ # Owner of the model. `Telnyx` for Telnyx-hosted open-source models, the upstream
49
+ # provider name for proxied models, or the Telnyx organization id for fine-tuned
50
+ # models.
17
51
  #
18
52
  # @return [String]
19
53
  required :owned_by, String
20
54
 
55
+ # @!attribute parameters
56
+ # Total parameter count of the model.
57
+ #
58
+ # @return [Integer]
59
+ required :parameters, Integer
60
+
61
+ # @!attribute tier
62
+ # Billing tier the model belongs to. Used together with `pricing` to determine
63
+ # cost per 1M tokens.
64
+ #
65
+ # @return [Symbol, Telnyx::Models::ModelMetadata::Tier]
66
+ required :tier, enum: -> { Telnyx::ModelMetadata::Tier }
67
+
68
+ # @!attribute base_model
69
+ # Base model the fine-tuned model was trained from. Only set for fine-tuned
70
+ # models.
71
+ #
72
+ # @return [String, nil]
73
+ optional :base_model, String, nil?: true
74
+
75
+ # @!attribute description
76
+ # Short, human-readable summary of what the model is best suited for.
77
+ #
78
+ # @return [String, nil]
79
+ optional :description, String, nil?: true
80
+
81
+ # @!attribute is_fine_tunable
82
+ # Whether the model can be used as a base for a fine-tuning job via
83
+ # `POST /v2/ai/fine_tuning/jobs`.
84
+ #
85
+ # @return [Boolean, nil]
86
+ optional :is_fine_tunable, Telnyx::Internal::Type::Boolean
87
+
88
+ # @!attribute is_vision_supported
89
+ # Whether the model accepts image inputs in chat completions (multimodal vision
90
+ # support).
91
+ #
92
+ # @return [Boolean, nil]
93
+ optional :is_vision_supported, Telnyx::Internal::Type::Boolean
94
+
95
+ # @!attribute max_completion_tokens
96
+ # Maximum number of completion (output) tokens the model will generate per
97
+ # request. `null` if unconstrained beyond `context_length`.
98
+ #
99
+ # @return [Integer, nil]
100
+ optional :max_completion_tokens, Integer, nil?: true
101
+
21
102
  # @!attribute object
103
+ # Object type. Always `model`.
22
104
  #
23
105
  # @return [String, nil]
24
106
  optional :object, String
25
107
 
26
- # @!method initialize(id:, created:, owned_by:, object: nil)
27
- # @param id [String]
28
- # @param created [Integer]
29
- # @param owned_by [String]
30
- # @param object [String]
108
+ # @!attribute parameters_str
109
+ # Human-readable parameter count, e.g. `1.0T`, `753.9B`, `8B`.
110
+ #
111
+ # @return [String, nil]
112
+ optional :parameters_str, String, nil?: true
113
+
114
+ # @!attribute pricing
115
+ # Mapping of token kind to price in USD per 1M tokens, as a string. Typical keys
116
+ # are `input` and `output`; embedding models expose `embedding`. Empty object when
117
+ # pricing is not yet published for the model.
118
+ #
119
+ # @return [Hash{Symbol=>String}, nil]
120
+ optional :pricing, Telnyx::Internal::Type::HashOf[String]
121
+
122
+ # @!attribute recommended_for_assistants
123
+ # Whether Telnyx currently recommends this model as the LLM powering a Telnyx AI
124
+ # Assistant.
125
+ #
126
+ # @return [Boolean, nil]
127
+ optional :recommended_for_assistants, Telnyx::Internal::Type::Boolean
128
+
129
+ # @!attribute regions
130
+ # Public region names where the model is currently deployed (e.g. `us-central-1`,
131
+ # `eu-central-1`).
132
+ #
133
+ # @return [Array<String>, nil]
134
+ optional :regions, Telnyx::Internal::Type::ArrayOf[String]
135
+
136
+ # @!attribute task
137
+ # Primary task the model is intended for, e.g. `text-generation`,
138
+ # `audio-text-to-text`, `feature-extraction` (embeddings).
139
+ #
140
+ # @return [String, nil]
141
+ optional :task, String
142
+
143
+ # @!method initialize(id:, context_length:, created:, languages:, license:, organization:, owned_by:, parameters:, tier:, base_model: nil, description: nil, is_fine_tunable: nil, is_vision_supported: nil, max_completion_tokens: nil, object: nil, parameters_str: nil, pricing: nil, recommended_for_assistants: nil, regions: nil, task: nil)
144
+ # Some parameter documentations has been truncated, see
145
+ # {Telnyx::Models::ModelMetadata} for more details.
146
+ #
147
+ # Metadata for a model available on Telnyx Inference. Returned by
148
+ # `GET /v2/ai/openai/models` (and the deprecated `GET /v2/ai/models`). Open-source
149
+ # models live under their Hugging Face organization (e.g. `moonshotai/Kimi-K2.6`,
150
+ # `zai-org/GLM-5.1-FP8`, `MiniMaxAI/MiniMax-M2.7`); fine-tuned models are owned by
151
+ # the Telnyx organization that trained them.
152
+ #
153
+ # @param id [String] Model identifier. For open-source models, follows the `{organization}/{model_nam
154
+ #
155
+ # @param context_length [Integer] Maximum total tokens (prompt + completion) supported by the model in a single re
156
+ #
157
+ # @param created [Time] Timestamp at which the model was registered on Telnyx Inference (ISO 8601).
158
+ #
159
+ # @param languages [Array<String>] ISO language codes the model supports (e.g. `en`, `es`).
160
+ #
161
+ # @param license [String] License the model is distributed under, e.g. `Apache 2.0`, `MIT`, `Llama 3 Commu
162
+ #
163
+ # @param organization [String] Organization that originally published the model, matching the prefix of `id` fo
164
+ #
165
+ # @param owned_by [String] Owner of the model. `Telnyx` for Telnyx-hosted open-source models, the upstream
166
+ #
167
+ # @param parameters [Integer] Total parameter count of the model.
168
+ #
169
+ # @param tier [Symbol, Telnyx::Models::ModelMetadata::Tier] Billing tier the model belongs to. Used together with `pricing` to determine cos
170
+ #
171
+ # @param base_model [String, nil] Base model the fine-tuned model was trained from. Only set for fine-tuned models
172
+ #
173
+ # @param description [String, nil] Short, human-readable summary of what the model is best suited for.
174
+ #
175
+ # @param is_fine_tunable [Boolean] Whether the model can be used as a base for a fine-tuning job via `POST /v2/ai/f
176
+ #
177
+ # @param is_vision_supported [Boolean] Whether the model accepts image inputs in chat completions (multimodal vision su
178
+ #
179
+ # @param max_completion_tokens [Integer, nil] Maximum number of completion (output) tokens the model will generate per request
180
+ #
181
+ # @param object [String] Object type. Always `model`.
182
+ #
183
+ # @param parameters_str [String, nil] Human-readable parameter count, e.g. `1.0T`, `753.9B`, `8B`.
184
+ #
185
+ # @param pricing [Hash{Symbol=>String}] Mapping of token kind to price in USD per 1M tokens, as a string. Typical keys a
186
+ #
187
+ # @param recommended_for_assistants [Boolean] Whether Telnyx currently recommends this model as the LLM powering a Telnyx AI A
188
+ #
189
+ # @param regions [Array<String>] Public region names where the model is currently deployed (e.g. `us-central-1`,
190
+ #
191
+ # @param task [String] Primary task the model is intended for, e.g. `text-generation`, `audio-text-to-t
192
+
193
+ # Billing tier the model belongs to. Used together with `pricing` to determine
194
+ # cost per 1M tokens.
195
+ #
196
+ # @see Telnyx::Models::ModelMetadata#tier
197
+ module Tier
198
+ extend Telnyx::Internal::Type::Enum
199
+
200
+ SMALL = :small
201
+ MEDIUM = :medium
202
+ LARGE = :large
203
+ UNLISTED = :unlisted
204
+
205
+ # @!method self.values
206
+ # @return [Array<Symbol>]
207
+ end
31
208
  end
32
209
  end
33
210
  end
data/lib/telnyx/models.rb CHANGED
@@ -83,6 +83,8 @@ module Telnyx
83
83
 
84
84
  AI = Telnyx::Models::AI
85
85
 
86
+ AICreateResponseParams = Telnyx::Models::AICreateResponseParams
87
+
86
88
  AIRetrieveModelsParams = Telnyx::Models::AIRetrieveModelsParams
87
89
 
88
90
  AISummarizeParams = Telnyx::Models::AISummarizeParams
@@ -12,11 +12,46 @@ module Telnyx
12
12
  # @return [Telnyx::Resources::AI::OpenAI::Chat]
13
13
  attr_reader :chat
14
14
 
15
- # This endpoint returns a list of Open Source and OpenAI models that are available
16
- # for use. <br /><br /> **Note**: Model `id`'s will be in the form
17
- # `{source}/{model_name}`. For example `openai/gpt-4` or
18
- # `mistralai/Mistral-7B-Instruct-v0.1` consistent with HuggingFace naming
19
- # conventions.
15
+ # Chat with a language model. This endpoint is consistent with the
16
+ # [OpenAI Chat Completions API](https://developers.openai.com/api/reference/resources/responses)
17
+ # and may be used with the OpenAI JS or Python SDK. Response id parameter is not
18
+ # supported at the moment. Use 'conversation' parameter to leverage persistent
19
+ # conversations feature.
20
+ #
21
+ # @overload create_response(body:, request_options: {})
22
+ #
23
+ # @param body [Hash{Symbol=>Object}]
24
+ # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
25
+ #
26
+ # @return [Hash{Symbol=>Object}]
27
+ #
28
+ # @see Telnyx::Models::AI::OpenAICreateResponseParams
29
+ def create_response(params)
30
+ parsed, options = Telnyx::AI::OpenAICreateResponseParams.dump_request(params)
31
+ @client.request(
32
+ method: :post,
33
+ path: "ai/openai/responses",
34
+ body: parsed[:body],
35
+ model: Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown],
36
+ options: options
37
+ )
38
+ end
39
+
40
+ # Lists every model currently available to your account on Telnyx Inference,
41
+ # including SOTA open-source LLMs hosted on Telnyx GPUs (for example
42
+ # `moonshotai/Kimi-K2.6`, `zai-org/GLM-5.1-FP8`, and `MiniMaxAI/MiniMax-M2.7`),
43
+ # embedding models, and any fine-tuned models you have created.
44
+ #
45
+ # Each entry is a `ModelMetadata` object describing the model id, owner, task,
46
+ # context length, supported languages, billing tier, pricing per 1M tokens,
47
+ # deployment regions, and whether the model supports vision or fine-tuning. Use
48
+ # this endpoint to discover model ids you can pass to
49
+ # `POST /v2/ai/openai/chat/completions`.
50
+ #
51
+ # Model ids follow the `{organization}/{model_name}` convention from Hugging Face
52
+ # (for example `moonshotai/Kimi-K2.6`). This endpoint is OpenAI-compatible:
53
+ # clients pointed at `https://api.telnyx.com/v2/ai/openai` can call
54
+ # `client.models.list()` to retrieve the same payload.
20
55
  #
21
56
  # @overload list_models(request_options: {})
22
57
  #
@@ -46,13 +46,42 @@ module Telnyx
46
46
  # @return [Telnyx::Resources::AI::Tools]
47
47
  attr_reader :tools
48
48
 
49
+ # Chat with a language model. This endpoint is consistent with the
50
+ # [OpenAI Chat Completions API](https://developers.openai.com/api/reference/resources/responses)
51
+ # and may be used with the OpenAI JS or Python SDK. Response id parameter is not
52
+ # supported at the moment. Use 'conversation' parameter to leverage persistent
53
+ # conversations feature.
54
+ #
55
+ # @overload create_response(body:, request_options: {})
56
+ #
57
+ # @param body [Hash{Symbol=>Object}]
58
+ # @param request_options [Telnyx::RequestOptions, Hash{Symbol=>Object}, nil]
59
+ #
60
+ # @return [Hash{Symbol=>Object}]
61
+ #
62
+ # @see Telnyx::Models::AICreateResponseParams
63
+ def create_response(params)
64
+ parsed, options = Telnyx::AICreateResponseParams.dump_request(params)
65
+ @client.request(
66
+ method: :post,
67
+ path: "ai/responses",
68
+ body: parsed[:body],
69
+ model: Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown],
70
+ options: options
71
+ )
72
+ end
73
+
49
74
  # @deprecated
50
75
  #
51
- # **Deprecated**: Use `GET /v2/ai/openai/models` instead. This endpoint returns a
52
- # list of Open Source and OpenAI models that are available for use. <br /><br />
53
- # **Note**: Model `id`'s will be in the form `{source}/{model_name}`. For example
54
- # `openai/gpt-4` or `mistralai/Mistral-7B-Instruct-v0.1` consistent with
55
- # HuggingFace naming conventions.
76
+ # **Deprecated**: Use `GET /v2/ai/openai/models` instead.
77
+ #
78
+ # Returns the same `ModelsResponse` payload as the OpenAI-compatible endpoint
79
+ # open-source LLMs hosted on Telnyx (e.g. `moonshotai/Kimi-K2.6`,
80
+ # `zai-org/GLM-5.1-FP8`, `MiniMaxAI/MiniMax-M2.7`), embedding models, and
81
+ # fine-tuned models — kept around for backwards compatibility. New integrations
82
+ # should use `/v2/ai/openai/models`.
83
+ #
84
+ # Model ids follow the `{organization}/{model_name}` convention from Hugging Face.
56
85
  #
57
86
  # @overload retrieve_models(request_options: {})
58
87
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Telnyx
4
- VERSION = "5.105.0"
4
+ VERSION = "5.107.0"
5
5
  end
data/lib/telnyx.rb CHANGED
@@ -384,6 +384,8 @@ require_relative "telnyx/models/ai/openai/embedding_create_embeddings_params"
384
384
  require_relative "telnyx/models/ai/openai/embedding_create_embeddings_response"
385
385
  require_relative "telnyx/models/ai/openai/embedding_list_embedding_models_params"
386
386
  require_relative "telnyx/models/ai/openai/embedding_list_embedding_models_response"
387
+ require_relative "telnyx/models/ai/openai_create_response_params"
388
+ require_relative "telnyx/models/ai/openai_create_response_response"
387
389
  require_relative "telnyx/models/ai/openai_list_models_params"
388
390
  require_relative "telnyx/models/ai/openai_list_models_response"
389
391
  require_relative "telnyx/models/ai/post_conversation_settings"
@@ -410,6 +412,8 @@ require_relative "telnyx/models/ai/transfer_tool"
410
412
  require_relative "telnyx/models/ai/voice_settings"
411
413
  require_relative "telnyx/models/ai/webhook_tool"
412
414
  require_relative "telnyx/models/ai/widget_settings"
415
+ require_relative "telnyx/models/ai_create_response_params"
416
+ require_relative "telnyx/models/ai_create_response_response"
413
417
  require_relative "telnyx/models/ai_retrieve_models_params"
414
418
  require_relative "telnyx/models/ai_retrieve_models_response"
415
419
  require_relative "telnyx/models/ai_summarize_params"
@@ -0,0 +1,43 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Models
5
+ module AI
6
+ class OpenAICreateResponseParams < Telnyx::Internal::Type::BaseModel
7
+ extend Telnyx::Internal::Type::RequestParameters::Converter
8
+ include Telnyx::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Telnyx::AI::OpenAICreateResponseParams,
14
+ Telnyx::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(T::Hash[Symbol, T.anything]) }
19
+ attr_accessor :body
20
+
21
+ sig do
22
+ params(
23
+ body: T::Hash[Symbol, T.anything],
24
+ request_options: Telnyx::RequestOptions::OrHash
25
+ ).returns(T.attached_class)
26
+ end
27
+ def self.new(body:, request_options: {})
28
+ end
29
+
30
+ sig do
31
+ override.returns(
32
+ {
33
+ body: T::Hash[Symbol, T.anything],
34
+ request_options: Telnyx::RequestOptions
35
+ }
36
+ )
37
+ end
38
+ def to_hash
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,13 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Models
5
+ module AI
6
+ OpenAICreateResponseResponse =
7
+ T.let(
8
+ Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown],
9
+ Telnyx::Internal::Type::Converter
10
+ )
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,38 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Models
5
+ class AICreateResponseParams < Telnyx::Internal::Type::BaseModel
6
+ extend Telnyx::Internal::Type::RequestParameters::Converter
7
+ include Telnyx::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Telnyx::AICreateResponseParams, Telnyx::Internal::AnyHash)
12
+ end
13
+
14
+ sig { returns(T::Hash[Symbol, T.anything]) }
15
+ attr_accessor :body
16
+
17
+ sig do
18
+ params(
19
+ body: T::Hash[Symbol, T.anything],
20
+ request_options: Telnyx::RequestOptions::OrHash
21
+ ).returns(T.attached_class)
22
+ end
23
+ def self.new(body:, request_options: {})
24
+ end
25
+
26
+ sig do
27
+ override.returns(
28
+ {
29
+ body: T::Hash[Symbol, T.anything],
30
+ request_options: Telnyx::RequestOptions
31
+ }
32
+ )
33
+ end
34
+ def to_hash
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,11 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Models
5
+ AICreateResponseResponse =
6
+ T.let(
7
+ Telnyx::Internal::Type::HashOf[Telnyx::Internal::Type::Unknown],
8
+ Telnyx::Internal::Type::Converter
9
+ )
10
+ end
11
+ end
@@ -6,39 +6,263 @@ module Telnyx
6
6
  OrHash =
7
7
  T.type_alias { T.any(Telnyx::ModelMetadata, Telnyx::Internal::AnyHash) }
8
8
 
9
+ # Model identifier. For open-source models, follows the
10
+ # `{organization}/{model_name}` convention from Hugging Face (e.g.
11
+ # `moonshotai/Kimi-K2.6`).
9
12
  sig { returns(String) }
10
13
  attr_accessor :id
11
14
 
15
+ # Maximum total tokens (prompt + completion) supported by the model in a single
16
+ # request.
12
17
  sig { returns(Integer) }
18
+ attr_accessor :context_length
19
+
20
+ # Timestamp at which the model was registered on Telnyx Inference (ISO 8601).
21
+ sig { returns(Time) }
13
22
  attr_accessor :created
14
23
 
24
+ # ISO language codes the model supports (e.g. `en`, `es`).
25
+ sig { returns(T::Array[String]) }
26
+ attr_accessor :languages
27
+
28
+ # License the model is distributed under, e.g. `Apache 2.0`, `MIT`,
29
+ # `Llama 3 Community License`.
30
+ sig { returns(String) }
31
+ attr_accessor :license
32
+
33
+ # Organization that originally published the model, matching the prefix of `id`
34
+ # for open-source models.
35
+ sig { returns(String) }
36
+ attr_accessor :organization
37
+
38
+ # Owner of the model. `Telnyx` for Telnyx-hosted open-source models, the upstream
39
+ # provider name for proxied models, or the Telnyx organization id for fine-tuned
40
+ # models.
15
41
  sig { returns(String) }
16
42
  attr_accessor :owned_by
17
43
 
44
+ # Total parameter count of the model.
45
+ sig { returns(Integer) }
46
+ attr_accessor :parameters
47
+
48
+ # Billing tier the model belongs to. Used together with `pricing` to determine
49
+ # cost per 1M tokens.
50
+ sig { returns(Telnyx::ModelMetadata::Tier::TaggedSymbol) }
51
+ attr_accessor :tier
52
+
53
+ # Base model the fine-tuned model was trained from. Only set for fine-tuned
54
+ # models.
55
+ sig { returns(T.nilable(String)) }
56
+ attr_accessor :base_model
57
+
58
+ # Short, human-readable summary of what the model is best suited for.
59
+ sig { returns(T.nilable(String)) }
60
+ attr_accessor :description
61
+
62
+ # Whether the model can be used as a base for a fine-tuning job via
63
+ # `POST /v2/ai/fine_tuning/jobs`.
64
+ sig { returns(T.nilable(T::Boolean)) }
65
+ attr_reader :is_fine_tunable
66
+
67
+ sig { params(is_fine_tunable: T::Boolean).void }
68
+ attr_writer :is_fine_tunable
69
+
70
+ # Whether the model accepts image inputs in chat completions (multimodal vision
71
+ # support).
72
+ sig { returns(T.nilable(T::Boolean)) }
73
+ attr_reader :is_vision_supported
74
+
75
+ sig { params(is_vision_supported: T::Boolean).void }
76
+ attr_writer :is_vision_supported
77
+
78
+ # Maximum number of completion (output) tokens the model will generate per
79
+ # request. `null` if unconstrained beyond `context_length`.
80
+ sig { returns(T.nilable(Integer)) }
81
+ attr_accessor :max_completion_tokens
82
+
83
+ # Object type. Always `model`.
18
84
  sig { returns(T.nilable(String)) }
19
85
  attr_reader :object
20
86
 
21
87
  sig { params(object: String).void }
22
88
  attr_writer :object
23
89
 
90
+ # Human-readable parameter count, e.g. `1.0T`, `753.9B`, `8B`.
91
+ sig { returns(T.nilable(String)) }
92
+ attr_accessor :parameters_str
93
+
94
+ # Mapping of token kind to price in USD per 1M tokens, as a string. Typical keys
95
+ # are `input` and `output`; embedding models expose `embedding`. Empty object when
96
+ # pricing is not yet published for the model.
97
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
98
+ attr_reader :pricing
99
+
100
+ sig { params(pricing: T::Hash[Symbol, String]).void }
101
+ attr_writer :pricing
102
+
103
+ # Whether Telnyx currently recommends this model as the LLM powering a Telnyx AI
104
+ # Assistant.
105
+ sig { returns(T.nilable(T::Boolean)) }
106
+ attr_reader :recommended_for_assistants
107
+
108
+ sig { params(recommended_for_assistants: T::Boolean).void }
109
+ attr_writer :recommended_for_assistants
110
+
111
+ # Public region names where the model is currently deployed (e.g. `us-central-1`,
112
+ # `eu-central-1`).
113
+ sig { returns(T.nilable(T::Array[String])) }
114
+ attr_reader :regions
115
+
116
+ sig { params(regions: T::Array[String]).void }
117
+ attr_writer :regions
118
+
119
+ # Primary task the model is intended for, e.g. `text-generation`,
120
+ # `audio-text-to-text`, `feature-extraction` (embeddings).
121
+ sig { returns(T.nilable(String)) }
122
+ attr_reader :task
123
+
124
+ sig { params(task: String).void }
125
+ attr_writer :task
126
+
127
+ # Metadata for a model available on Telnyx Inference. Returned by
128
+ # `GET /v2/ai/openai/models` (and the deprecated `GET /v2/ai/models`). Open-source
129
+ # models live under their Hugging Face organization (e.g. `moonshotai/Kimi-K2.6`,
130
+ # `zai-org/GLM-5.1-FP8`, `MiniMaxAI/MiniMax-M2.7`); fine-tuned models are owned by
131
+ # the Telnyx organization that trained them.
24
132
  sig do
25
133
  params(
26
134
  id: String,
27
- created: Integer,
135
+ context_length: Integer,
136
+ created: Time,
137
+ languages: T::Array[String],
138
+ license: String,
139
+ organization: String,
28
140
  owned_by: String,
29
- object: String
141
+ parameters: Integer,
142
+ tier: Telnyx::ModelMetadata::Tier::OrSymbol,
143
+ base_model: T.nilable(String),
144
+ description: T.nilable(String),
145
+ is_fine_tunable: T::Boolean,
146
+ is_vision_supported: T::Boolean,
147
+ max_completion_tokens: T.nilable(Integer),
148
+ object: String,
149
+ parameters_str: T.nilable(String),
150
+ pricing: T::Hash[Symbol, String],
151
+ recommended_for_assistants: T::Boolean,
152
+ regions: T::Array[String],
153
+ task: String
30
154
  ).returns(T.attached_class)
31
155
  end
32
- def self.new(id:, created:, owned_by:, object: nil)
156
+ def self.new(
157
+ # Model identifier. For open-source models, follows the
158
+ # `{organization}/{model_name}` convention from Hugging Face (e.g.
159
+ # `moonshotai/Kimi-K2.6`).
160
+ id:,
161
+ # Maximum total tokens (prompt + completion) supported by the model in a single
162
+ # request.
163
+ context_length:,
164
+ # Timestamp at which the model was registered on Telnyx Inference (ISO 8601).
165
+ created:,
166
+ # ISO language codes the model supports (e.g. `en`, `es`).
167
+ languages:,
168
+ # License the model is distributed under, e.g. `Apache 2.0`, `MIT`,
169
+ # `Llama 3 Community License`.
170
+ license:,
171
+ # Organization that originally published the model, matching the prefix of `id`
172
+ # for open-source models.
173
+ organization:,
174
+ # Owner of the model. `Telnyx` for Telnyx-hosted open-source models, the upstream
175
+ # provider name for proxied models, or the Telnyx organization id for fine-tuned
176
+ # models.
177
+ owned_by:,
178
+ # Total parameter count of the model.
179
+ parameters:,
180
+ # Billing tier the model belongs to. Used together with `pricing` to determine
181
+ # cost per 1M tokens.
182
+ tier:,
183
+ # Base model the fine-tuned model was trained from. Only set for fine-tuned
184
+ # models.
185
+ base_model: nil,
186
+ # Short, human-readable summary of what the model is best suited for.
187
+ description: nil,
188
+ # Whether the model can be used as a base for a fine-tuning job via
189
+ # `POST /v2/ai/fine_tuning/jobs`.
190
+ is_fine_tunable: nil,
191
+ # Whether the model accepts image inputs in chat completions (multimodal vision
192
+ # support).
193
+ is_vision_supported: nil,
194
+ # Maximum number of completion (output) tokens the model will generate per
195
+ # request. `null` if unconstrained beyond `context_length`.
196
+ max_completion_tokens: nil,
197
+ # Object type. Always `model`.
198
+ object: nil,
199
+ # Human-readable parameter count, e.g. `1.0T`, `753.9B`, `8B`.
200
+ parameters_str: nil,
201
+ # Mapping of token kind to price in USD per 1M tokens, as a string. Typical keys
202
+ # are `input` and `output`; embedding models expose `embedding`. Empty object when
203
+ # pricing is not yet published for the model.
204
+ pricing: nil,
205
+ # Whether Telnyx currently recommends this model as the LLM powering a Telnyx AI
206
+ # Assistant.
207
+ recommended_for_assistants: nil,
208
+ # Public region names where the model is currently deployed (e.g. `us-central-1`,
209
+ # `eu-central-1`).
210
+ regions: nil,
211
+ # Primary task the model is intended for, e.g. `text-generation`,
212
+ # `audio-text-to-text`, `feature-extraction` (embeddings).
213
+ task: nil
214
+ )
33
215
  end
34
216
 
35
217
  sig do
36
218
  override.returns(
37
- { id: String, created: Integer, owned_by: String, object: String }
219
+ {
220
+ id: String,
221
+ context_length: Integer,
222
+ created: Time,
223
+ languages: T::Array[String],
224
+ license: String,
225
+ organization: String,
226
+ owned_by: String,
227
+ parameters: Integer,
228
+ tier: Telnyx::ModelMetadata::Tier::TaggedSymbol,
229
+ base_model: T.nilable(String),
230
+ description: T.nilable(String),
231
+ is_fine_tunable: T::Boolean,
232
+ is_vision_supported: T::Boolean,
233
+ max_completion_tokens: T.nilable(Integer),
234
+ object: String,
235
+ parameters_str: T.nilable(String),
236
+ pricing: T::Hash[Symbol, String],
237
+ recommended_for_assistants: T::Boolean,
238
+ regions: T::Array[String],
239
+ task: String
240
+ }
38
241
  )
39
242
  end
40
243
  def to_hash
41
244
  end
245
+
246
+ # Billing tier the model belongs to. Used together with `pricing` to determine
247
+ # cost per 1M tokens.
248
+ module Tier
249
+ extend Telnyx::Internal::Type::Enum
250
+
251
+ TaggedSymbol =
252
+ T.type_alias { T.all(Symbol, Telnyx::ModelMetadata::Tier) }
253
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
254
+
255
+ SMALL = T.let(:small, Telnyx::ModelMetadata::Tier::TaggedSymbol)
256
+ MEDIUM = T.let(:medium, Telnyx::ModelMetadata::Tier::TaggedSymbol)
257
+ LARGE = T.let(:large, Telnyx::ModelMetadata::Tier::TaggedSymbol)
258
+ UNLISTED = T.let(:unlisted, Telnyx::ModelMetadata::Tier::TaggedSymbol)
259
+
260
+ sig do
261
+ override.returns(T::Array[Telnyx::ModelMetadata::Tier::TaggedSymbol])
262
+ end
263
+ def self.values
264
+ end
265
+ end
42
266
  end
43
267
  end
44
268
  end
@@ -46,6 +46,8 @@ module Telnyx
46
46
 
47
47
  AI = Telnyx::Models::AI
48
48
 
49
+ AICreateResponseParams = Telnyx::Models::AICreateResponseParams
50
+
49
51
  AIRetrieveModelsParams = Telnyx::Models::AIRetrieveModelsParams
50
52
 
51
53
  AISummarizeParams = Telnyx::Models::AISummarizeParams
@@ -12,11 +12,35 @@ module Telnyx
12
12
  sig { returns(Telnyx::Resources::AI::OpenAI::Chat) }
13
13
  attr_reader :chat
14
14
 
15
- # This endpoint returns a list of Open Source and OpenAI models that are available
16
- # for use. <br /><br /> **Note**: Model `id`'s will be in the form
17
- # `{source}/{model_name}`. For example `openai/gpt-4` or
18
- # `mistralai/Mistral-7B-Instruct-v0.1` consistent with HuggingFace naming
19
- # conventions.
15
+ # Chat with a language model. This endpoint is consistent with the
16
+ # [OpenAI Chat Completions API](https://developers.openai.com/api/reference/resources/responses)
17
+ # and may be used with the OpenAI JS or Python SDK. Response id parameter is not
18
+ # supported at the moment. Use 'conversation' parameter to leverage persistent
19
+ # conversations feature.
20
+ sig do
21
+ params(
22
+ body: T::Hash[Symbol, T.anything],
23
+ request_options: Telnyx::RequestOptions::OrHash
24
+ ).returns(T::Hash[Symbol, T.anything])
25
+ end
26
+ def create_response(body:, request_options: {})
27
+ end
28
+
29
+ # Lists every model currently available to your account on Telnyx Inference,
30
+ # including SOTA open-source LLMs hosted on Telnyx GPUs (for example
31
+ # `moonshotai/Kimi-K2.6`, `zai-org/GLM-5.1-FP8`, and `MiniMaxAI/MiniMax-M2.7`),
32
+ # embedding models, and any fine-tuned models you have created.
33
+ #
34
+ # Each entry is a `ModelMetadata` object describing the model id, owner, task,
35
+ # context length, supported languages, billing tier, pricing per 1M tokens,
36
+ # deployment regions, and whether the model supports vision or fine-tuning. Use
37
+ # this endpoint to discover model ids you can pass to
38
+ # `POST /v2/ai/openai/chat/completions`.
39
+ #
40
+ # Model ids follow the `{organization}/{model_name}` convention from Hugging Face
41
+ # (for example `moonshotai/Kimi-K2.6`). This endpoint is OpenAI-compatible:
42
+ # clients pointed at `https://api.telnyx.com/v2/ai/openai` can call
43
+ # `client.models.list()` to retrieve the same payload.
20
44
  sig do
21
45
  params(request_options: Telnyx::RequestOptions::OrHash).returns(
22
46
  Telnyx::Models::AI::OpenAIListModelsResponse
@@ -46,11 +46,29 @@ module Telnyx
46
46
  sig { returns(Telnyx::Resources::AI::Tools) }
47
47
  attr_reader :tools
48
48
 
49
- # **Deprecated**: Use `GET /v2/ai/openai/models` instead. This endpoint returns a
50
- # list of Open Source and OpenAI models that are available for use. <br /><br />
51
- # **Note**: Model `id`'s will be in the form `{source}/{model_name}`. For example
52
- # `openai/gpt-4` or `mistralai/Mistral-7B-Instruct-v0.1` consistent with
53
- # HuggingFace naming conventions.
49
+ # Chat with a language model. This endpoint is consistent with the
50
+ # [OpenAI Chat Completions API](https://developers.openai.com/api/reference/resources/responses)
51
+ # and may be used with the OpenAI JS or Python SDK. Response id parameter is not
52
+ # supported at the moment. Use 'conversation' parameter to leverage persistent
53
+ # conversations feature.
54
+ sig do
55
+ params(
56
+ body: T::Hash[Symbol, T.anything],
57
+ request_options: Telnyx::RequestOptions::OrHash
58
+ ).returns(T::Hash[Symbol, T.anything])
59
+ end
60
+ def create_response(body:, request_options: {})
61
+ end
62
+
63
+ # **Deprecated**: Use `GET /v2/ai/openai/models` instead.
64
+ #
65
+ # Returns the same `ModelsResponse` payload as the OpenAI-compatible endpoint —
66
+ # open-source LLMs hosted on Telnyx (e.g. `moonshotai/Kimi-K2.6`,
67
+ # `zai-org/GLM-5.1-FP8`, `MiniMaxAI/MiniMax-M2.7`), embedding models, and
68
+ # fine-tuned models — kept around for backwards compatibility. New integrations
69
+ # should use `/v2/ai/openai/models`.
70
+ #
71
+ # Model ids follow the `{organization}/{model_name}` convention from Hugging Face.
54
72
  sig do
55
73
  params(request_options: Telnyx::RequestOptions::OrHash).returns(
56
74
  Telnyx::Models::AIRetrieveModelsResponse
@@ -0,0 +1,26 @@
1
+ module Telnyx
2
+ module Models
3
+ module AI
4
+ type openai_create_response_params =
5
+ { body: ::Hash[Symbol, top] }
6
+ & Telnyx::Internal::Type::request_parameters
7
+
8
+ class OpenAICreateResponseParams < Telnyx::Internal::Type::BaseModel
9
+ extend Telnyx::Internal::Type::RequestParameters::Converter
10
+ include Telnyx::Internal::Type::RequestParameters
11
+
12
+ attr_accessor body: ::Hash[Symbol, top]
13
+
14
+ def initialize: (
15
+ body: ::Hash[Symbol, top],
16
+ ?request_options: Telnyx::request_opts
17
+ ) -> void
18
+
19
+ def to_hash: -> {
20
+ body: ::Hash[Symbol, top],
21
+ request_options: Telnyx::RequestOptions
22
+ }
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,9 @@
1
+ module Telnyx
2
+ module Models
3
+ module AI
4
+ type openai_create_response_response = ::Hash[Symbol, top]
5
+
6
+ OpenAICreateResponseResponse: Telnyx::Internal::Type::Converter
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,23 @@
1
+ module Telnyx
2
+ module Models
3
+ type ai_create_response_params =
4
+ { body: ::Hash[Symbol, top] } & Telnyx::Internal::Type::request_parameters
5
+
6
+ class AICreateResponseParams < Telnyx::Internal::Type::BaseModel
7
+ extend Telnyx::Internal::Type::RequestParameters::Converter
8
+ include Telnyx::Internal::Type::RequestParameters
9
+
10
+ attr_accessor body: ::Hash[Symbol, top]
11
+
12
+ def initialize: (
13
+ body: ::Hash[Symbol, top],
14
+ ?request_options: Telnyx::request_opts
15
+ ) -> void
16
+
17
+ def to_hash: -> {
18
+ body: ::Hash[Symbol, top],
19
+ request_options: Telnyx::RequestOptions
20
+ }
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,7 @@
1
+ module Telnyx
2
+ module Models
3
+ type ai_create_response_response = ::Hash[Symbol, top]
4
+
5
+ AICreateResponseResponse: Telnyx::Internal::Type::Converter
6
+ end
7
+ end
@@ -1,32 +1,142 @@
1
1
  module Telnyx
2
2
  module Models
3
3
  type model_metadata =
4
- { id: String, created: Integer, owned_by: String, object: String }
4
+ {
5
+ id: String,
6
+ context_length: Integer,
7
+ created: Time,
8
+ languages: ::Array[String],
9
+ license: String,
10
+ organization: String,
11
+ owned_by: String,
12
+ parameters: Integer,
13
+ tier: Telnyx::Models::ModelMetadata::tier,
14
+ base_model: String?,
15
+ description: String?,
16
+ is_fine_tunable: bool,
17
+ is_vision_supported: bool,
18
+ max_completion_tokens: Integer?,
19
+ object: String,
20
+ parameters_str: String?,
21
+ pricing: ::Hash[Symbol, String],
22
+ recommended_for_assistants: bool,
23
+ regions: ::Array[String],
24
+ task: String
25
+ }
5
26
 
6
27
  class ModelMetadata < Telnyx::Internal::Type::BaseModel
7
28
  attr_accessor id: String
8
29
 
9
- attr_accessor created: Integer
30
+ attr_accessor context_length: Integer
31
+
32
+ attr_accessor created: Time
33
+
34
+ attr_accessor languages: ::Array[String]
35
+
36
+ attr_accessor license: String
37
+
38
+ attr_accessor organization: String
10
39
 
11
40
  attr_accessor owned_by: String
12
41
 
42
+ attr_accessor parameters: Integer
43
+
44
+ attr_accessor tier: Telnyx::Models::ModelMetadata::tier
45
+
46
+ attr_accessor base_model: String?
47
+
48
+ attr_accessor description: String?
49
+
50
+ attr_reader is_fine_tunable: bool?
51
+
52
+ def is_fine_tunable=: (bool) -> bool
53
+
54
+ attr_reader is_vision_supported: bool?
55
+
56
+ def is_vision_supported=: (bool) -> bool
57
+
58
+ attr_accessor max_completion_tokens: Integer?
59
+
13
60
  attr_reader object: String?
14
61
 
15
62
  def object=: (String) -> String
16
63
 
64
+ attr_accessor parameters_str: String?
65
+
66
+ attr_reader pricing: ::Hash[Symbol, String]?
67
+
68
+ def pricing=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
69
+
70
+ attr_reader recommended_for_assistants: bool?
71
+
72
+ def recommended_for_assistants=: (bool) -> bool
73
+
74
+ attr_reader regions: ::Array[String]?
75
+
76
+ def regions=: (::Array[String]) -> ::Array[String]
77
+
78
+ attr_reader task: String?
79
+
80
+ def task=: (String) -> String
81
+
17
82
  def initialize: (
18
83
  id: String,
19
- created: Integer,
84
+ context_length: Integer,
85
+ created: Time,
86
+ languages: ::Array[String],
87
+ license: String,
88
+ organization: String,
20
89
  owned_by: String,
21
- ?object: String
90
+ parameters: Integer,
91
+ tier: Telnyx::Models::ModelMetadata::tier,
92
+ ?base_model: String?,
93
+ ?description: String?,
94
+ ?is_fine_tunable: bool,
95
+ ?is_vision_supported: bool,
96
+ ?max_completion_tokens: Integer?,
97
+ ?object: String,
98
+ ?parameters_str: String?,
99
+ ?pricing: ::Hash[Symbol, String],
100
+ ?recommended_for_assistants: bool,
101
+ ?regions: ::Array[String],
102
+ ?task: String
22
103
  ) -> void
23
104
 
24
105
  def to_hash: -> {
25
106
  id: String,
26
- created: Integer,
107
+ context_length: Integer,
108
+ created: Time,
109
+ languages: ::Array[String],
110
+ license: String,
111
+ organization: String,
27
112
  owned_by: String,
28
- object: String
113
+ parameters: Integer,
114
+ tier: Telnyx::Models::ModelMetadata::tier,
115
+ base_model: String?,
116
+ description: String?,
117
+ is_fine_tunable: bool,
118
+ is_vision_supported: bool,
119
+ max_completion_tokens: Integer?,
120
+ object: String,
121
+ parameters_str: String?,
122
+ pricing: ::Hash[Symbol, String],
123
+ recommended_for_assistants: bool,
124
+ regions: ::Array[String],
125
+ task: String
29
126
  }
127
+
128
+ type tier = :small | :medium | :large | :unlisted
129
+
130
+ module Tier
131
+ extend Telnyx::Internal::Type::Enum
132
+
133
+ SMALL: :small
134
+ MEDIUM: :medium
135
+ LARGE: :large
136
+ UNLISTED: :unlisted
137
+
138
+ def self?.values: -> ::Array[Telnyx::Models::ModelMetadata::tier]
139
+ end
30
140
  end
31
141
  end
32
142
  end
@@ -43,6 +43,8 @@ module Telnyx
43
43
 
44
44
  module AI = Telnyx::Models::AI
45
45
 
46
+ class AICreateResponseParams = Telnyx::Models::AICreateResponseParams
47
+
46
48
  class AIRetrieveModelsParams = Telnyx::Models::AIRetrieveModelsParams
47
49
 
48
50
  class AISummarizeParams = Telnyx::Models::AISummarizeParams
@@ -6,6 +6,11 @@ module Telnyx
6
6
 
7
7
  attr_reader chat: Telnyx::Resources::AI::OpenAI::Chat
8
8
 
9
+ def create_response: (
10
+ body: ::Hash[Symbol, top],
11
+ ?request_options: Telnyx::request_opts
12
+ ) -> Telnyx::Models::AI::openai_create_response_response
13
+
9
14
  def list_models: (
10
15
  ?request_options: Telnyx::request_opts
11
16
  ) -> Telnyx::Models::AI::OpenAIListModelsResponse
@@ -25,6 +25,11 @@ module Telnyx
25
25
 
26
26
  attr_reader tools: Telnyx::Resources::AI::Tools
27
27
 
28
+ def create_response: (
29
+ body: ::Hash[Symbol, top],
30
+ ?request_options: Telnyx::request_opts
31
+ ) -> Telnyx::Models::ai_create_response_response
32
+
28
33
  def retrieve_models: (
29
34
  ?request_options: Telnyx::request_opts
30
35
  ) -> Telnyx::Models::AIRetrieveModelsResponse
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telnyx
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.105.0
4
+ version: 5.107.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Telnyx
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-05-08 00:00:00.000000000 Z
11
+ date: 2026-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi
@@ -401,6 +401,8 @@ files:
401
401
  - lib/telnyx/models/ai/openai/embedding_create_embeddings_response.rb
402
402
  - lib/telnyx/models/ai/openai/embedding_list_embedding_models_params.rb
403
403
  - lib/telnyx/models/ai/openai/embedding_list_embedding_models_response.rb
404
+ - lib/telnyx/models/ai/openai_create_response_params.rb
405
+ - lib/telnyx/models/ai/openai_create_response_response.rb
404
406
  - lib/telnyx/models/ai/openai_list_models_params.rb
405
407
  - lib/telnyx/models/ai/openai_list_models_response.rb
406
408
  - lib/telnyx/models/ai/post_conversation_settings.rb
@@ -427,6 +429,8 @@ files:
427
429
  - lib/telnyx/models/ai/voice_settings.rb
428
430
  - lib/telnyx/models/ai/webhook_tool.rb
429
431
  - lib/telnyx/models/ai/widget_settings.rb
432
+ - lib/telnyx/models/ai_create_response_params.rb
433
+ - lib/telnyx/models/ai_create_response_response.rb
430
434
  - lib/telnyx/models/ai_retrieve_models_params.rb
431
435
  - lib/telnyx/models/ai_retrieve_models_response.rb
432
436
  - lib/telnyx/models/ai_summarize_params.rb
@@ -3128,6 +3132,8 @@ files:
3128
3132
  - rbi/telnyx/models/ai/openai/embedding_create_embeddings_response.rbi
3129
3133
  - rbi/telnyx/models/ai/openai/embedding_list_embedding_models_params.rbi
3130
3134
  - rbi/telnyx/models/ai/openai/embedding_list_embedding_models_response.rbi
3135
+ - rbi/telnyx/models/ai/openai_create_response_params.rbi
3136
+ - rbi/telnyx/models/ai/openai_create_response_response.rbi
3131
3137
  - rbi/telnyx/models/ai/openai_list_models_params.rbi
3132
3138
  - rbi/telnyx/models/ai/openai_list_models_response.rbi
3133
3139
  - rbi/telnyx/models/ai/post_conversation_settings.rbi
@@ -3154,6 +3160,8 @@ files:
3154
3160
  - rbi/telnyx/models/ai/voice_settings.rbi
3155
3161
  - rbi/telnyx/models/ai/webhook_tool.rbi
3156
3162
  - rbi/telnyx/models/ai/widget_settings.rbi
3163
+ - rbi/telnyx/models/ai_create_response_params.rbi
3164
+ - rbi/telnyx/models/ai_create_response_response.rbi
3157
3165
  - rbi/telnyx/models/ai_retrieve_models_params.rbi
3158
3166
  - rbi/telnyx/models/ai_retrieve_models_response.rbi
3159
3167
  - rbi/telnyx/models/ai_summarize_params.rbi
@@ -5846,6 +5854,8 @@ files:
5846
5854
  - sig/telnyx/models/ai/openai/embedding_create_embeddings_response.rbs
5847
5855
  - sig/telnyx/models/ai/openai/embedding_list_embedding_models_params.rbs
5848
5856
  - sig/telnyx/models/ai/openai/embedding_list_embedding_models_response.rbs
5857
+ - sig/telnyx/models/ai/openai_create_response_params.rbs
5858
+ - sig/telnyx/models/ai/openai_create_response_response.rbs
5849
5859
  - sig/telnyx/models/ai/openai_list_models_params.rbs
5850
5860
  - sig/telnyx/models/ai/openai_list_models_response.rbs
5851
5861
  - sig/telnyx/models/ai/post_conversation_settings.rbs
@@ -5872,6 +5882,8 @@ files:
5872
5882
  - sig/telnyx/models/ai/voice_settings.rbs
5873
5883
  - sig/telnyx/models/ai/webhook_tool.rbs
5874
5884
  - sig/telnyx/models/ai/widget_settings.rbs
5885
+ - sig/telnyx/models/ai_create_response_params.rbs
5886
+ - sig/telnyx/models/ai_create_response_response.rbs
5875
5887
  - sig/telnyx/models/ai_retrieve_models_params.rbs
5876
5888
  - sig/telnyx/models/ai_retrieve_models_response.rbs
5877
5889
  - sig/telnyx/models/ai_summarize_params.rbs