fix: update DeepSeek empty thinking test for v4 compatibility

DeepSeek v4 requires reasoning_content to be echoed back even when
empty, otherwise the API returns HTTP 400. The implementation already
handles this correctly (see convertMessages.ts L253-257 comment),
but the test expected undefined instead of empty string.
This commit is contained in:
James Feng 2026-06-02 01:04:30 +08:00
parent 289fc9bf2e
commit af60071f6a

View File

@ -432,7 +432,8 @@ describe('DeepSeek thinking mode (enableThinking)', () => {
{ enableThinking: true },
)
const assistant = result.filter(m => m.role === 'assistant')[0] as any
expect(assistant.reasoning_content).toBeUndefined()
// DeepSeek v4 requires reasoning_content to be echoed back, even when empty
expect(assistant.reasoning_content).toBe('')
})
test('sets content to null when only thinking and tool_calls present', () => {