Skip to content

Conversation

stonyme
Copy link

@stonyme stonyme commented Sep 19, 2025

The default _transform_messages in OpenAIGPTConfig flattens message
content, causing Qwen-VL models on DashScope to lose image inputs when
text and images are sent together.
This patch overrides _transform_messages in DashScopeChatConfig to:

  • Detect models starting with qwen-vl.
  • Keep the original list structure of content so that text–image
    multimodal messages are passed through unchanged.
  • Fall back to the parent implementation for non-visual models.

This ensures Qwen-VL models can correctly process combined text and image
inputs as intended.
#14631

Copy link

vercel bot commented Sep 19, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
litellm Ready Ready Preview Comment Sep 19, 2025 6:58am

@CLAassistant
Copy link

CLAassistant commented Sep 19, 2025

CLA assistant check
All committers have signed the CLA.

if isinstance(message.get("content"), list):
transformed_messages.append(message)
else:
transformed_messages.append({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your else statement removes the logic to convent content list to string @stonyme

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.

3 participants