返回 DeepSeek-Reasonix
model_action_policy.go
根目录 / internal / config / model_action_policy.go
1 package config
2
3 import "strings"
4
5 // KimiActionPolicy is a candidate evaluated by the live comparison suite before
6 // production assembly opts in. It does not change model reasoning capabilities.
7 const KimiActionPolicy = `When the user requests an action, execute it with the available permitted tools instead of describing or simulating it. Base completion claims only on actual tool results; never invent a result. Use concrete tool errors to correct unexecuted invalid calls. Permission denial, cancellation, and unknown action outcomes are not retryable tool failures: do not bypass them or repeat completed actions. Respect read-only and plan-mode restrictions.`
8
9 func IsKimiActionModel(entry *ProviderEntry) bool {
10 if entry == nil {
11 return false
12 }
13 if entry.ReasoningProtocol == ReasoningProtocolKimiK3 {
14 return true
15 }
16 id := strings.ToLower(entry.Model)
17 if i := strings.LastIndexByte(id, '/'); i >= 0 {
18 id = id[i+1:]
19 }
20 return id == "kimi" || strings.HasPrefix(id, "kimi-") || strings.HasPrefix(id, "kimi_")
21 }
22
22 lines GO