Add Telnyx model provider#3040
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces the Telnyx model provider plugin, which adds support for LLM chat completions, text embeddings, text-to-speech, and speech-to-text services. The implementation includes shared HTTP utility classes, specific model providers, a wide range of predefined model configurations (including GPT-4o, Claude, and Llama models), and a comprehensive test suite. Review feedback highlighted critical issues in the LLM implementation, specifically regarding incorrect tool mapping logic in the request payload and a streaming response handler that failed to capture tool calls when text content was missing from a chunk.
Screenshots / Runtime smokeTested against a local Dify deployment using the packaged PR plugin. Validation performed:
The successful LLM smoke below uses 1. Telnyx plugin installed2. Telnyx provider configured3. Telnyx LLM chat success |
|
@RockChinQ Would be great to have this reviewd / merged. |
|
@crazywoola would love to get this integrated. |



Summary
Adds a Telnyx model provider plugin for Dify Official Plugins under
models/telnyx.This provider adds predefined Telnyx support for:
POST /v2/ai/chat/completionsPOST /v2/ai/openai/embeddingsPOST /v2/ai/audio/transcriptionsThe predefined model lists were checked against Telnyx's authenticated read-only model/voice endpoints before opening this draft:
18 / 183 / 312 / 3329Local Dify install/runtime smoke has been completed; screenshots are posted in #3040 (comment).
Change Type
Screenshots / Videos
LLM Plugin Checklist
Areas affected by this change (check all that apply)
Version
versioninmanifest.yaml(not the one undermeta)dify_plugin>=0.3.0,<0.6.0is declared inpyproject.tomland locked inuv.lock(or kept inrequirements.txtfor legacy plugins withoutuv.lock) — SDK docsTesting
Validation completed so far:
cd models/telnyx uv run --python 3.12 python -m pytest tests -q uv run --python 3.12 python -m compileall -q models provider tests main.pyResult:
Package smoke with the Dify plugin daemon CLI release asset:
cd dify-official-plugins /tmp/dify-plugin-cli/dify-plugin plugin package models/telnyx --output_path /tmp/telnyx.difypkg shasum -a 256 /tmp/telnyx.difypkgResult:
Live read-only inventory checks completed with a Telnyx API key, without logging secrets:
Runtime smoke completed:
.difypkginto a local Dify environment;Optional embedding/TTS/STT UI smokes are still available as follow-up coverage if maintainers want the full provider surface exercised visually.