Different think tags for openai-chat
"providers": {
"bigmodel": {
"api": "openai-chat",
"url": "https://open.bigmodel.cn",
"keyRc": "open.bigmodel.cn",
"models": {
"GLM-4.6": {
"modelName": "GLM-4.6"
}
},
"completionUrlRelativePath": "/api/coding/paas/v4/chat/completions"
}
@zrubing can you (setq eca-extra-args '("--log-level debug")) and restart eca and repro again, it should print the LLM response in eca-show-stderr so we can understand LLM behavior.
ps -aux | grep eca jojo 641615 0.6 0.6 39342324 175240 ? Ssl 01:24 0:01 /etc/profiles/per-user/jojo/bin/eca server --log-level debug
i have set this flag , no llm message , only tool calls
sorry, it needs to be (setq eca-extra-args '("--log-level" "debug"))
[OPENAI-CHAT] [2031] {:id "202510310937484d531a3920694072", :created 1761874668, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "", :reasoning_content "\n"}}]}
[OPENAI-CHAT] [2031] {:id "202510310937484d531a3920694072", :created 1761874668, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "\n"}}]}
[OPENAI-CHAT] [2031] {:id "202510310937484d531a3920694072", :created 1761874668, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "</think>"}}]}
[OPENAI-CHAT] [2031] {:id "202510310937484d531a3920694072", :created 1761874668, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "</think>"}}]}
[OPENAI-CHAT] [2031] {:id "202510310937484d531a3920694072", :created 1761874668, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "\n"}}]}
[OPENAI-CHAT] [2031] {:id "202510310937484d531a3920694072", :created 1761874668, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "现在我"}}]}
[OPENAI-CHAT] [2031] {:id "202510310937484d531a3920694072", :created 1761874668, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "需要"}}]}
[OPENAI-CHAT] [2031] {:id "202510310937484d531a3920694072", :created 1761874668, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "添加"}}]}
[OPENAI-CHAT] [2031] {:id "202510310937484d531a3920694072", :created 1761874668, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content " `"}}]}
[OPENAI-CHAT] [2031] {:id "202510310937484d531a3920694072", :created 1761874668, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "getTime"}}]}
[OPENAI-CHAT] [2031] {:id "202510310937484d531a3920694072", :created 1761874668, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "Zone"}}]}
[OPENAI-CHAT] [2031] {:id "202510310937484d531a3920694072", :created 1761874668, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "By"}}]}
[OPENAI-CHAT] [2031] {:id "202510310937484d531a3920694072", :created 1761874668, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "Locale"}}]}
[OPENAI-CHAT] [1188] {:id "202510310943183bd72828dc2b42a6", :created 1761874999, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "", :reasoning_content "\n"}}]}
[OPENAI-CHAT] [1188] {:id "202510310943183bd72828dc2b42a6", :created 1761874999, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "\n"}}]}
[OPENAI-CHAT] [1188] {:id "202510310943183bd72828dc2b42a6", :created 1761874999, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "</think>"}}]}
[OPENAI-CHAT] [1188] {:id "202510310943183bd72828dc2b42a6", :created 1761874999, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "\n"}}]}
[OPENAI-CHAT] [1188] {:id "202510310943183bd72828dc2b42a6", :created 1761874999, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "</think>"}}]}
[OPENAI-CHAT] [1188] {:id "202510310943183bd72828dc2b42a6", :created 1761874999, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "</think>"}}]}
[OPENAI-CHAT] [1188] {:id "202510310943183bd72828dc2b42a6", :created 1761874999, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "\n"}}]}
[OPENAI-CHAT] [1188] {:id "202510310943183bd72828dc2b42a6", :created 1761874999, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "</think>"}}]}
[OPENAI-CHAT] [1188] {:id "202510310943183bd72828dc2b42a6", :created 1761874999, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "\n"}}]}
[OPENAI-CHAT] [1188] {:id "202510310943183bd72828dc2b42a6", :created 1761874999, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "</think>"}}]}
[OPENAI-CHAT] [1188] {:id "202510310943183bd72828dc2b42a6", :created 1761874999, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "</think>"}}]}
[OPENAI-CHAT] [1188] {:id "202510310943183bd72828dc2b42a6", :created 1761874999, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "</think>"}}]}
[OPENAI-CHAT] [1188] {:id "202510310943183bd72828dc2b42a6", :created 1761874999, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "</think>"}}]}
[OPENAI-CHAT] [1188] {:id "202510310943183bd72828dc2b42a6", :created 1761874999, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "\n"}}]}
[OPENAI-CHAT] [1188] {:id "202510310943183bd72828dc2b42a6", :created 1761874999, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "##"}}]}
[OPENAI-CHAT] [1188] {:id "202510310943183bd72828dc2b42a6", :created 1761874999, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content " 总结"}}]}
[OPENAI-CHAT] [1188] {:id "202510310943183bd72828dc2b42a6", :created 1761874999, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "\n\n"}}]}
[OPENAI-CHAT] [1188] {:id "202510310943183bd72828dc2b42a6", :created 1761874999, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "我已经"}}]}
[OPENAI-CHAT] [1188] {:id "202510310943183bd72828dc2b42a6", :created 1761874999, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "成功"}}]}
[OPENAI-CHAT] [1188] {:id "202510310943183bd72828dc2b42a6", :created 1761874999, :model "glm-4.6", :choices [{:index 0, :delta {:role "assistant", :content "实现了"}}]}
@zrubing I may know what is happening here, it seems this model outputs thinking tags in a different way not following the standard of <think> and then </think>, it always does </think> and then </think>.
I think we can make configuration generic to make that work, so you can test it
@zrubing I released 0.75.4 which allows you configure custom start and end think tags, your config should look something like:
"providers": {
"bigmodel": {
"api": "openai-chat",
"url": "https://open.bigmodel.cn",
"keyRc": "open.bigmodel.cn",
"models": {
"GLM-4.6": {
"modelName": "GLM-4.6"
}
},
"completionUrlRelativePath": "/api/coding/paas/v4/chat/completions",
"thinkTagStart": "</think>",
"thinkTagEnd": "</think>"
}
LMK if it works!