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)
| 40 | // - budget: The converted budget value |
| 41 | // - ok: true if level is valid, false otherwise |
| 42 | func 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. |
no outgoing calls
no test coverage detected