[Bugfix] Return HTTP 400 instead of 501 for unknown chat roles in DeepSeek encoders (#53071)

Signed-off-by: JC-ut0 <809602657@qq.com>
This commit is contained in:
JC-ut0
2026-08-20 09:23:41 +00:00
committed by GitHub
parent c8de519917
commit 38e9cefdef
4 changed files with 29 additions and 2 deletions
+1 -1
View File
@@ -258,7 +258,7 @@ def render_message(
tool_calls=tool_calls_content,
)
else:
raise NotImplementedError(f"Unknown role: {role}")
raise ValueError(f"Invalid role: {role}")
return prompt