updated lite and sdui (+1 squashed commits)

Squashed commits:

[3172b5d19] updated lite (+1 squashed commits)

Squashed commits:

[45081b0e2] updated glm nothink template
This commit is contained in:
Concedo
2026-01-02 17:27:28 +08:00
parent d8942cde14
commit 107def07c8
2 changed files with 29 additions and 11 deletions
+10 -10
View File
File diff suppressed because one or more lines are too long
+19 -1
View File
@@ -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<think></think>",
"assistant":"<|assistant|>\\n<think>We can answer immediately.</think>",
"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)