Skip to content

[feat] Append full messages instead of role and content#5907

Closed
shuaills wants to merge 8 commits intosgl-project:mainfrom
shuaills:feat/appendFullMessage
Closed

[feat] Append full messages instead of role and content#5907
shuaills wants to merge 8 commits intosgl-project:mainfrom
shuaills:feat/appendFullMessage

Conversation

@shuaills
Copy link
Copy Markdown
Collaborator

Motivation

The changes in the adapter are made to ensure that all fields from the original message (not just role and content) are preserved when constructing openai_compatible_messages.

This is important because:
Some downstream logic or templates may need access to extra fields like tool_calls, reasoning_content, etc.
Chat template should have control to those fields instead of removing them in SGLang side.

Modifications

Checklist

Co-authored-by: tuhahaha <tujianhong.tjh@alibaba-inc.com>
@minleminzui
Copy link
Copy Markdown
Collaborator

LGTM

Copy link
Copy Markdown
Collaborator

@minleminzui minleminzui left a comment

Choose a reason for hiding this comment

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

@shuaills please check the ci

@CatherineSue
Copy link
Copy Markdown
Collaborator

It seems the CI is failing due to the change in protocol.py: https://github.com/sgl-project/sglang/actions/runs/14752107142/job/41411818000?pr=5907

@zhyncs zhyncs closed this May 3, 2025
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.

4 participants