(config ThinkingConfig, fromFormat, toFormat string)
| 384 | } |
| 385 | |
| 386 | func 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. |
| 407 | func extractThinkingConfig(body []byte, provider string) ThinkingConfig { |
no test coverage detected