summaryrefslogtreecommitdiff
path: root/helpfuncs.go
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2026-01-31 12:57:53 +0300
committerGrail Finder <wohilas@gmail.com>2026-01-31 12:57:53 +0300
commit3a11210f52a850f84771e1642cafcc3027b85075 (patch)
treeaa4ec3f49b4ed8221a045fc221b09b26bee2c15d /helpfuncs.go
parentfa192a262410eb98b42ff8fb9e0f4e1111240514 (diff)
Enha: avoid recursion in llm calls
Diffstat (limited to 'helpfuncs.go')
-rw-r--r--helpfuncs.go13
1 files changed, 13 insertions, 0 deletions
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
+}