diff --git a/embd_res/kcpp_sdui.embd b/embd_res/kcpp_sdui.embd
index def6a9bd5..0ef7f0eea 100644
--- a/embd_res/kcpp_sdui.embd
+++ b/embd_res/kcpp_sdui.embd
@@ -5,10 +5,10 @@
Stable UI for KoboldCpp
-
diff --git a/embd_res/klite.embd b/embd_res/klite.embd
index f8eda3d33..d39ae828f 100644
--- a/embd_res/klite.embd
+++ b/embd_res/klite.embd
@@ -4078,7 +4078,7 @@ Current version indicated by LITEVER below.
"name":"GLM-4.5 Non-Thinking",
"user":"<|user|>\\n",
"user_end":"/nothink",
- "assistant":"<|assistant|>\\n",
+ "assistant":"<|assistant|>\\nWe can answer immediately.",
"assistant_end":"",
"system":"<|system|>\\n",
"system_end":"",
@@ -6532,6 +6532,19 @@ Current version indicated by LITEVER below.
if (event.data && event.data.choices && event.data.choices.length>0) {
if(event.data.choices[0].text)
{
+ //crappy fix for OpenRouter completions, which can provide reasoning on the same chunk
+ if(streaming_was_thinking)
+ {
+ streaming_was_thinking = false;
+ if(event.data.choices[0].reasoning!=null && event.data.choices[0].reasoning!="")
+ {
+ synchro_pending_stream += event.data.choices[0].reasoning;
+ }
+ if(localsettings.think_injected==1 || synchro_pending_stream.includes(localsettings.start_thinking_tag.replaceAll("\\n", "\n")))
+ {
+ synchro_pending_stream += localsettings.stop_thinking_tag.replaceAll("\\n", "\n");
+ }
+ }
synchro_pending_stream += event.data.choices[0].text;
}
else if(event.data.choices[0].delta && event.data.choices[0].delta.content)
@@ -6605,6 +6618,11 @@ Current version indicated by LITEVER below.
}
}
}
+ else if(event.data.choices[0].reasoning!=null && event.data.choices[0].reasoning!="")
+ {
+ streaming_was_thinking = true;
+ synchro_pending_stream += event.data.choices[0].reasoning;
+ }
//collect logprobs if detected
if(event.data.choices[0].logprobs && event.data.choices[0].logprobs.content && event.data.choices[0].logprobs.content.length>0)