chat: disable Qwen3 thinking via chat_template_kwargs (8x faster)

This commit is contained in:
russell@unturf.com 2026-05-21 21:26:37 -04:00
parent 1099535827
commit bd30ee1fab
No known key found for this signature in database

View file

@ -145,6 +145,11 @@ export async function* sendMessage(message) {
temperature: 0.5,
max_tokens: finalAvailable,
stream: true,
// Disable Qwen3 reasoning: vLLM/llama.cpp honor chat_template_kwargs;
// options.think is Ollama-flavored fallback. Reasoning roughly 8x slower.
chat_template_kwargs: {
enable_thinking: false,
},
options: {
...apiConfig.defaultOptions,
}
@ -324,7 +329,12 @@ export async function* sendMessageWithCustomHistory(customHistory) {
messages: messagesForLLM,
max_tokens: finalAvailable,
stream: true,
options: {
// Disable Qwen3 reasoning: vLLM/llama.cpp honor chat_template_kwargs;
// options.think is Ollama-flavored fallback. Reasoning roughly 8x slower.
chat_template_kwargs: {
enable_thinking: false,
},
options: {
...apiConfig.defaultOptions,
},
}),