From 30ecd4bc8ffb28407840df01b2de8d986b4690ea Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Tue, 16 Sep 2025 22:50:41 +0200 Subject: [PATCH] fix: add strict mode check for no action function When strict mode is enabled, force the LLM to pick always a tool Signed-off-by: Ettore Di Giacinto --- core/http/endpoints/openai/chat.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/http/endpoints/openai/chat.go b/core/http/endpoints/openai/chat.go index 5dc2310fd620..a198284507bc 100644 --- a/core/http/endpoints/openai/chat.go +++ b/core/http/endpoints/openai/chat.go @@ -272,7 +272,7 @@ func ChatEndpoint(cl *config.ModelConfigLoader, ml *model.ModelLoader, evaluator } // Append the no action function - if !config.FunctionsConfig.DisableNoAction { + if !config.FunctionsConfig.DisableNoAction && !strictMode { funcs = append(funcs, noActionGrammar) }