MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / ParseLevelSuffix

Function ParseLevelSuffix

internal/thinking/suffix.go:126–148  ·  view source on GitHub ↗

ParseLevelSuffix attempts to parse a raw suffix as a discrete thinking level. This function parses the raw suffix content (from ParseSuffix.RawSuffix) as a level. Only discrete effort levels are valid: minimal, low, medium, high, xhigh, max. Level matching is case-insensitive. Special values (none

(rawSuffix string)

Source from the content-addressed store, hash-verified

124// - "8192" -> level="", ok=false (numeric, use ParseNumericSuffix)
125// - "ultra" -> level="", ok=false (unknown level)
126func ParseLevelSuffix(rawSuffix string) (level ThinkingLevel, ok bool) {
127 if rawSuffix == "" {
128 return "", false
129 }
130
131 // Case-insensitive matching
132 switch strings.ToLower(rawSuffix) {
133 case "minimal":
134 return LevelMinimal, true
135 case "low":
136 return LevelLow, true
137 case "medium":
138 return LevelMedium, true
139 case "high":
140 return LevelHigh, true
141 case "xhigh":
142 return LevelXHigh, true
143 case "max":
144 return LevelMax, true
145 default:
146 return "", false
147 }
148}

Callers 1

parseSuffixToConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected