Skip to content

feat(providers): add BytePlus provider (Chat, Embeddings, Image Gen, TTS, Responses) - #36012

Open
abesticode wants to merge 39 commits into
BerriAI:litellm_internal_stagingfrom
abesticode:litellm_add-byteplus-provider
Open

feat(providers): add BytePlus provider (Chat, Embeddings, Image Gen, TTS, Responses)#36012
abesticode wants to merge 39 commits into
BerriAI:litellm_internal_stagingfrom
abesticode:litellm_add-byteplus-provider

Conversation

@abesticode

Copy link
Copy Markdown

TLDR

Problem this solves:

  • LiteLLM has no support for BytePlus, the international version of VolcEngine
  • International users cannot route Doubao/Skylark models through LiteLLM

How it solves it:

  • Adds BytePlus as a new provider with chat, embedding, image gen, TTS, and responses support
  • Registers BytePlus routing, lazy imports, config factories, and Admin UI entries

Relevant issues

Linear ticket

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests
  • My PR passes all CI/CD checks (e.g., lint, format, unit tests)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have received a Greptile Confidence Score of at least 4/5 before requesting a maintainer review (Greptile reviews automatically once the PR is opened; only comment @greptileai to 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 e14f0435f9

1. Chat Completions

curl -s http://localhost:4000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LITELLM_KEY" \
  -d '{
    "model": "byteplus/deepseek-v3-2-251201",
    "messages": [{"role": "user", "content": "Say hello in one sentence"}],
    "max_tokens": 50
  }'
image

2. Embeddings

curl -s http://localhost:4000/v1/embeddings \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LITELLM_KEY" \
  -d '{
    "model": "byteplus/skylark-embedding-vision-250615",
    "input": "test embedding from litellm"
  }'
image

3. Image Generation

curl -s http://localhost:4000/v1/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LITELLM_KEY" \
  -d '{
    "model": "byteplus/seedream-4-5-251128",
    "prompt": "a cute cat sitting on a table",
    "n": 1,
    "size": "2k"
  }'
image

4. Text-to-Speech

curl -s http://localhost:4000/v1/audio/speech \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LITELLM_KEY" \
  -d '{
    "model": "byteplus/seed-tts-2.0",
    "input": "Hello from LiteLLM BytePlus provider",
    "voice": "alloy"
  }' --output test_byteplus.mp3

# verify file was created
ls -la test_byteplus.mp3
image

5. Responses API

curl -s http://localhost:4000/v1/responses \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LITELLM_KEY" \
  -d '{
    "model": "byteplus/deepseek-v3-2-251201",
    "input": "Say hello in one sentence"
  }'
image

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

image

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 name
  • litellm/llms/byteplus/common_utils.py - shared error class and constants (default API base, provider name)
  • litellm/constants.py - added "byteplus" to openai_compatible_providers
  • litellm/types/utils.py - added BYTEPLUS to LlmProviders enum
  • litellm/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 delegation
  • litellm/utils.py - registered BytePlusConfig in ProviderConfigManager for chat and embedding
  • litellm/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 imports
  • litellm/_lazy_imports_registry.py - registered all BytePlus config classes for lazy loading

Frontend changes:

  • ui/litellm-dashboard/public/assets/logos/byteplus.svg - BytePlus logo
  • ui/litellm-dashboard/src/components/provider_info_helpers.tsx - added BytePlus to provider enum, provider_map, logo map, and placeholder
  • litellm/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

  • The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR

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.
@CLAassistant

CLAassistant commented Aug 5, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@greptile-apps

greptile-apps Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

BytePlus 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

  • Adds BytePlus provider configs and routing across five API surfaces
  • Registers lazy imports, provider factories, credentials, endpoint metadata, and dashboard presentation
  • Adds focused transformation tests for the new provider

Confidence Score: 4/5

The 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

Important Files Changed

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

Comment thread litellm/llms/byteplus/text_to_speech/transformation.py
Comment thread litellm/llms/byteplus/text_to_speech/transformation.py Outdated
Comment thread litellm/main.py Outdated
Comment thread litellm/llms/byteplus/text_to_speech/transformation.py Outdated
Comment thread litellm/llms/byteplus/text_to_speech/transformation.py Outdated
@veria-ai

veria-ai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

PR overview

All previously flagged issues have been addressed. No open security concerns remain on this pull request.

Security review

No open security issues remain on this pull request.

Fixed/addressed: 2 · PR risk: 0/10

@codspeed-hq

codspeed-hq Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing abesticode:litellm_add-byteplus-provider (9e12a7f) with litellm_internal_staging (8841cbc)1

Open in CodSpeed

Footnotes

  1. No successful run was found on litellm_internal_staging (59eeae3) during the generation of this report, so 8841cbc was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

abesticode and others added 17 commits August 6, 2026 13:47
@abesticode

Copy link
Copy Markdown
Author

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!

Comment thread litellm/llms/byteplus/image_generation/transformation.py Outdated
@abesticode

Copy link
Copy Markdown
Author

@greptile-apps

Comment thread litellm/llms/byteplus/text_to_speech/transformation.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants