From fc8d5c91982fedfa1e2e8ea89486d90e51d7d170 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Sun, 5 Oct 2025 18:13:34 +0200 Subject: [PATCH] fix: add strict mode check for no action function (#6294) 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 5dc2310fd..a19828450 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) }