fix(claude-to-openai): emit closing </think> tag instead of empty reasoning_content (#454)
Replace empty reasoning_content with explicit </think> closing tag when exiting thinking block to properly signal end of reasoning section in streaming responses.
This commit is contained in:
parent
01787a3d5b
commit
ffa172c92d
1 changed files with 1 additions and 1 deletions
|
|
@ -95,7 +95,7 @@ export function claudeToOpenAIResponse(chunk, state) {
|
|||
break;
|
||||
}
|
||||
if (state.inThinkingBlock && chunk.index === state.currentBlockIndex) {
|
||||
results.push(createChunk(state, { reasoning_content: "" }));
|
||||
results.push(createChunk(state, { content: "</think>" }));
|
||||
state.inThinkingBlock = false;
|
||||
}
|
||||
state.textBlockStarted = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue