fix(doubao): avoid mixing draft_task with prompt text for Seedance - #4
Merged
Merged
Conversation
Ark rejects draft_task mixed with other content types; the adaptor always appended prompt as a text item. Omit that append when metadata.content includes draft_task. Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Volcengine returns
draft_task content cannot be mixed with other content typeswhencontentincludes bothdraft_taskandtext. new-api always appendedpromptas atextcontent item after mergingmetadata.Change
If
metadata.contentcontainstype: draft_task, skip appending the prompt astextand strip anytextentries from metadata. Rootpromptremains required for gateway validation but is not forwarded as Arkcontentin this mode.Depends on
Builds on
DraftTaskRef/draft_taskfield support (see related PR #3 if not merged yet). This branch is based onfeat/doubao-seedance-draft-task-content.Made with Cursor