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

Function normalizeUserDefinedConfig

internal/thinking/apply.go:386–404  ·  view source on GitHub ↗
(config ThinkingConfig, fromFormat, toFormat string)

Source from the content-addressed store, hash-verified

384}
385
386func normalizeUserDefinedConfig(config ThinkingConfig, fromFormat, toFormat string) ThinkingConfig {
387 if config.Mode != ModeLevel {
388 return config
389 }
390 if toFormat == "claude" {
391 return config
392 }
393 if !isBudgetCapableProvider(toFormat) {
394 return config
395 }
396 budget, ok := ConvertLevelToBudget(string(config.Level))
397 if !ok {
398 return config
399 }
400 config.Mode = ModeBudget
401 config.Budget = budget
402 config.Level = ""
403 return config
404}
405
406// extractThinkingConfig extracts provider-specific thinking config from request body.
407func extractThinkingConfig(body []byte, provider string) ThinkingConfig {

Callers 1

applyUserDefinedModelFunction · 0.85

Calls 2

isBudgetCapableProviderFunction · 0.85
ConvertLevelToBudgetFunction · 0.85

Tested by

no test coverage detected