From 3a11210f52a850f84771e1642cafcc3027b85075 Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Sat, 31 Jan 2026 12:57:53 +0300 Subject: Enha: avoid recursion in llm calls --- helpfuncs.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'helpfuncs.go') diff --git a/helpfuncs.go b/helpfuncs.go index 28e7962..849b0a0 100644 --- a/helpfuncs.go +++ b/helpfuncs.go @@ -279,3 +279,16 @@ func listChatRoles() []string { charset = append(charset, cbc...) return charset } + +func deepseekModelValidator() error { + if cfg.CurrentAPI == cfg.DeepSeekChatAPI || cfg.CurrentAPI == cfg.DeepSeekCompletionAPI { + if chatBody.Model != "deepseek-chat" && chatBody.Model != "deepseek-reasoner" { + if err := notifyUser("bad request", "wrong deepseek model name"); err != nil { + logger.Warn("failed ot notify user", "error", err) + return err + } + return nil + } + } + return nil +} -- cgit v1.2.3