Not able to disable thinking mode for the self hosted models which use OpenAI as a provider (please read quick description)
Before submitting your bug report
- [x] I've tried using the "Ask AI" feature on the Continue docs site to see if the docs have an answer
- [x] I'm not able to find a related conversation on GitHub discussions that reports the same bug
- [x] I'm not able to find an open issue that reports the same bug
- [x] I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
- OS: Windows 10
- Continue version: 1.2.11
- IDE version: VS CODE 1.106.3
- Model: Qwen3-8b
- config:
C:\Users\aayush\.continu
name: My Config
version: 1.0.0
schema: v1
models:
- name: Qwen3-8B-chat
provider: openai
model: Qwen/Qwen3-8B
roles:
- chat
- edit
- autocomplete
apiKey: RUNPOD_API_KEY
apiBase: https://api.runpod.ai/v2/XXYYZZ/openai/v1
defaultCompletionOptions:
temperature: 0.6
maxTokens: 4096
contextLength: 8192
topP: 0.9
reasoning: false
chatOptions:
baseSystemMessage: |
Your primary objective is to assist users in their code-writing process through code completion while offering explanations...
requestOptions:
extraBodyProperties:
think: false
autocompleteOptions:
temperature: 0.3
maxTokens: 512
maxPromptTokens: 2048
topP: 0.95
debounceDelay: 200
onlyMyCode: true
maxSuffixPercentage: 0.4
prefixPercentage: 0.6
useCache: true
promptTemplates:
edit: |
`Here is the code before editing:
\`\`\`{{{language}}}
{{{codeToEdit}}}
\`\`\`
Here is the edit requested:
"{{{userInput}}}"
## Instructions:
* DO NOT think
* Perform edits only.
* Write the new edited code.
Here is the code after editing:`
autocomplete: |
You are an AI assistant that helps users with code completion. The code context starts with {{{ prefix }}}, ends with {{{ suffix }}}, is part of the file {{{ filename }}}, located in the {{{ reponame }}} repository, and written in {{{ language }}}. Please provide code suggestions that complete the current line or block, considering the surrounding code and the programming language.
context:
- provider: diff
- provider: file
- provider: code
Description
ℹ A little context about my setup
- I have hosted my model on RunPod as a serverless endpoint which used vLLM as backend
- I can totally disable/enable the thinking with the openai interface like shown below ⬇️
chat_response = client.chat.completions.create(
model="Qwen/Qwen3-8B",
messages=[
{"role": "system", "content": system},
{"role": "user", "content": user},
],
max_tokens=1024,
temperature=0.6,
top_p=0.95,
extra_body={
"top_k": 20,
"chat_template_kwargs": {"enable_thinking": False}, # <--- by using this
},
)
🍒 Problem
As shown in the YAML above, I have tried to disable the thinking in all ways possible:
➡️ Either by:
defaultCompletionOptions:
temperature: 0.6
maxTokens: 4096
contextLength: 8192
topP: 0.9
reasoning: false
➡️ Or by:
requestOptions:
extraBodyProperties:
think: false
But thinking is being performed no matter what.
I guess, in AutoCompletion it works, but with chat it doesn't.
🤔 Problem with Edit
- When I highlight some code and press
CTRL+Ito make some inline edits, it uses<think>tags and stops after</think>without writing any actual code. - When I instruct NOT TO think for edit (as shown in the YAML) it gives empty tags
<think> ... </think>and, just that! Nothing else.
🙏🏻 Request
Please fix this, especially in chat mode.
Thanks
Related Issues
Found several related issues about thinking/reasoning mode:
Thinking mode control:
- #8206 - ollama reasoning model won't give think progress (reasoning disabled by default)
- #5709 - [Feature Request] Add Thinking Mode Toggle and Filter
<think>(closed) - #5037 - Reasoning models cannot give a thought process (thinking not displayed for cloud providers)
Provider-specific issues:
- #5049 - Support for Reasoning in OpenRouter and DeepSeek Providers (different reasoning fields)
- #7618 - No reasoning with GPT-5 via openAI provider - need support for
v1/responsesendpoint
Edit mode issues with reasoning:
- #8990 - BUG: Edit mode with gpt-oss-120b inserts reasoning text into file
- #5822 - Reasoning models shows thinking on edit mode after migrating to config yaml (closed)
- #6278 - Thinking doesnt works with new LLM Magistral by Mistral (closed)
Configuration/format:
- #5992 - Support configurable thinking output formats
- #7051 - self-hosted vllm only works with openai provider but not other openai compatible provider
The core issue appears to be that Continue's handling of reasoning/thinking mode varies significantly across providers, with inconsistent default behavior and limited user control.
Update,
- For now I can get away with adding
/nothinkat the end of my system prompt for chat, but that's not "official" way of doing it and also, ineditmode, I am having issues.
I think the problem is that extraBodyProperties is not working.
Relace docs say to send stream: false https://docs.relace.ai/api-reference/instant-apply/apply
This is my configuration:
name: Local Config
version: 1.0.0
schema: v1
models:
- name: Llama-3.1-8B-Instruct
provider: openai
model: meta-llama/Llama-3.1-8B-Instruct
apiBase: http://localhost:8000/v1
capabilities:
- tool_use
roles:
- chat
- edit
- rerank
# - autocomplete
- embed
- summarize
- name: Relace Instant Apply
provider: relace
model: relace-apply-3
apiKey: ****
roles:
- apply
requestOptions:
extraBodyProperties:
stream: false
This is the error I'm seeing:
@nicoabie Damn, why is it so hard !! Thanks for sharing
@nicoabie Damn, why is it so hard !! Thanks for sharing
Yeah! It was an in other issue I found the solution, check this one out https://github.com/continuedev/continue/issues/5644#issuecomment-3695076420
requestOptions: extraBodyProperties: stream: false
also worked for me with OVH hosting. Thank you!
Edit: it worked for a day, then it came back
this retarded thinking mode also enables security checks and doesnt let me work freely with my uncensored model
File "/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/utils.py", line 40, in create_chat_completion POST /v1/chat/completions [{'type': 'value_error', 'loc': ('body',),
'msg': 'Value error, Stream options can only be defined when `stream=True`. (parameter=stream_options)',
'input': {'messages': [{'role': 'system', 'content': '<important_rules>\n
You are in chat mode.\n\n If the user asks to make changes to files offer that they can use the Apply Button on the code block, or switch to Agent Mode to make the suggested updates automatically.\n If needed concisely explain to the user they can switch to agent mode using the Mode Selector dropdown and provide no other details.\n\n Always include the language and file name in the info string when you write code blocks.\n If you are editing "src/main.py" for example, your code block should start with \'```python src/main.py\'\n\n
When addressing code modification requests, present a concise code snippet that\n emphasizes only the necessary changes and uses abbreviated placeholders for\n unmodified sections. For example:\n\n ```language /path/to/file\n
// ... existing code ...\n\n {{ modified code here }}\n\n // ... existing code ...\n\n {{ another modification }}\n\n // ... rest of code ...\n ```\n\n In existing files, you should always restate the function or class that the snippet belongs to:\n\n
```language /path/to/file\n // ... existing code ...\n\n function exampleFunction() {\n // ... existing code ...\n\n {{ modified code here }}\n\n // ... rest of function ...\n }\n\n // ... rest of code ...\n `
``\n\n Since users have access to their complete file, they prefer reading only the\n relevant modifications. It\'s perfectly acceptable to omit unmodified portions\n at the beginning, middle, or end of files using these "lazy" comments. Only\n provide the complete file when explicitly requested. Include a concise explanation\n of changes unless the user specifically asks for code only.\n\n</important_rules>'}, {'role': 'user', 'content': 'i have a friend called }], 'model': 'qwen-3.6', 'max_tokens': 4096, 'stream': False, 'stream_options': {'include_usage': True}}, 'ctx': {'error': VLLMValidationError('Stream options can only be defined when `stream=True`.')}}]
that shit doesnt workr
I am also getting this when trying to use nemotron 3 120B super (openai endpoint , via OpenWeb UI) and using edit mode.
See example with the default tutorial of continue with edit mode, edit also gives the thinking.
I've tried many ways to disable thinking and tried to isolate edit it as it's own model.
The default block in my yaml for edit before I tried a bunch of other options
name: Nemotron3 Super LLM-EDIT provider: openai model: Nemotron3-120b-Super apiBase: https://local.openwebui.lan/api apikey: {REDACTED} useLegacyCompletionsEndpoint: false roles: - edit
Any idea how to only get code from edit mode with general purpose models? I would like to disable thinking
I realize agentic workflows are all the rage now but having quick inline edits and even still autocomplete! is still useful for coders. agentic workflow is slower in many cases
Any idea how to only get code from edit mode with general purpose models? I would like to disable thinking
Maybe this will help others, but for my model (Nvidia Nemotron 3 ) I was able to turn off the thinking by using extrabodyProperties to add what I need to http request body which eventually the tool parser is looking for it to check from the model/inferencing.
requestOptions: extraBodyProperties: chat_template_kwargs: enable_thinking: false
This worked for me; I could also set a custom chat_template_kwargs through openwebui model workspaces but that is a specific workaround in my case with OWUI.
For models using qwen 3.5 and above, thinking can be disabled as follows.
name: Local Config
version: 1.0.0
schema: v1
models:
- name: Qwen/Qwen3.6-27B
provider: siliconflow
model: Qwen/Qwen3.6-27B
apiKey: sk-xxx
requestOptions:
extraBodyProperties:
enable_thinking: false
Additionally, if you need a thinking and non-thinking mode, simply copy the configuration, edit enable_thinking: false, and name: Qwen/Qwen3.6-27B-think.
https://huggingface.co/Qwen/Qwen3.5-9B#instruct-or-non-thinking-mode
This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.
This issue was closed because it wasn't updated for 10 days after being marked stale. If it's still important, you are welcome to leave a comment and this will keep the issue open. However please note that this repo is no longer being actively maintained.