From 32c6f687343571b88e557dccadab81a9f530aaaf Mon Sep 17 00:00:00 2001 From: Askhz <1361267452@qq.com> Date: Tue, 21 Apr 2026 19:28:08 +0800 Subject: [PATCH] test: fix empty thinking block test expectation The code sets reasoning_content to ' ' for empty thinking blocks when enableThinking is true, but the test expected undefined. Updated the test to match the actual behavior. Co-Authored-By: Claude Opus 4.6 --- .../src/shared/__tests__/openaiConvertMessages.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@ant/model-provider/src/shared/__tests__/openaiConvertMessages.test.ts b/packages/@ant/model-provider/src/shared/__tests__/openaiConvertMessages.test.ts index 6de81d8a4..5ece2fd93 100644 --- a/packages/@ant/model-provider/src/shared/__tests__/openaiConvertMessages.test.ts +++ b/packages/@ant/model-provider/src/shared/__tests__/openaiConvertMessages.test.ts @@ -428,7 +428,7 @@ describe('DeepSeek thinking mode (enableThinking)', () => { { enableThinking: true }, ) const assistant = result.filter(m => m.role === 'assistant')[0] as any - expect(assistant.reasoning_content).toBeUndefined() + expect(assistant.reasoning_content).toBe(' ') }) // ── fix: reorder tool and user messages for OpenAI API compatibility (#168) ──