Files
9router/open-sse/translator
Amirsalar Sojoudi 75834e96ff fix(claude): keep a trailing user turn so cleanup never yields assistant prefill
Newer Claude models reject a body that ends on an assistant turn. The
empty-message cleanups in prepareClaudeRequest and normalizeClaudePassthrough
protect a trailing assistant but not a trailing user turn, so an emptied last
user turn silently made the previous assistant turn the last one.
ensureTrailingUserTurn appends a minimal user turn ("Continue.") only when the
client did not itself end on assistant, in both cleanup paths and in
translateRequest against the role the client actually sent.
2026-10-01 10:26:59 +07:00
..