I'm using AI SDK with OpenRouter ai-sdk-provider.
The reasoning is empty, and is added to the final message, take a look to the image.
I'm using the model: DeepSeek V3.1
This is my configuration:
'chat-model': wrapLanguageModel({
model: openrouter('deepseek/deepseek-chat-v3.1'),
middleware: extractReasoningMiddleware({ tagName: 'think' }),
}),
Dependencies:
"@ai-sdk/react": "^1.2.12",
"@openrouter/ai-sdk-provider": "^0.7.5",
"ai": "^4.3.19",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"next": "^15.3.4",