refactor: remove configurable toolcall policy and fix to feature matching with high-confidence early emit

This commit is contained in:
CJACK committed 2026-03-30 01:56:25 +08:00
1 parent 822b14ed6b
commit a7c9dfd7c0
20 files changed
+38 -179

No files matched your search

@@ -1,19 +1,9 @@
package openai
import "strings"
func (h *Handler) toolcallFeatureMatchEnabled() bool {
if h == nil || h.Store == nil {
return true
}
mode := strings.TrimSpace(strings.ToLower(h.Store.ToolcallMode()))
return mode == "" || mode == "feature_match"
return true
}
func (h *Handler) toolcallEarlyEmitHighConfidence() bool {
if h == nil || h.Store == nil {
return true
}
level := strings.TrimSpace(strings.ToLower(h.Store.ToolcallEarlyEmitConfidence()))
return level == "" || level == "high"
return true
}