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:
parent
289fc9bf2e
commit
af60071f6a
|
|
@ -432,7 +432,8 @@ describe('DeepSeek thinking mode (enableThinking)', () => {
|
||||||
{ enableThinking: true },
|
{ enableThinking: true },
|
||||||
)
|
)
|
||||||
const assistant = result.filter(m => m.role === 'assistant')[0] as any
|
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', () => {
|
test('sets content to null when only thinking and tool_calls present', () => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user