mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 07:04:45 +00:00
fix(ai): omit empty OpenAI Responses thinking blocks on replay
This commit is contained in:
parent
87d71380e2
commit
8fc2b76827
1 changed files with 1 additions and 0 deletions
|
|
@ -173,6 +173,7 @@ export function convertResponsesMessages<TApi extends Api>(
|
|||
|
||||
for (const block of msg.content) {
|
||||
if (block.type === "thinking") {
|
||||
if (block.thinking.trim().length === 0) continue;
|
||||
if (block.thinkingSignature) {
|
||||
const reasoningItem = JSON.parse(block.thinkingSignature) as ResponseReasoningItem;
|
||||
output.push(reasoningItem);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue