feat(providers): add BytePlus provider (Chat, Embeddings, Image Gen, TTS, Responses) - #36012
feat(providers): add BytePlus provider (Chat, Embeddings, Image Gen, TTS, Responses)#36012abesticode wants to merge 39 commits into
Conversation
Add BytePlus (international version of VolcEngine/Doubao) as a new provider supporting chat completions, embeddings (text and multimodal), image generation, text-to-speech, and the responses API. BytePlus uses the same underlying Ark platform but with ap-southeast endpoints for international users.
Greptile SummaryBytePlus support now covers chat, embeddings, image generation, text-to-speech, native Responses, provider discovery, and dashboard configuration. The latest changes register the previously missing image and Responses factories and improve TTS parameter and response handling, but non-MP3 response metadata remains incorrect for formats without recognized magic bytes
Confidence Score: 4/5The PR is not yet safe to merge because some requested BytePlus audio formats are still returned with an incorrect MIME type The TTS speed mapping and missing image and Responses registrations are fixed, but the response transformer uses the constant MP3 fallback whenever audio bytes lack a recognized signature, so PCM and similar responses can still be mislabeled. The previously reported provider-specific core dispatch also remains Files Needing Attention: litellm/llms/byteplus/text_to_speech/transformation.py, litellm/main.py
|
| Filename | Overview |
|---|---|
| litellm/llms/byteplus/text_to_speech/transformation.py | Adds BytePlus TTS authentication, request mapping, response parsing, and dispatch, but its fallback content type still ignores the requested format |
| litellm/utils.py | Registers BytePlus chat, embedding, image-generation, TTS, and native Responses provider configs, including the previously missing factories |
| litellm/llms/byteplus/image_generation/transformation.py | Implements BytePlus image request URL, authentication, parameter mapping, and normalized response conversion |
| litellm/llms/byteplus/responses/transformation.py | Extends the VolcEngine native Responses adapter with BytePlus provider identity, credentials, and endpoint construction |
| litellm/main.py | Routes BytePlus chat, embeddings, and TTS through the corresponding adapters |
| litellm/litellm_core_utils/get_llm_provider_logic.py | Resolves the byteplus model prefix and BytePlus or Ark environment credentials and base URLs |
Reviews (2): Last reviewed commit: "Merge branch 'litellm_internal_staging' ..." | Re-trigger Greptile
PR overviewAll previously flagged issues have been addressed. No open security concerns remain on this pull request. Security reviewNo open security issues remain on this pull request. Fixed/addressed: 2 · PR risk: 0/10 |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
…type, security headers, and docs registry
…y type-safe without ignore comments
…ables, removing rebind-ok comments
…types to satisfy LIT rules
…s validate_environment
…l for byteplus provider
…TypeIssues and reportUnusedVariable
…ibleMethodOverride to 59
… 294 in basedpyright-code-budget.json
|
Hi @ryan-crabbe-berri , I've addressed the feedback and updated the changes. Could you please take a look when you have a chance? Thanks! |
…esticode/litellm into litellm_add-byteplus-provider # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
TLDR
Problem this solves:
How it solves it:
Relevant issues
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
@greptileaito re-request a review after pushing changes)Delays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).
Screenshots / Proof of Fix
All proof captured at commit
e14f0435f91. Chat Completions
2. Embeddings
3. Image Generation
4. Text-to-Speech
5. Responses API
6. Admin UI - BytePlus Provider
BytePlus appears in the provider list with its logo on the Admin UI model management page at http://localhost:4000/ui
Type
New Feature
Changes
Adds BytePlus as a new LLM provider. BytePlus is the international version of VolcEngine (Doubao), serving the same Ark platform models through ap-southeast endpoints for users outside China
Backend changes:
litellm/llms/byteplus/- new provider module with chat, embedding, image_generation, text_to_speech, and responses submodules. Each config extends the corresponding VolcEngine config and overrides the API base URL and provider namelitellm/llms/byteplus/common_utils.py- shared error class and constants (default API base, provider name)litellm/constants.py- added "byteplus" to openai_compatible_providerslitellm/types/utils.py- addedBYTEPLUSto LlmProviders enumlitellm/litellm_core_utils/get_llm_provider_logic.py- added "byteplus/" prefix detection and API base/key resolution (supports BYTEPLUS_API_KEY, ARK_API_KEY, BYTEPLUS_API_BASE, ARK_API_BASE env vars)litellm/litellm_core_utils/get_supported_openai_params.py- added BytePlus config delegationlitellm/utils.py- registered BytePlusConfig in ProviderConfigManager for chat and embeddinglitellm/main.py- added BytePlus TTS dispatch (excluded from the generic OpenAI TTS route since BytePlus TTS uses a non-OpenAI-compatible endpoint)litellm/__init__.py- added BytePlus TYPE_CHECKING importslitellm/_lazy_imports_registry.py- registered all BytePlus config classes for lazy loadingFrontend changes:
ui/litellm-dashboard/public/assets/logos/byteplus.svg- BytePlus logoui/litellm-dashboard/src/components/provider_info_helpers.tsx- added BytePlus to provider enum, provider_map, logo map, and placeholderlitellm/proxy/public_endpoints/provider_create_fields.json- added BytePlus credential fields (api_key, api_base)Tests:
tests/test_litellm/llms/byteplus/- 23 unit tests covering all five endpoint transformations (URL construction, request/response transformation, parameter mapping, environment validation, error handling)Final Attestation