TanStack AI version
"@tanstack/ai": "^0.42.0",
Framework/Library version
"react": "19.2.3","expo": "~57.0.7",
Describe the bug and the steps to reproduce it
// Enable reasoning/thinking extraction for DeepSeek reasoning_content
;(OpenAICompatibleChatAdapter.prototype as any).extractReasoning = function (
chunk: any,
) {
const delta = chunk?.choices?.[0]?.delta
const text = delta?.reasoning_content || delta?.reasoning
if (text) {
return { text }
}
return undefined
}
export const deepseek = openaiCompatible({
name: 'deepseek',
baseURL: 'https://api.deepseek.com/v1',
apiKey: env.DEEPSEEK_API_KEY,
models: ['deepseek-chat', 'deepseek-reasoner'],
}) as any
copilot suggest me to do this for resoning
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
given
Screenshots or Videos (Optional)
No response
Do you intend to try to help solve this bug with your own PR?
None
Terms & Code of Conduct
TanStack AI version
"@tanstack/ai": "^0.42.0",
Framework/Library version
"react": "19.2.3","expo": "~57.0.7",
Describe the bug and the steps to reproduce it
// Enable reasoning/thinking extraction for DeepSeek reasoning_content
;(OpenAICompatibleChatAdapter.prototype as any).extractReasoning = function (
chunk: any,
) {
const delta = chunk?.choices?.[0]?.delta
const text = delta?.reasoning_content || delta?.reasoning
if (text) {
return { text }
}
return undefined
}
export const deepseek = openaiCompatible({
name: 'deepseek',
baseURL: 'https://api.deepseek.com/v1',
apiKey: env.DEEPSEEK_API_KEY,
models: ['deepseek-chat', 'deepseek-reasoner'],
}) as any
copilot suggest me to do this for resoning
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
given
Screenshots or Videos (Optional)
No response
Do you intend to try to help solve this bug with your own PR?
None
Terms & Code of Conduct