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:
@@ -95,7 +95,7 @@ export function claudeToOpenAIResponse(chunk, state) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (state.inThinkingBlock && chunk.index === state.currentBlockIndex) {
|
if (state.inThinkingBlock && chunk.index === state.currentBlockIndex) {
|
||||||
results.push(createChunk(state, { reasoning_content: "" }));
|
results.push(createChunk(state, { content: "</think>" }));
|
||||||
state.inThinkingBlock = false;
|
state.inThinkingBlock = false;
|
||||||
}
|
}
|
||||||
state.textBlockStarted = false;
|
state.textBlockStarted = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user