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

Function ConvertLevelToBudget

internal/thinking/convert.go:42–45  ·  view source on GitHub ↗

ConvertLevelToBudget converts a thinking level to a budget value. This is a semantic conversion that maps discrete levels to numeric budgets. Level matching is case-insensitive. Level → Budget mapping: - none → 0 - auto → -1 - minimal → 512 - low → 1024 - medium → 8192 - high → 24576

(level string)

Source from the content-addressed store, hash-verified

40// - budget: The converted budget value
41// - ok: true if level is valid, false otherwise
42func ConvertLevelToBudget(level string) (int, bool) {
43 budget, ok := levelToBudgetMap[strings.ToLower(level)]
44 return budget, ok
45}
46
47// BudgetThreshold constants define the upper bounds for each thinking level.
48// These are used by ConvertBudgetToLevel for range-based mapping.

Callers 6

ApplyMethod · 0.92
ValidateConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected