litellm - 💡(How to fix) Fix [Feature]: Support DashScope embedding (text-embedding-v4) and rerank (qwen3-rerank) [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#25690Fetched 2026-04-16 06:37:12
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×4commented ×1renamed ×1
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

The Feature

Support DashScope embedding (text-embedding-v4) and rerank (qwen3-rerank)

Currently, LiteLLM does not support DashScope embedding and rerank APIs properly. Even when using the OpenAI-compatible endpoint, there are compatibility issues (response parsing, encoding_format, etc.).

It would be helpful to have native support for: 1. DashScope embedding: • text-embedding-v4 2. DashScope rerank: • qwen3-rerank

Motivation, pitch

I’m using LiteLLM as a unified interface for multiple providers (OpenAI, DeepSeek, DashScope, etc.) in a RAG pipeline.

Current issues

  1. Embedding (text-embedding-v4) Using DashScope via OpenAI-compatible endpoint works partially, but: • encoding_format must be manually set to "float" • response is sometimes returned as dict instead of OpenAI-style object • requires custom parsing instead of standard response.data[0].embedding

This breaks compatibility with frameworks expecting OpenAI-like responses.

  1. Rerank (qwen3-rerank)

DashScope rerank is not supported at all:

ValueError: Unsupported provider: dashscope

From:

litellm.rerank(...)

So currently there’s no way to use DashScope rerank through LiteLLM.

Expected behavior

  1. Native provider support for dashscope:
  • embedding
  • erank
  1. Proper model mapping, e.g.:
  • model="dashscope/text-embedding-v4"
  • model="dashscope/qwen3-rerank"
  1. Standardized response format (OpenAI-compatible object), so downstream code can safely use:

response.data[0].embedding

  1. No need for manual fixes like:
  • forcing encoding_format
  • custom response parsing

Why this matters

DashScope is widely used (especially in China), and having first-class support in LiteLLM would make it much easier to:

  • build RAG systems
  • switch between providers
  • void writing custom adapters

What part of LiteLLM is this about?

SDK (litellm Python package)

LiteLLM is hiring a founding backend engineer, are you interested in joining us and shipping to all our users?

No

Twitter / LinkedIn details

No response

extent analysis

TL;DR

To resolve the compatibility issues with DashScope embedding and rerank APIs in LiteLLM, native support for DashScope providers needs to be implemented, including proper model mapping and standardized response formats.

Guidance

  • Implement native support for DashScope embedding (text-embedding-v4) and rerank (qwen3-rerank) in LiteLLM to ensure compatibility and standardized responses.
  • Update the LiteLLM SDK to include model mapping for DashScope, such as "dashscope/text-embedding-v4" and "dashscope/qwen3-rerank", to enable seamless integration.
  • Ensure that the response format from DashScope APIs is standardized to match the OpenAI-compatible object, allowing downstream code to safely access response data without custom parsing.
  • Remove the need for manual fixes, such as forcing encoding_format to "float" or custom response parsing, to improve the overall user experience.

Example

No code snippet is provided as the issue focuses on the need for native support and standardized responses rather than a specific code fix.

Notes

The implementation of native DashScope support in LiteLLM may require significant changes to the SDK and potentially the underlying architecture. Additionally, the issue highlights the importance of standardized responses to ensure compatibility with downstream frameworks and libraries.

Recommendation

Apply a workaround by implementing custom adapters or patches to the LiteLLM SDK to support DashScope embedding and rerank APIs until native support is available. This will allow users to utilize DashScope with LiteLLM while waiting for an official fix.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING