Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Conversation

@jhrozek
Copy link
Contributor

@jhrozek jhrozek commented Feb 19, 2025

Some OpenRouter models allow to include the reasoning output if told to do so with a special input flag. This seems to be specific to OpenRouter.

A simple test is:

curl http://localhost:8989/openrouter/completions \
 -H "Authorization: Bearer $OPENROUTER_KEY" \
 -H "Content-Type: application/json" \
 -d '{
   "model": "deepseek/deepseek-r1",
   "messages": [
     {"role": "user", "content": "What is heavier, a kilogram of iron or a kilogram of feathers?"}
   ],
   "include_reasoning": true,
   "stream": true
 }'

Fixes: #977

Some OpenRouter models allow to include the reasoning output if told to
do so with a special input flag. This seems to be specific to
OpenRouter.

A simple test is:
```
curl http://localhost:8989/openrouter/completions \
 -H "Authorization: Bearer $OPENROUTER_KEY" \
 -H "Content-Type: application/json" \
 -d '{
   "model": "deepseek/deepseek-r1",
   "messages": [
     {"role": "user", "content": "What is heavier, a kilogram of iron or a kilogram of feathers?"}
   ],
   "include_reasoning": true,
   "stream": true
 }'
```

Fixes: #977
@jhrozek
Copy link
Contributor Author

jhrozek commented Feb 19, 2025

I should note that I didn't find it easy to trigger the reasoning output with Cline lately. I remember seeing it with vanilla openrouter (not through codegate), but I have not during this testing. I see the chunks during curl testing and they seem the same as when directly going to openrouter. Maybe it's just the queries I've been sending to Cline?

@blkt blkt merged commit 4e0c6f3 into chore/replace-litellm Feb 19, 2025
@blkt blkt deleted the reasoning branch February 19, 2025 08:49
blkt pushed a commit that referenced this pull request Feb 19, 2025
Some OpenRouter models allow to include the reasoning output if told to
do so with a special input flag. This seems to be specific to
OpenRouter.

A simple test is:
```
curl http://localhost:8989/openrouter/completions \
 -H "Authorization: Bearer $OPENROUTER_KEY" \
 -H "Content-Type: application/json" \
 -d '{
   "model": "deepseek/deepseek-r1",
   "messages": [
     {"role": "user", "content": "What is heavier, a kilogram of iron or a kilogram of feathers?"}
   ],
   "include_reasoning": true,
   "stream": true
 }'
```

Fixes: #977
blkt pushed a commit that referenced this pull request Feb 19, 2025
Some OpenRouter models allow to include the reasoning output if told to
do so with a special input flag. This seems to be specific to
OpenRouter.

A simple test is:
```
curl http://localhost:8989/openrouter/completions \
 -H "Authorization: Bearer $OPENROUTER_KEY" \
 -H "Content-Type: application/json" \
 -d '{
   "model": "deepseek/deepseek-r1",
   "messages": [
     {"role": "user", "content": "What is heavier, a kilogram of iron or a kilogram of feathers?"}
   ],
   "include_reasoning": true,
   "stream": true
 }'
```

Fixes: #977
blkt pushed a commit that referenced this pull request Feb 20, 2025
Some OpenRouter models allow to include the reasoning output if told to
do so with a special input flag. This seems to be specific to
OpenRouter.

A simple test is:
```
curl http://localhost:8989/openrouter/completions \
 -H "Authorization: Bearer $OPENROUTER_KEY" \
 -H "Content-Type: application/json" \
 -d '{
   "model": "deepseek/deepseek-r1",
   "messages": [
     {"role": "user", "content": "What is heavier, a kilogram of iron or a kilogram of feathers?"}
   ],
   "include_reasoning": true,
   "stream": true
 }'
```

Fixes: #977
blkt pushed a commit that referenced this pull request Feb 21, 2025
Some OpenRouter models allow to include the reasoning output if told to
do so with a special input flag. This seems to be specific to
OpenRouter.

A simple test is:
```
curl http://localhost:8989/openrouter/completions \
 -H "Authorization: Bearer $OPENROUTER_KEY" \
 -H "Content-Type: application/json" \
 -d '{
   "model": "deepseek/deepseek-r1",
   "messages": [
     {"role": "user", "content": "What is heavier, a kilogram of iron or a kilogram of feathers?"}
   ],
   "include_reasoning": true,
   "stream": true
 }'
```

Fixes: #977
blkt pushed a commit that referenced this pull request Feb 21, 2025
Some OpenRouter models allow to include the reasoning output if told to
do so with a special input flag. This seems to be specific to
OpenRouter.

A simple test is:
```
curl http://localhost:8989/openrouter/completions \
 -H "Authorization: Bearer $OPENROUTER_KEY" \
 -H "Content-Type: application/json" \
 -d '{
   "model": "deepseek/deepseek-r1",
   "messages": [
     {"role": "user", "content": "What is heavier, a kilogram of iron or a kilogram of feathers?"}
   ],
   "include_reasoning": true,
   "stream": true
 }'
```

Fixes: #977
blkt pushed a commit that referenced this pull request Feb 21, 2025
Some OpenRouter models allow to include the reasoning output if told to
do so with a special input flag. This seems to be specific to
OpenRouter.

A simple test is:
```
curl http://localhost:8989/openrouter/completions \
 -H "Authorization: Bearer $OPENROUTER_KEY" \
 -H "Content-Type: application/json" \
 -d '{
   "model": "deepseek/deepseek-r1",
   "messages": [
     {"role": "user", "content": "What is heavier, a kilogram of iron or a kilogram of feathers?"}
   ],
   "include_reasoning": true,
   "stream": true
 }'
```

Fixes: #977
blkt pushed a commit that referenced this pull request Feb 25, 2025
Some OpenRouter models allow to include the reasoning output if told to
do so with a special input flag. This seems to be specific to
OpenRouter.

A simple test is:
```
curl http://localhost:8989/openrouter/completions \
 -H "Authorization: Bearer $OPENROUTER_KEY" \
 -H "Content-Type: application/json" \
 -d '{
   "model": "deepseek/deepseek-r1",
   "messages": [
     {"role": "user", "content": "What is heavier, a kilogram of iron or a kilogram of feathers?"}
   ],
   "include_reasoning": true,
   "stream": true
 }'
```

Fixes: #977
blkt pushed a commit that referenced this pull request Mar 2, 2025
Some OpenRouter models allow to include the reasoning output if told to
do so with a special input flag. This seems to be specific to
OpenRouter.

A simple test is:
```
curl http://localhost:8989/openrouter/completions \
 -H "Authorization: Bearer $OPENROUTER_KEY" \
 -H "Content-Type: application/json" \
 -d '{
   "model": "deepseek/deepseek-r1",
   "messages": [
     {"role": "user", "content": "What is heavier, a kilogram of iron or a kilogram of feathers?"}
   ],
   "include_reasoning": true,
   "stream": true
 }'
```

Fixes: #977
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants