norm_sse_event in openai_chat.py (line 62) extracts thinking via dlt.get('reasoning_content'), but Openrouter returns reasoning content under the field name reasoning:
{"delta": {"reasoning": "We", "reasoning_details": [...]}}
As a result, when calling DeepSeek (and other models) through OpenRouter, reasoning_tokens are counted but Completion.message.content never contains PartType.thinking — thinking is always None.
Reproduction, using the stream function defined in the readme.
r = await stream([user('What is 2+2?')], model='deepseek/deepseek-v4-flash', vendor_name='openrouter', reasoning_effort='high')
No brains will be output. r.usage shows reasoning tokens have been used, and r.raw['deltas'][0] will show the reasoning content being stored under the key 'reasoning'.
Delta(text='', thinking=None, refusal=None, tool_calls=[], citations=[], server_tool_result=None, finish_reason=None, usage=None, raw={'id': 'gen-1783478615-YqwCVIhusHs2HE5dOmrs', 'object': 'chat.completion.chunk', 'created': 1783478615, 'model': 'deepseek/deepseek-v4-flash-20260423', 'provider': 'AtlasCloud', 'choices': [{'index': 0, 'delta': {'content': '', 'role': 'assistant', 'reasoning': 'We', 'reasoning_details': [{'type': 'reasoning.text', 'text': 'We', 'format': 'unknown', 'index': 0}]}, 'finish_reason': None, 'native_finish_reason': None}]})
I've also tested this with Hunyuan 3 on Openrouter, and it also returns.
Delta(text='', thinking=None, refusal=None, tool_calls=[], citations=[], server_tool_result=None, finish_reason=None, usage=None, raw={'id': 'gen-1783478615-YqwCVIhusHs2HE5dOmrs', 'object': 'chat.completion.chunk', 'created': 1783478615, 'model': 'deepseek/deepseek-v4-flash-20260423', 'provider': 'AtlasCloud', 'choices': [{'index': 0, 'delta': {'content': '', 'role': 'assistant', 'reasoning': 'We', 'reasoning_details': [{'type': 'reasoning.text', 'text': 'We', 'format': 'unknown', 'index': 0}]}, 'finish_reason': None, 'native_finish_reason': None}]})
And with Gemma 4 31B.
Delta(text='', thinking=None, refusal=None, tool_calls=[], citations=[], server_tool_result=None, finish_reason=None, usage=None, raw={'id': 'gen-1783479613-fRKBw5Vto4vcuUwNVjUZ', 'object': 'chat.completion.chunk', 'created': 1783479613, 'model': 'google/gemma-4-31b-it-20260402', 'provider': 'WandB', 'choices': [{'index': 0, 'delta': {'content': '', 'role': 'assistant', 'reasoning': 'The', 'reasoning_details': [{'type': 'reasoning.text', 'text': 'The', 'format': 'unknown', 'index': 0}]}, 'finish_reason': None, 'native_finish_reason': None}]})
Due to my region, I'm unable to try Sonnet/Opus/GPT through Openrouter.
This is in contrast to using, say, the Deepseek API directly, which will return 'reasoning_content' when looking at r.raw['deltas'][0].
Delta(text=None, thinking='', refusal=None, tool_calls=[], citations=[], server_tool_result=None, finish_reason=None, usage=None, raw={'id': 'c7211552-934d-47be-9bdb-9addb3a0d7b9', 'object': 'chat.completion.chunk', 'created': 1783478377, 'model': 'deepseek-v4-flash', 'system_fingerprint': 'fp_8b330d02d0_prod0820_fp8_kvcache_20260402', 'choices': [{'index': 0, 'delta': {'role': 'assistant', 'content': None, 'reasoning_content': ''}, 'logprobs': None, 'finish_reason': None}], 'usage': None})
norm_sse_eventinopenai_chat.py(line 62) extracts thinking viadlt.get('reasoning_content'), but Openrouter returns reasoning content under the field namereasoning:{"delta": {"reasoning": "We", "reasoning_details": [...]}}As a result, when calling DeepSeek (and other models) through OpenRouter,
reasoning_tokensare counted butCompletion.message.contentnever containsPartType.thinking— thinking is alwaysNone.Reproduction, using the
streamfunction defined in the readme.No brains will be output.
r.usageshows reasoning tokens have been used, andr.raw['deltas'][0]will show the reasoning content being stored under the key'reasoning'.I've also tested this with Hunyuan 3 on Openrouter, and it also returns.
And with Gemma 4 31B.
Due to my region, I'm unable to try Sonnet/Opus/GPT through Openrouter.
This is in contrast to using, say, the Deepseek API directly, which will return
'reasoning_content'when looking atr.raw['deltas'][0].