Add Telnyx as an inference provider#2218
Open
jamestwhedbee wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Registers Telnyx as a new Inference Provider for the JS client as step 2 (JS Client Integration) of the provider registration guide.
Telnyx exposes an OpenAI-compatible chat completions API. This PR adds conversational-task support only for now, using the direct provider base URL https://api.telnyx.com/v2/ai/openai.
One provider-specific detail: Telnyx's OpenAI-compatible base URL already includes the version segment, so the conversational helper overrides the default route and uses chat/completions instead of v1/chat/completions.
Validation:
Note
Low Risk
Additive provider integration following existing conversational patterns; no changes to auth, billing, or other providers’ behavior.
Overview
Adds Telnyx as a new inference provider in
@huggingface/inference, with conversational / chat completion support only.A new
TelnyxConversationalTasktargetshttps://api.telnyx.com/v2/ai/openaiand overrides the default OpenAI-style path to usechat/completions(notv1/chat/completions) because Telnyx’s base URL already includes the API version.telnyxis registered in provider types, hub org mapping, hardcoded model mapping, andgetProviderHelper. The README provider and supported-models lists are updated, and a unit test asserts the resolved base URL and route for direct provider-key calls.Reviewed by Cursor Bugbot for commit 6c590f6. Bugbot is set up for automated code reviews on this repo. Configure here.